Skip to content

Commit

Permalink
Remove memoryInGBs from our templates
Browse files Browse the repository at this point in the history
We are removing this from our main templates otherwise we have to set
a default which users might not set when changing the OCPU and could
cause issues.
  • Loading branch information
joekr committed Mar 23, 2022
1 parent a69c806 commit 4025ace
Show file tree
Hide file tree
Showing 13 changed files with 89 additions and 101 deletions.
86 changes: 45 additions & 41 deletions docs/src/gs/create-workload-cluster.md

Large diffs are not rendered by default.

10 changes: 4 additions & 6 deletions scripts/ci-conformance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@ export TAG="${defaultTag:-dev}"
export GINKGO_NODES=3

export OCI_SSH_KEY="${OCI_SSH_KEY:-""}"
export OCI_CONTROL_PLANE_SHAPE="${OCI_CONTROL_PLANE_SHAPE:-"VM.Standard.E3.Flex"}"
export OCI_CONTROL_PLANE_SHAPE_OCPUS="${OCI_CONTROL_PLANE_SHAPE_OCPUS:-"1"}"
export OCI_CONTROL_PLANE_SHAPE_MEMORY_IN_GBS="${OCI_CONTROL_PLANE_SHAPE_MEMORY_IN_GBS:-"16"}"
export OCI_WORKER_SHAPE="${OCI_WORKER_SHAPE:-"VM.Standard.E3.Flex"}"
export OCI_WORKER_SHAPE_OCPUS="${OCI_WORKER_SHAPE_OCPUS:-"1"}"
export OCI_WORKER_SHAPE_MEMORY_IN_GBS="${OCI_WORKER_SHAPE_MEMORY_IN_GBS:-"16"}"
export OCI_CONTROL_PLANE_MACHINE_TYPE="${OCI_CONTROL_PLANE_MACHINE_TYPE:-"VM.Standard.E3.Flex"}"
export OCI_CONTROL_PLANE_MACHINE_TYPE_OCPUS="${OCI_CONTROL_PLANE_MACHINE_TYPE_OCPUS:-"1"}"
export OCI_NODE_MACHINE_TYPE="${OCI_NODE_MACHINE_TYPE:-"VM.Standard.E3.Flex"}"
export OCI_NODE_MACHINE_TYPE_OCPUS="${OCI_NODE_MACHINE_TYPE_OCPUS:-"1"}"
export KIND_EXPERIMENTAL_DOCKER_NETWORK="bridge"

# Generate SSH key.
Expand Down
10 changes: 4 additions & 6 deletions scripts/ci-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@ export TAG="${defaultTag:-dev}"
export GINKGO_NODES=3

export OCI_SSH_KEY="${OCI_SSH_KEY:-""}"
export OCI_CONTROL_PLANE_SHAPE="${OCI_CONTROL_PLANE_SHAPE:-"VM.Standard.E3.Flex"}"
export OCI_CONTROL_PLANE_SHAPE_OCPUS="${OCI_CONTROL_PLANE_SHAPE_OCPUS:-"1"}"
export OCI_CONTROL_PLANE_SHAPE_MEMORY_IN_GBS="${OCI_CONTROL_PLANE_SHAPE_MEMORY_IN_GBS:-"16"}"
export OCI_WORKER_SHAPE="${OCI_WORKER_SHAPE:-"VM.Standard.E3.Flex"}"
export OCI_WORKER_SHAPE_OCPUS="${OCI_WORKER_SHAPE_OCPUS:-"1"}"
export OCI_WORKER_SHAPE_MEMORY_IN_GBS="${OCI_WORKER_SHAPE_MEMORY_IN_GBS:-"16"}"
export OCI_CONTROL_PLANE_MACHINE_TYPE="${OCI_CONTROL_PLANE_MACHINE_TYPE:-"VM.Standard.E3.Flex"}"
export OCI_CONTROL_PLANE_MACHINE_TYPE_OCPUS="${OCI_CONTROL_PLANE_MACHINE_TYPE_OCPUS:-"1"}"
export OCI_NODE_MACHINE_TYPE="${OCI_NODE_MACHINE_TYPE:-"VM.Standard.E3.Flex"}"
export OCI_NODE_MACHINE_TYPE_OCPUS="${OCI_NODE_MACHINE_TYPE_OCPUS:-"1"}"
export KIND_EXPERIMENTAL_DOCKER_NETWORK="bridge"

# Generate SSH key.
Expand Down
12 changes: 5 additions & 7 deletions templates/cluster-template-antrea.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,9 @@ spec:
spec:
imageId: "${OCI_IMAGE_ID}"
compartmentId: "${OCI_COMPARTMENT_ID}"
shape: "${OCI_CONTROL_PLANE_SHAPE=VM.Standard.E4.Flex}"
shape: "${OCI_CONTROL_PLANE_MACHINE_TYPE=VM.Standard.E4.Flex}"
shapeConfig:
ocpus: "${OCI_CONTROL_PLANE_SHAPE_OCPUS=1}"
memoryInGBs: "${OCI_CONTROL_PLANE_SHAPE_MEMORY_IN_GBS=16}"
ocpus: "${OCI_CONTROL_PLANE_MACHINE_TYPE_OCPUS=1}"
metadata:
ssh_authorized_keys: "${OCI_SSH_KEY}"
isPvEncryptionInTransitEnabled: ${OCI_CONTROL_PLANE_PV_TRANSIT_ENCRYPTION=true}
Expand All @@ -311,10 +310,9 @@ spec:
spec:
imageId: "${OCI_IMAGE_ID}"
compartmentId: "${OCI_COMPARTMENT_ID}"
shape: "${OCI_WORKER_SHAPE=VM.Standard.E4.Flex}"
shape: "${OCI_NODE_MACHINE_TYPE=VM.Standard.E4.Flex}"
shapeConfig:
ocpus: "${OCI_WORKER_SHAPE_OCPUS=1}"
memoryInGBs: "${OCI_WORKER_SHAPE_MEMORY_IN_GBS=16}"
ocpus: "${OCI_NODE_MACHINE_TYPE_OCPUS=1}"
metadata:
ssh_authorized_keys: "${OCI_SSH_KEY}"
isPvEncryptionInTransitEnabled: ${OCI_NODE_PV_TRANSIT_ENCRYPTION=true}
Expand All @@ -338,7 +336,7 @@ metadata:
name: "${CLUSTER_NAME}-md-0"
spec:
clusterName: "${CLUSTER_NAME}"
replicas: ${WORKER_MACHINE_COUNT}
replicas: ${NODE_MACHINE_COUNT}
selector:
matchLabels:
template:
Expand Down
12 changes: 5 additions & 7 deletions templates/cluster-template-arm-free-tier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,11 @@ spec:
spec:
imageId: "${OCI_IMAGE_ID}"
compartmentId: "${OCI_COMPARTMENT_ID}"
shape: "${OCI_CONTROL_PLANE_SHAPE=VM.Standard.E4.Flex}"
shape: "${OCI_CONTROL_PLANE_MACHINE_TYPE=VM.Standard.E4.Flex}"
networkDetails:
assignPublicIp: true
shapeConfig:
ocpus: "${OCI_CONTROL_PLANE_SHAPE_OCPUS=1}"
memoryInGBs: "${OCI_CONTROL_PLANE_SHAPE_MEMORY_IN_GBS=16}"
ocpus: "${OCI_CONTROL_PLANE_MACHINE_TYPE_OCPUS=1}"
metadata:
ssh_authorized_keys: "${OCI_SSH_KEY}"
IsPvEncryptionInTransitEnabled: ${OCI_CONTROL_PLANE_PV_TRANSIT_ENCRYPTION=true}
Expand All @@ -121,12 +120,11 @@ spec:
spec:
imageId: "${OCI_IMAGE_ID}"
compartmentId: "${OCI_COMPARTMENT_ID}"
shape: "${OCI_WORKER_SHAPE=VM.Standard.E4.Flex}"
shape: "${OCI_NODE_MACHINE_TYPE=VM.Standard.E4.Flex}"
networkDetails:
assignPublicIp: true
shapeConfig:
ocpus: "${OCI_WORKER_SHAPE_OCPUS=1}"
memoryInGBs: "${OCI_WORKER_SHAPE_MEMORY_IN_GBS=16}"
ocpus: "${OCI_NODE_MACHINE_TYPE_OCPUS=1}"
metadata:
ssh_authorized_keys: "${OCI_SSH_KEY}"
IsPvEncryptionInTransitEnabled: ${OCI_NODE_PV_TRANSIT_ENCRYPTION=true}
Expand All @@ -153,7 +151,7 @@ metadata:
name: "${CLUSTER_NAME}-md-0"
spec:
clusterName: "${CLUSTER_NAME}"
replicas: ${WORKER_MACHINE_COUNT}
replicas: ${NODE_MACHINE_COUNT}
selector:
matchLabels:
template:
Expand Down
16 changes: 7 additions & 9 deletions templates/cluster-template-failure-domain-spread.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,9 @@ spec:
spec:
imageId: "${OCI_IMAGE_ID}"
compartmentId: "${OCI_COMPARTMENT_ID}"
shape: "${OCI_CONTROL_PLANE_SHAPE=VM.Standard.E4.Flex}"
shape: "${OCI_CONTROL_PLANE_MACHINE_TYPE=VM.Standard.E4.Flex}"
shapeConfig:
ocpus: "${OCI_CONTROL_PLANE_SHAPE_OCPUS=1}"
memoryInGBs: "${OCI_CONTROL_PLANE_SHAPE_MEMORY_IN_GBS=16}"
ocpus: "${OCI_CONTROL_PLANE_MACHINE_TYPE_OCPUS=1}"
metadata:
ssh_authorized_keys: "${OCI_SSH_KEY}"
isPvEncryptionInTransitEnabled: ${OCI_CONTROL_PLANE_PV_TRANSIT_ENCRYPTION=true}
Expand All @@ -97,10 +96,9 @@ spec:
spec:
imageId: "${OCI_IMAGE_ID}"
compartmentId: "${OCI_COMPARTMENT_ID}"
shape: "${OCI_WORKER_SHAPE=VM.Standard.E4.Flex}"
shape: "${OCI_NODE_MACHINE_TYPE=VM.Standard.E4.Flex}"
shapeConfig:
ocpus: "${OCI_WORKER_SHAPE_OCPUS=1}"
memoryInGBs: "${OCI_WORKER_SHAPE_MEMORY_IN_GBS=16}"
ocpus: "${OCI_NODE_MACHINE_TYPE_OCPUS=1}"
metadata:
ssh_authorized_keys: "${OCI_SSH_KEY}"
isPvEncryptionInTransitEnabled: ${OCI_NODE_PV_TRANSIT_ENCRYPTION=true}
Expand All @@ -124,7 +122,7 @@ metadata:
name: "${CLUSTER_NAME}-fd-1-md-0"
spec:
clusterName: "${CLUSTER_NAME}"
replicas: ${WORKER_MACHINE_COUNT}
replicas: ${NODE_MACHINE_COUNT}
selector:
matchLabels:
template:
Expand All @@ -148,7 +146,7 @@ metadata:
name: "${CLUSTER_NAME}-fd-2-md-0"
spec:
clusterName: "${CLUSTER_NAME}"
replicas: ${WORKER_MACHINE_COUNT}
replicas: ${NODE_MACHINE_COUNT}
selector:
matchLabels:
template:
Expand All @@ -172,7 +170,7 @@ metadata:
name: "${CLUSTER_NAME}-fd-3-md-0"
spec:
clusterName: "${CLUSTER_NAME}"
replicas: ${WORKER_MACHINE_COUNT}
replicas: ${NODE_MACHINE_COUNT}
selector:
matchLabels:
template:
Expand Down
12 changes: 5 additions & 7 deletions templates/cluster-template-oci-addons.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,9 @@ spec:
spec:
imageId: "${OCI_IMAGE_ID}"
compartmentId: "${OCI_COMPARTMENT_ID}"
shape: "${OCI_CONTROL_PLANE_SHAPE=VM.Standard.E4.Flex}"
shape: "${OCI_CONTROL_PLANE_MACHINE_TYPE=VM.Standard.E4.Flex}"
shapeConfig:
ocpus: "${OCI_CONTROL_PLANE_SHAPE_OCPUS=1}"
memoryInGBs: "${OCI_CONTROL_PLANE_SHAPE_MEMORY_IN_GBS=16}"
ocpus: "${OCI_CONTROL_PLANE_MACHINE_TYPE_OCPUS=1}"
metadata:
ssh_authorized_keys: "${OCI_SSH_KEY}"
isPvEncryptionInTransitEnabled: ${OCI_CONTROL_PLANE_PV_TRANSIT_ENCRYPTION=true}
Expand All @@ -97,10 +96,9 @@ spec:
spec:
imageId: "${OCI_IMAGE_ID}"
compartmentId: "${OCI_COMPARTMENT_ID}"
shape: "${OCI_WORKER_SHAPE=VM.Standard.E4.Flex}"
shape: "${OCI_NODE_MACHINE_TYPE=VM.Standard.E4.Flex}"
shapeConfig:
ocpus: "${OCI_WORKER_SHAPE_OCPUS=1}"
memoryInGBs: "${OCI_WORKER_SHAPE_MEMORY_IN_GBS=16}"
ocpus: "${OCI_NODE_MACHINE_TYPE_OCPUS=1}"
metadata:
ssh_authorized_keys: "${OCI_SSH_KEY}"
isPvEncryptionInTransitEnabled: ${OCI_NODE_PV_TRANSIT_ENCRYPTION=true}
Expand All @@ -124,7 +122,7 @@ metadata:
name: "${CLUSTER_NAME}-md-0"
spec:
clusterName: "${CLUSTER_NAME}"
replicas: ${WORKER_MACHINE_COUNT}
replicas: ${NODE_MACHINE_COUNT}
selector:
matchLabels:
template:
Expand Down
12 changes: 5 additions & 7 deletions templates/cluster-template-oraclelinux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,9 @@ spec:
spec:
imageId: "${OCI_IMAGE_ID}"
compartmentId: "${OCI_COMPARTMENT_ID}"
shape: "${OCI_CONTROL_PLANE_SHAPE=VM.Standard.E4.Flex}"
shape: "${OCI_CONTROL_PLANE_MACHINE_TYPE=VM.Standard.E4.Flex}"
shapeConfig:
ocpus: "${OCI_CONTROL_PLANE_SHAPE_OCPUS=1}"
memoryInGBs: "${OCI_CONTROL_PLANE_SHAPE_MEMORY_IN_GBS=16}"
ocpus: "${OCI_CONTROL_PLANE_MACHINE_TYPE_OCPUS=1}"
metadata:
ssh_authorized_keys: "${OCI_SSH_KEY}"
isPvEncryptionInTransitEnabled: ${OCI_CONTROL_PLANE_PV_TRANSIT_ENCRYPTION=true}
Expand All @@ -99,10 +98,9 @@ spec:
spec:
imageId: "${OCI_IMAGE_ID}"
compartmentId: "${OCI_COMPARTMENT_ID}"
shape: "${OCI_WORKER_SHAPE=VM.Standard.E4.Flex}"
shape: "${OCI_NODE_MACHINE_TYPE=VM.Standard.E4.Flex}"
shapeConfig:
ocpus: "${OCI_WORKER_SHAPE_OCPUS=1}"
memoryInGBs: "${OCI_WORKER_SHAPE_MEMORY_IN_GBS=16}"
ocpus: "${OCI_NODE_MACHINE_TYPE_OCPUS=1}"
metadata:
ssh_authorized_keys: "${OCI_SSH_KEY}"
isPvEncryptionInTransitEnabled: ${OCI_NODE_PV_TRANSIT_ENCRYPTION=true}
Expand All @@ -129,7 +127,7 @@ metadata:
name: "${CLUSTER_NAME}-md-0"
spec:
clusterName: "${CLUSTER_NAME}"
replicas: ${WORKER_MACHINE_COUNT}
replicas: ${NODE_MACHINE_COUNT}
selector:
matchLabels:
template:
Expand Down
12 changes: 5 additions & 7 deletions templates/cluster-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,9 @@ spec:
spec:
imageId: "${OCI_IMAGE_ID}"
compartmentId: "${OCI_COMPARTMENT_ID}"
shape: "${OCI_CONTROL_PLANE_SHAPE=VM.Standard.E4.Flex}"
shape: "${OCI_CONTROL_PLANE_MACHINE_TYPE=VM.Standard.E4.Flex}"
shapeConfig:
ocpus: "${OCI_CONTROL_PLANE_SHAPE_OCPUS=1}"
memoryInGBs: "${OCI_CONTROL_PLANE_SHAPE_MEMORY_IN_GBS=16}"
ocpus: "${OCI_CONTROL_PLANE_MACHINE_TYPE_OCPUS=1}"
metadata:
ssh_authorized_keys: "${OCI_SSH_KEY}"
isPvEncryptionInTransitEnabled: ${OCI_CONTROL_PLANE_PV_TRANSIT_ENCRYPTION=true}
Expand All @@ -97,10 +96,9 @@ spec:
spec:
imageId: "${OCI_IMAGE_ID}"
compartmentId: "${OCI_COMPARTMENT_ID}"
shape: "${OCI_WORKER_SHAPE=VM.Standard.E4.Flex}"
shape: "${OCI_NODE_MACHINE_TYPE=VM.Standard.E4.Flex}"
shapeConfig:
ocpus: "${OCI_WORKER_SHAPE_OCPUS=1}"
memoryInGBs: "${OCI_WORKER_SHAPE_MEMORY_IN_GBS=16}"
ocpus: "${OCI_NODE_MACHINE_TYPE_OCPUS=1}"
metadata:
ssh_authorized_keys: "${OCI_SSH_KEY}"
isPvEncryptionInTransitEnabled: ${OCI_NODE_PV_TRANSIT_ENCRYPTION=true}
Expand All @@ -124,7 +122,7 @@ metadata:
name: "${CLUSTER_NAME}-md-0"
spec:
clusterName: "${CLUSTER_NAME}"
replicas: ${WORKER_MACHINE_COUNT}
replicas: ${NODE_MACHINE_COUNT}
selector:
matchLabels:
template:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ spec:
spec:
imageId: "${OCI_IMAGE_ID}"
compartmentId: "${OCI_COMPARTMENT_ID}"
shape: "${OCI_CONTROL_PLANE_SHAPE}"
shape: "${OCI_CONTROL_PLANE_MACHINE_TYPE}"
shapeConfig:
ocpus: "1"
metadata:
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/data/infrastructure-oci/v1beta1/bases/md.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
spec:
imageId: "${OCI_IMAGE_ID}"
compartmentId: "${OCI_COMPARTMENT_ID}"
shape: "${OCI_WORKER_SHAPE}"
shape: "${OCI_NODE_MACHINE_TYPE}"
shapeConfig:
ocpus: "1"
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
spec:
imageId: "${OCI_IMAGE_ID}"
compartmentId: "${OCI_COMPARTMENT_ID}"
shape: "${OCI_WORKER_SHAPE}"
shape: "${OCI_NODE_MACHINE_TYPE}"
subnetName: "worker-subnet-2"
nsgName: "worker-nsg-2"
shapeConfig:
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func makeOCIMachineTemplate(namespace, name string) *infrastructurev1beta1.OCIMa
Template: infrastructurev1beta1.OCIMachineTemplateResource{
Spec: infrastructurev1beta1.OCIMachineSpec{
ImageId: os.Getenv("OCI_UPGRADE_IMAGE_ID"),
Shape: os.Getenv("OCI_WORKER_SHAPE"),
Shape: os.Getenv("OCI_NODE_MACHINE_TYPE"),
ShapeConfig: infrastructurev1beta1.ShapeConfig{
Ocpus: "1",
},
Expand Down

0 comments on commit 4025ace

Please sign in to comment.