From d7cfdac2e05dbd98f894a14cc048580f0b2a4b01 Mon Sep 17 00:00:00 2001 From: Qiujie Li <81630527+qiliRedHat@users.noreply.github.com> Date: Tue, 17 May 2022 20:44:57 +0800 Subject: [PATCH] Fix hard code of location on azure, update the storage class of Azure, add cluster name to machieset name prefix, add comment to README that Azure only support region: centralus. Add infra and workload label to metadata of GCP machinesets (#149) add infra and workload label to metadata of GCP machinesets --- Jenkinsfile | 5 +++-- README.md | 2 +- infra-node-machineset-alicloud.yaml | 4 ++-- infra-node-machineset-aws.yaml | 6 +++--- infra-node-machineset-azure.yaml | 12 ++++++------ infra-node-machineset-gcp.yaml | 12 +++++++++--- infra-node-machineset-ibmcloud.yaml | 6 +++--- infra-node-machineset-vsphere.yaml | 2 +- workload-node-machineset-alicloud.yaml | 2 +- workload-node-machineset-aws.yaml | 2 +- workload-node-machineset-azure.yaml | 4 ++-- workload-node-machineset-gcp.yaml | 4 +++- workload-node-machineset-vsphere.yaml | 2 +- 13 files changed, 36 insertions(+), 27 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f8f32cc1..9321a857 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,6 +33,7 @@ pipeline { string(name:'INFRA_NODES', defaultValue:'true', description:'If set to true, infra nodes machineset will be created, and options listed below will be used') text(name: 'ENV_VARS', defaultValue: '''PLEASE FILL ME''', description:'''

Enter list of additional Env Vars you need to pass to the script, one pair on each line.
+ For OPENSHIFT_PROMETHEUS_STORAGE_CLASS and OPENSHIFT_ALERTMANAGER_STORAGE_CLASS, use `oc get storageclass` to get them on your cluster.
e.g.for AWS:
OPENSHIFT_INFRA_NODE_VOLUME_IOPS=0
OPENSHIFT_INFRA_NODE_VOLUME_TYPE=gp2
@@ -51,8 +52,8 @@ pipeline { OPENSHIFT_WORKLOAD_NODE_VOLUME_SIZE=500
OPENSHIFT_WORKLOAD_NODE_VOLUME_TYPE=Premium_LRS
OPENSHIFT_WORKLOAD_NODE_VM_SIZE=Standard_D32s_v3
- OPENSHIFT_PROMETHEUS_STORAGE_CLASS=Premium_LRS
- OPENSHIFT_ALERTMANAGER_STORAGE_CLASS=Premium_LRS
+ OPENSHIFT_PROMETHEUS_STORAGE_CLASS=managed-csi
+ OPENSHIFT_ALERTMANAGER_STORAGE_CLASS=managed-csi
e.g.for GCP:
OPENSHIFT_INFRA_NODE_VOLUME_SIZE=100
OPENSHIFT_INFRA_NODE_VOLUME_TYPE=pd-ssd
diff --git a/README.md b/README.md index 867a3b5f..b07307d1 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ A job that will allow adding and removing firewall ports for HostNetwork Uperf t ## Current supported cloud cluster types * AWS -* Azure +* Azure (only support cluster on region: centralus) * GCP * Vsphere * Alicloud/Alibaba (only infra nodes) diff --git a/infra-node-machineset-alicloud.yaml b/infra-node-machineset-alicloud.yaml index 185a84bf..59a57d1c 100644 --- a/infra-node-machineset-alicloud.yaml +++ b/infra-node-machineset-alicloud.yaml @@ -9,7 +9,7 @@ items: machine.openshift.io/cluster-api-cluster: ${CLUSTER_NAME} machine.openshift.io/cluster-api-machine-role: infra machine.openshift.io/cluster-api-machine-type: infra - name: infra-${CLUSTER_REGION}-a + name: ${CLUSTER_NAME}-infra-${CLUSTER_REGION}-a namespace: openshift-machine-api spec: replicas: 1 @@ -87,7 +87,7 @@ items: machine.openshift.io/cluster-api-cluster: ${CLUSTER_NAME} machine.openshift.io/cluster-api-machine-role: infra machine.openshift.io/cluster-api-machine-type: infra - name: infra-${CLUSTER_REGION}-b + name: ${CLUSTER_NAME}-infra-${CLUSTER_REGION}-b namespace: openshift-machine-api spec: replicas: 2 diff --git a/infra-node-machineset-aws.yaml b/infra-node-machineset-aws.yaml index 6318ce91..028ec02c 100644 --- a/infra-node-machineset-aws.yaml +++ b/infra-node-machineset-aws.yaml @@ -8,7 +8,7 @@ items: ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-cluster: ${CLUSTER_NAME} ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-machine-role: infra ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-machine-type: infra - name: infra-${CLUSTER_REGION}a + name: ${CLUSTER_NAME}-infra-${CLUSTER_REGION}a namespace: openshift-machine-api spec: replicas: 1 @@ -77,7 +77,7 @@ items: ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-cluster: ${CLUSTER_NAME} ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-machine-role: infra ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-machine-type: infra - name: infra-${CLUSTER_REGION}b + name: ${CLUSTER_NAME}-infra-${CLUSTER_REGION}b namespace: openshift-machine-api spec: replicas: 1 @@ -146,7 +146,7 @@ items: ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-cluster: ${CLUSTER_NAME} ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-machine-role: infra ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-machine-type: infra - name: infra-${CLUSTER_REGION}c + name: ${CLUSTER_NAME}-infra-${CLUSTER_REGION}c namespace: openshift-machine-api spec: replicas: 1 diff --git a/infra-node-machineset-azure.yaml b/infra-node-machineset-azure.yaml index 3c4e3db0..b1110af7 100644 --- a/infra-node-machineset-azure.yaml +++ b/infra-node-machineset-azure.yaml @@ -8,7 +8,7 @@ items: ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-cluster: ${CLUSTER_NAME} ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-machine-role: infra ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-machine-type: infra - name: infra-${CLUSTER_NAME}1 + name: ${CLUSTER_NAME}-infra-${AZURE_LOCATION}1 namespace: openshift-machine-api spec: replicas: 1 @@ -43,7 +43,7 @@ items: version: "" internalLoadBalancer: "" kind: AzureMachineProviderSpec - location: centralus + location: ${AZURE_LOCATION} managedIdentity: ${CLUSTER_NAME}-identity metadata: creationTimestamp: null @@ -75,7 +75,7 @@ items: ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-cluster: ${CLUSTER_NAME} ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-machine-role: infra ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-machine-type: infra - name: infra-${AZURE_LOCATION}2 + name: ${CLUSTER_NAME}-infra-${AZURE_LOCATION}2 namespace: openshift-machine-api spec: replicas: 1 @@ -110,7 +110,7 @@ items: version: "" internalLoadBalancer: "" kind: AzureMachineProviderSpec - location: centralus + location: ${AZURE_LOCATION} managedIdentity: ${CLUSTER_NAME}-identity metadata: creationTimestamp: null @@ -142,7 +142,7 @@ items: ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-cluster: ${CLUSTER_NAME} ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-machine-role: infra ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-machine-type: infra - name: infra-${AZURE_LOCATION}3 + name: ${CLUSTER_NAME}-infra-${AZURE_LOCATION}3 namespace: openshift-machine-api spec: replicas: 1 @@ -177,7 +177,7 @@ items: version: "" internalLoadBalancer: "" kind: AzureMachineProviderSpec - location: centralus + location: ${AZURE_LOCATION} managedIdentity: ${CLUSTER_NAME}-identity metadata: creationTimestamp: null diff --git a/infra-node-machineset-gcp.yaml b/infra-node-machineset-gcp.yaml index eca9e271..6c4aab9d 100644 --- a/infra-node-machineset-gcp.yaml +++ b/infra-node-machineset-gcp.yaml @@ -6,7 +6,9 @@ items: generation: 1 labels: ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-cluster: ${CLUSTER_NAME} - name: infra-${CLUSTER_NAME}a + ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-machine-role: infra + ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-machine-type: infra + name: ${CLUSTER_NAME}-infra-${CLUSTER_NAME}a namespace: openshift-machine-api spec: replicas: 1 @@ -69,7 +71,9 @@ items: generation: 1 labels: ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-cluster: ${CLUSTER_NAME} - name: infra-${CLUSTER_NAME}b + ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-machine-role: infra + ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-machine-type: infra + name: ${CLUSTER_NAME}-infra-${CLUSTER_NAME}b namespace: openshift-machine-api spec: replicas: 1 @@ -132,7 +136,9 @@ items: generation: 1 labels: ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-cluster: ${CLUSTER_NAME} - name: infra-${CLUSTER_NAME}c + ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-machine-role: infra + ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-machine-type: infra + name: ${CLUSTER_NAME}-infra-${CLUSTER_NAME}c namespace: openshift-machine-api spec: replicas: 1 diff --git a/infra-node-machineset-ibmcloud.yaml b/infra-node-machineset-ibmcloud.yaml index 92312f09..2a114c02 100644 --- a/infra-node-machineset-ibmcloud.yaml +++ b/infra-node-machineset-ibmcloud.yaml @@ -9,7 +9,7 @@ items: machine.openshift.io/cluster-api-cluster: ${CLUSTER_NAME} machine.openshift.io/cluster-api-machine-role: infra machine.openshift.io/cluster-api-machine-type: infra - name: ${CLUSTER_NAME}-infra-1 + name: ${CLUSTER_NAME}-infra-${CLUSTER_REGION}-1 namespace: openshift-machine-api spec: replicas: 1 @@ -57,7 +57,7 @@ items: machine.openshift.io/cluster-api-cluster: ${CLUSTER_NAME} machine.openshift.io/cluster-api-machine-role: infra machine.openshift.io/cluster-api-machine-type: infra - name: ${CLUSTER_NAME}-infra-2 + name: ${CLUSTER_NAME}-infra-${CLUSTER_REGION}-2 namespace: openshift-machine-api spec: replicas: 1 @@ -105,7 +105,7 @@ items: machine.openshift.io/cluster-api-cluster: ${CLUSTER_NAME} machine.openshift.io/cluster-api-machine-role: infra machine.openshift.io/cluster-api-machine-type: infra - name: '${CLUSTER_NAME}-infra-3' + name: ${CLUSTER_NAME}-infra-${CLUSTER_REGION}-3 namespace: openshift-machine-api spec: replicas: 1 diff --git a/infra-node-machineset-vsphere.yaml b/infra-node-machineset-vsphere.yaml index efbff64c..cf81daf1 100644 --- a/infra-node-machineset-vsphere.yaml +++ b/infra-node-machineset-vsphere.yaml @@ -4,7 +4,7 @@ metadata: generation: 1 labels: ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-cluster: ${CLUSTER_NAME} - name: infra-machines-${CLUSTER_NAME} + name: ${CLUSTER_NAME}-infra-machines-${CLUSTER_NAME} namespace: openshift-machine-api spec: replicas: 3 diff --git a/workload-node-machineset-alicloud.yaml b/workload-node-machineset-alicloud.yaml index 499145dd..ad5dd66c 100644 --- a/workload-node-machineset-alicloud.yaml +++ b/workload-node-machineset-alicloud.yaml @@ -5,7 +5,7 @@ metadata: machine.openshift.io/cluster-api-cluster: ${CLUSTER_NAME} machine.openshift.io/cluster-api-machine-role: workload machine.openshift.io/cluster-api-machine-type: workload - name: workload-${CLUSTER_REGION}-a + name:${CLUSTER_NAME}- workload-${CLUSTER_REGION}-a namespace: openshift-machine-api spec: replicas: 1 diff --git a/workload-node-machineset-aws.yaml b/workload-node-machineset-aws.yaml index 2f63f9e2..cd48de24 100644 --- a/workload-node-machineset-aws.yaml +++ b/workload-node-machineset-aws.yaml @@ -6,7 +6,7 @@ metadata: ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-cluster: ${CLUSTER_NAME} ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-machine-role: workload ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-machine-type: workload - name: workload-${CLUSTER_REGION}a + name: ${CLUSTER_NAME}-workload-${CLUSTER_REGION}a namespace: openshift-machine-api spec: replicas: 1 diff --git a/workload-node-machineset-azure.yaml b/workload-node-machineset-azure.yaml index 7791b5a7..34a12b59 100644 --- a/workload-node-machineset-azure.yaml +++ b/workload-node-machineset-azure.yaml @@ -6,7 +6,7 @@ metadata: ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-cluster: ${CLUSTER_NAME} ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-machine-role: workload ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-machine-type: workload - name: workload-${CLUSTER_NAME} + name: ${CLUSTER_NAME}-workload-${AZURE_LOCATION} namespace: openshift-machine-api spec: replicas: 1 @@ -41,7 +41,7 @@ spec: version: "" internalLoadBalancer: "" kind: AzureMachineProviderSpec - location: centralus + location: ${AZURE_LOCATION} managedIdentity: ${CLUSTER_NAME}-identity metadata: creationTimestamp: null diff --git a/workload-node-machineset-gcp.yaml b/workload-node-machineset-gcp.yaml index 16f7a2ff..43edb411 100644 --- a/workload-node-machineset-gcp.yaml +++ b/workload-node-machineset-gcp.yaml @@ -4,7 +4,9 @@ metadata: generation: 1 labels: ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-cluster: ${CLUSTER_NAME} - name: workload-${CLUSTER_NAME} + ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-machine-role: workload + ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-machine-type: workload + name: ${CLUSTER_NAME}-workload-${CLUSTER_NAME} namespace: openshift-machine-api spec: replicas: 1 diff --git a/workload-node-machineset-vsphere.yaml b/workload-node-machineset-vsphere.yaml index 2e8c0d60..b4e3aa96 100644 --- a/workload-node-machineset-vsphere.yaml +++ b/workload-node-machineset-vsphere.yaml @@ -4,7 +4,7 @@ metadata: generation: 1 labels: ${MACHINESET_METADATA_LABEL_PREFIX}/cluster-api-cluster: ${CLUSTER_NAME} - name: workload-machines-${CLUSTER_NAME} + name: ${CLUSTER_NAME}-workload-machines-${CLUSTER_NAME} namespace: openshift-machine-api spec: replicas: 1