Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,19 @@ $ make nodelink-controller
new instance is created. Followed by new node joining the cluster
and turning in `Ready` state.

## Creating machines

You can create a new machine by [applying a manifest representing an instance of the machine CRD](docs/examples/machine.yaml)

The `machine.openshift.io/cluster-api-cluster` label will be used by the controllers to lookup for the right cloud instance.

You can set other labels to provide a convenient way for users and consumers to retrieve groups of machines:
```
machine.openshift.io/cluster-api-machine-role: worker
machine.openshift.io/cluster-api-machine-type: worker
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

qq @enxebre : could users set custom labels like foo: bar or it always needs to follow the above convention machine.openshift.io/cluster-api-machine-role such that consumers can know how to filter?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DanyC97 these are arbitrary labels in the sense that the core controller does not use them today. You might still want to use the machine.openshift.io/ namespace for consistency and searchability. However you could change them or/and add new labels at your convenience

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you @enxebre for taking the time to respond 👍

```


## Dev

- Generate code (if needed):
Expand Down
45 changes: 45 additions & 0 deletions docs/examples/machine.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
apiVersion: machine.openshift.io/v1beta1
kind: Machine
metadata:
labels:
machine.openshift.io/cluster-api-cluster: clusterID
machine.openshift.io/cluster-api-machine-role: role
machine.openshift.io/cluster-api-machine-type: role
name: machineName
namespace: openshift-machine-api
spec:
providerSpec:
value:
kind: AWSMachineProviderConfig
ami:
id: ami-0df3f99538fbef10f
apiVersion: awsproviderconfig.openshift.io/v1beta1
blockDevices:
- ebs:
iops: 0
volumeSize: 120
volumeType: gp2
credentialsSecret:
name: aws-cloud-credentials
deviceIndex: 0
iamInstanceProfile:
id: clusterID-worker-profile
instanceType: m4.large
placement:
availabilityZone: us-east-1a
region: us-east-1
securityGroups:
- filters:
- name: tag:Name
values:
- clusterID-worker-sg
subnet:
filters:
- name: tag:Name
values:
- clusterID-private-us-east-1a
tags:
- name: kubernetes.io/cluster/clusterID
value: owned
userDataSecret:
name: worker-user-data
10 changes: 6 additions & 4 deletions vendor/github.com/openshift/cluster-api-actuator-pkg/Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.