Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Azure and GCP INFRA WORKLOAD configuration related issues #149

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
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}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we still need to leave cluster_name in the name of the object to be able to properly run destroy.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@paigerube14 Thanks for pointing this out. I added ${CLUSTER_NAME} to all INFRA and WORKLOAD machinesets' 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