diff --git a/README.md b/README.md index 3f1f7b032..bcd5d9777 100644 --- a/README.md +++ b/README.md @@ -57,10 +57,10 @@ $ make nodelink-controller 1. Create a machineset and locate its selector. Assuming the selector corresponds to the following list of match labels: ``` - sigs.k8s.io/cluster-api-cluster: cluster - sigs.k8s.io/cluster-api-machine-role: worker - sigs.k8s.io/cluster-api-machine-type: worker - sigs.k8s.io/cluster-api-machineset: cluster-worker-us-east-1a + machine.openshift.io/cluster-api-cluster: cluster + machine.openshift.io/cluster-api-machine-role: worker + machine.openshift.io/cluster-api-machine-type: worker + machine.openshift.io/cluster-api-machineset: cluster-worker-us-east-1a ``` 1. Define a `MachineHealthCheck` manifest that will be watching all machines @@ -74,10 +74,10 @@ $ make nodelink-controller spec: selector: matchLabels: - sigs.k8s.io/cluster-api-cluster: cluster - sigs.k8s.io/cluster-api-machine-role: worker - sigs.k8s.io/cluster-api-machine-type: worker - sigs.k8s.io/cluster-api-machineset: cluster-worker-us-east-1a + machine.openshift.io/cluster-api-cluster: cluster + machine.openshift.io/cluster-api-machine-role: worker + machine.openshift.io/cluster-api-machine-type: worker + machine.openshift.io/cluster-api-machineset: cluster-worker-us-east-1a ``` 1. Pick a node that is managed by one of the machineset's machines diff --git a/pkg/controller/machinehealthcheck/machinehealthcheck_controller.go b/pkg/controller/machinehealthcheck/machinehealthcheck_controller.go index 379af0b38..0911a2b27 100644 --- a/pkg/controller/machinehealthcheck/machinehealthcheck_controller.go +++ b/pkg/controller/machinehealthcheck/machinehealthcheck_controller.go @@ -269,6 +269,8 @@ func hasMatchingLabels(machineHealthCheck *healthcheckingv1alpha1.MachineHealthC func isMaster(machine mapiv1.Machine, client client.Client) bool { machineMasterLabels := []string{ + "machine.openshift.io/cluster-api-machine-role", + "machine.openshift.io/cluster-api-machine-type", "sigs.k8s.io/cluster-api-machine-role", "sigs.k8s.io/cluster-api-machine-type", } diff --git a/pkg/controller/machinehealthcheck/machinehealthcheck_controller_test.go b/pkg/controller/machinehealthcheck/machinehealthcheck_controller_test.go index 5f22e5c86..61e470770 100644 --- a/pkg/controller/machinehealthcheck/machinehealthcheck_controller_test.go +++ b/pkg/controller/machinehealthcheck/machinehealthcheck_controller_test.go @@ -479,8 +479,8 @@ func TestRemediate(t *testing.T) { func TestIsMaster(t *testing.T) { masterMachine := machine("master") - masterMachine.Labels["sigs.k8s.io/cluster-api-machine-role"] = "master" - masterMachine.Labels["sigs.k8s.io/cluster-api-machine-type"] = "master" + masterMachine.Labels["machine.openshift.io/cluster-api-machine-role"] = "master" + masterMachine.Labels["machine.openshift.io/cluster-api-machine-type"] = "master" masterMachine.Status = mapiv1alpha1.MachineStatus{ NodeRef: &corev1.ObjectReference{ Namespace: "", @@ -494,8 +494,8 @@ func TestIsMaster(t *testing.T) { masterNode.Labels["node-role.kubernetes.io/master"] = "" workerMachine := machine("worker") - workerMachine.Labels["sigs.k8s.io/cluster-api-machine-role"] = "worker" - workerMachine.Labels["sigs.k8s.io/cluster-api-machine-type"] = "worker" + workerMachine.Labels["machine.openshift.io/cluster-api-machine-role"] = "worker" + workerMachine.Labels["machine.openshift.io/cluster-api-machine-type"] = "worker" workerMachine.Status = mapiv1alpha1.MachineStatus{ NodeRef: &corev1.ObjectReference{ diff --git a/test/integration/aws.go b/test/integration/aws.go index ddbda1e02..b149dd17e 100644 --- a/test/integration/aws.go +++ b/test/integration/aws.go @@ -14,9 +14,9 @@ import ( const ( // AwsCredsSecretIDKey is secret key containing AWS KeyId - AwsCredsSecretIDKey = "awsAccessKeyId" + AwsCredsSecretIDKey = "aws_access_key_id" // AwsCredsSecretAccessKey is secret key containing AWS Secret Key - AwsCredsSecretAccessKey = "awsSecretAccessKey" + AwsCredsSecretAccessKey = "aws_secret_access_key" ) // NewClient creates our client wrapper object for the actual AWS clients we use. diff --git a/test/integration/generate.sh b/test/integration/generate.sh index f7b22c00c..e0dcc1bd1 100755 --- a/test/integration/generate.sh +++ b/test/integration/generate.sh @@ -10,6 +10,6 @@ metadata: namespace: openshift-machine-api type: Opaque data: - awsAccessKeyId: $(echo -n $(aws configure get aws_access_key_id) | base64) - awsSecretAccessKey: $(echo -n $(aws configure get aws_secret_access_key) | base64) + aws_access_key_id: $(echo -n $(aws configure get aws_access_key_id) | base64) + aws_secret_access_key: $(echo -n $(aws configure get aws_secret_access_key) | base64) HEREDOC diff --git a/test/integration/manifests/machineset.yaml b/test/integration/manifests/machineset.yaml index 64a9e2076..cb4d46c06 100644 --- a/test/integration/manifests/machineset.yaml +++ b/test/integration/manifests/machineset.yaml @@ -2,24 +2,24 @@ apiVersion: machine.openshift.io/v1beta1 kind: MachineSet metadata: labels: - sigs.k8s.io/cluster-api-cluster: {{ .ClusterID }} - sigs.k8s.io/cluster-api-machine-role: worker - sigs.k8s.io/cluster-api-machine-type: worker + machine.openshift.io/cluster-api-cluster: {{ .ClusterID }} + machine.openshift.io/cluster-api-machine-role: worker + machine.openshift.io/cluster-api-machine-type: worker name: worker namespace: openshift-machine-api spec: replicas: 2 selector: matchLabels: - sigs.k8s.io/cluster-api-cluster: {{ .ClusterID }} - sigs.k8s.io/cluster-api-machineset: worker + machine.openshift.io/cluster-api-cluster: {{ .ClusterID }} + machine.openshift.io/cluster-api-machineset: worker template: metadata: labels: - sigs.k8s.io/cluster-api-cluster: {{ .ClusterID }} - sigs.k8s.io/cluster-api-machine-role: worker - sigs.k8s.io/cluster-api-machine-type: worker - sigs.k8s.io/cluster-api-machineset: worker + machine.openshift.io/cluster-api-cluster: {{ .ClusterID }} + machine.openshift.io/cluster-api-machine-role: worker + machine.openshift.io/cluster-api-machine-type: worker + machine.openshift.io/cluster-api-machineset: worker spec: providerSpec: value: