Skip to content

Commit

Permalink
Fix hard code of location on azure, update the storage class of Azure…
Browse files Browse the repository at this point in the history
…, 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
  • Loading branch information
qiliRedHat committed May 17, 2022
1 parent 8f3eb87 commit d7cfdac
Show file tree
Hide file tree
Showing 13 changed files with 36 additions and 27 deletions.
5 changes: 3 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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:'''<p>
Enter list of additional Env Vars you need to pass to the script, one pair on each line. <br>
For OPENSHIFT_PROMETHEUS_STORAGE_CLASS and OPENSHIFT_ALERTMANAGER_STORAGE_CLASS, use `oc get storageclass` to get them on your cluster.<br>
e.g.<b>for AWS:</b><br>
OPENSHIFT_INFRA_NODE_VOLUME_IOPS=0 <br>
OPENSHIFT_INFRA_NODE_VOLUME_TYPE=gp2 <br>
Expand All @@ -51,8 +52,8 @@ pipeline {
OPENSHIFT_WORKLOAD_NODE_VOLUME_SIZE=500 <br>
OPENSHIFT_WORKLOAD_NODE_VOLUME_TYPE=Premium_LRS <br>
OPENSHIFT_WORKLOAD_NODE_VM_SIZE=Standard_D32s_v3 <br>
OPENSHIFT_PROMETHEUS_STORAGE_CLASS=Premium_LRS <br>
OPENSHIFT_ALERTMANAGER_STORAGE_CLASS=Premium_LRS<br>
OPENSHIFT_PROMETHEUS_STORAGE_CLASS=managed-csi <br>
OPENSHIFT_ALERTMANAGER_STORAGE_CLASS=managed-csi<br>
e.g.<b>for GCP:</b><br>
OPENSHIFT_INFRA_NODE_VOLUME_SIZE=100 <br>
OPENSHIFT_INFRA_NODE_VOLUME_TYPE=pd-ssd <br>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions infra-node-machineset-alicloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions infra-node-machineset-aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions infra-node-machineset-azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -43,7 +43,7 @@ items:
version: ""
internalLoadBalancer: ""
kind: AzureMachineProviderSpec
location: centralus
location: ${AZURE_LOCATION}
managedIdentity: ${CLUSTER_NAME}-identity
metadata:
creationTimestamp: null
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -110,7 +110,7 @@ items:
version: ""
internalLoadBalancer: ""
kind: AzureMachineProviderSpec
location: centralus
location: ${AZURE_LOCATION}
managedIdentity: ${CLUSTER_NAME}-identity
metadata:
creationTimestamp: null
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -177,7 +177,7 @@ items:
version: ""
internalLoadBalancer: ""
kind: AzureMachineProviderSpec
location: centralus
location: ${AZURE_LOCATION}
managedIdentity: ${CLUSTER_NAME}-identity
metadata:
creationTimestamp: null
Expand Down
12 changes: 9 additions & 3 deletions infra-node-machineset-gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions infra-node-machineset-ibmcloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion infra-node-machineset-vsphere.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion workload-node-machineset-alicloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion workload-node-machineset-aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions workload-node-machineset-azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -41,7 +41,7 @@ spec:
version: ""
internalLoadBalancer: ""
kind: AzureMachineProviderSpec
location: centralus
location: ${AZURE_LOCATION}
managedIdentity: ${CLUSTER_NAME}-identity
metadata:
creationTimestamp: null
Expand Down
4 changes: 3 additions & 1 deletion workload-node-machineset-gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion workload-node-machineset-vsphere.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d7cfdac

Please sign in to comment.