-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add clusterclass template back
Signed-off-by: Carlos Salas <[email protected]>
- Loading branch information
1 parent
d3a98c8
commit 7961037
Showing
2 changed files
with
169 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
168 changes: 168 additions & 0 deletions
168
test/e2e/data/infrastructure-gcp/clusterclass-quick-start.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,168 @@ | ||
--- | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: ClusterClass | ||
metadata: | ||
name: quick-start | ||
spec: | ||
controlPlane: | ||
ref: | ||
apiVersion: controlplane.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmControlPlaneTemplate | ||
name: quick-start-control-plane | ||
machineInfrastructure: | ||
ref: | ||
kind: GCPMachineTemplate | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
name: quick-start-control-plane | ||
infrastructure: | ||
ref: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: GCPClusterTemplate | ||
name: quick-start | ||
workers: | ||
machineDeployments: | ||
- class: default-worker | ||
template: | ||
bootstrap: | ||
ref: | ||
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmConfigTemplate | ||
name: quick-start-worker-bootstraptemplate | ||
infrastructure: | ||
ref: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: GCPMachineTemplate | ||
name: quick-start-worker-machinetemplate | ||
variables: | ||
- name: region | ||
required: true | ||
schema: | ||
openAPIV3Schema: | ||
type: string | ||
default: us-west1 | ||
- name: controlPlaneMachineType | ||
required: true | ||
schema: | ||
openAPIV3Schema: | ||
type: string | ||
default: n1-standard-2 | ||
- name: workerMachineType | ||
required: true | ||
schema: | ||
openAPIV3Schema: | ||
type: string | ||
default: n1-standard-2 | ||
patches: | ||
- name: region | ||
definitions: | ||
- selector: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: GCPClusterTemplate | ||
matchResources: | ||
infrastructureCluster: true | ||
jsonPatches: | ||
- op: add | ||
path: /spec/template/spec/region | ||
valueFrom: | ||
variable: region | ||
- name: controlPlaneMachineType | ||
definitions: | ||
- selector: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: GCPMachineTemplate | ||
matchResources: | ||
controlPlane: true | ||
jsonPatches: | ||
- op: replace | ||
path: /spec/template/spec/instanceType | ||
valueFrom: | ||
variable: controlPlaneMachineType | ||
- name: workerMachineType | ||
definitions: | ||
- selector: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: GCPMachineTemplate | ||
matchResources: | ||
machineDeploymentClass: | ||
names: | ||
- default-worker | ||
jsonPatches: | ||
- op: replace | ||
path: /spec/template/spec/instanceType | ||
valueFrom: | ||
variable: workerMachineType | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: GCPClusterTemplate | ||
metadata: | ||
name: quick-start | ||
spec: | ||
template: | ||
spec: | ||
project: "${GCP_PROJECT}" | ||
region: "${GCP_REGION}" | ||
network: | ||
name: "${GCP_NETWORK_NAME}" | ||
--- | ||
apiVersion: controlplane.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmControlPlaneTemplate | ||
metadata: | ||
name: quick-start-control-plane | ||
spec: | ||
template: | ||
spec: | ||
kubeadmConfigSpec: | ||
useExperimentalRetryJoin: true | ||
initConfiguration: | ||
nodeRegistration: | ||
name: '{{ ds.meta_data.local_hostname.split(".")[0] }}' | ||
kubeletExtraArgs: | ||
cloud-provider: gce | ||
clusterConfiguration: | ||
apiServer: | ||
timeoutForControlPlane: 20m | ||
extraArgs: | ||
cloud-provider: gce | ||
controllerManager: | ||
extraArgs: | ||
cloud-provider: gce | ||
allocate-node-cidrs: "false" | ||
joinConfiguration: | ||
nodeRegistration: | ||
name: '{{ ds.meta_data.local_hostname.split(".")[0] }}' | ||
kubeletExtraArgs: | ||
cloud-provider: gce | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: GCPMachineTemplate | ||
metadata: | ||
name: quick-start-control-plane | ||
spec: | ||
template: | ||
spec: | ||
instanceType: REPLACEME | ||
image: "${IMAGE_ID}" | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: GCPMachineTemplate | ||
metadata: | ||
name: quick-start-worker-machinetemplate | ||
spec: | ||
template: | ||
spec: | ||
instanceType: REPLACEME | ||
image: "${IMAGE_ID}" | ||
--- | ||
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmConfigTemplate | ||
metadata: | ||
name: quick-start-worker-bootstraptemplate | ||
spec: | ||
template: | ||
spec: | ||
joinConfiguration: | ||
nodeRegistration: | ||
name: '{{ ds.meta_data.local_hostname.split(".")[0] }}' | ||
kubeletExtraArgs: | ||
cloud-provider: gce | ||
|