github.com/verrazzano/verrazzano@v1.7.1/cluster-operator/controllers/quickcreate/ociocne/template/cluster/nodes.goyaml (about) 1 # Copyright (c) 2023, Oracle and/or its affiliates. 2 # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 4 apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 5 kind: OCIMachineTemplate 6 metadata: 7 name: {{.Name}}-control-plane 8 namespace: {{.Namespace}} 9 spec: 10 template: 11 spec: 12 bootVolumeSizeInGBs: "{{.OCI.ControlPlane.BootVolumeGbs}}" 13 compartmentId: {{.OCI.Compartment}} 14 imageId: {{.OCI.ImageID}} 15 {{- if .OCI.SSHPublicKey }} 16 metadata: 17 ssh_authorized_keys: {{.OCI.SSHPublicKey}} 18 {{- end }} 19 shape: {{.OCI.ControlPlane.Shape}} 20 {{- if contains .OCI.ControlPlane.Shape "Flex" }} 21 shapeConfig: 22 {{- if .OCI.ControlPlane.OCPUs }} 23 ocpus: "{{.OCI.ControlPlane.OCPUs}}" 24 {{- end }} 25 {{- if .OCI.ControlPlane.MemoryGbs }} 26 memoryInGBs: "{{.OCI.ControlPlane.MemoryGbs}}" 27 {{- end }} 28 {{- end }} 29 {{- range .OCI.Workers }} 30 --- 31 apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 32 kind: OCIMachineTemplate 33 metadata: 34 name: {{.Name}} 35 namespace: {{$.Namespace}} 36 labels: 37 verrazzano.io/node-pool: {{.Name}} 38 spec: 39 template: 40 spec: 41 bootVolumeSizeInGBs: "{{.BootVolumeGbs}}" 42 compartmentId: {{$.OCI.Compartment}} 43 imageId: {{$.OCI.ImageID}} 44 {{- if $.OCI.SSHPublicKey}} 45 metadata: 46 ssh_authorized_keys: {{$.OCI.SSHPublicKey}} 47 {{- end }} 48 shape: {{.Shape}} 49 {{- if and (or .OCPUs .MemoryGbs) (contains .Shape "Flex") }} 50 shapeConfig: 51 {{- if .OCPUs }} 52 ocpus: "{{.OCPUs}}" 53 {{- end }} 54 {{- if .MemoryGbs }} 55 memoryInGBs: "{{.MemoryGbs}}" 56 {{- end }} 57 {{- end }} 58 --- 59 apiVersion: cluster.x-k8s.io/v1beta1 60 kind: MachineDeployment 61 metadata: 62 name: {{.Name}} 63 namespace: {{$.Namespace}} 64 labels: 65 verrazzano.io/node-pool: {{.Name}} 66 spec: 67 clusterName: {{$.Name}} 68 replicas: {{.Replicas}} 69 selector: 70 matchLabels: null 71 template: 72 spec: 73 bootstrap: 74 configRef: 75 apiVersion: bootstrap.cluster.x-k8s.io/alpha1 76 kind: OCNEConfigTemplate 77 name: {{$.Name}} 78 clusterName: {{$.Name}} 79 infrastructureRef: 80 apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 81 kind: OCIMachineTemplate 82 name: {{.Name}} 83 version: {{$.KubernetesVersion}} 84 {{- end }}