From f6a5692a084b1f9006945969bbfc3f3710bebb65 Mon Sep 17 00:00:00 2001 From: Deepak Sharma Date: Fri, 10 Dec 2021 15:15:00 +0530 Subject: [PATCH] fix sample and metadata (#32) --- examples/sample-cp-only.yaml | 23 +++++++++---------- examples/sample-with-workerpool.yaml | 33 ++++++++++++++-------------- metadata.yaml | 3 +++ 3 files changed, 32 insertions(+), 27 deletions(-) diff --git a/examples/sample-cp-only.yaml b/examples/sample-cp-only.yaml index e180df0..d5e0c64 100644 --- a/examples/sample-cp-only.yaml +++ b/examples/sample-cp-only.yaml @@ -1,5 +1,5 @@ # Creates a cluster with one control-plane node and one worker node -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 +apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 kind: MaasCluster metadata: name: my-cluster @@ -11,7 +11,7 @@ spec: dnsDomain: maas.sc failureDomains: ['az1'] --- -apiVersion: cluster.x-k8s.io/v1alpha3 +apiVersion: cluster.x-k8s.io/v1alpha4 kind: Cluster metadata: name: my-cluster @@ -24,17 +24,17 @@ spec: cidrBlocks: ["192.168.0.0/16"] serviceDomain: "cluster.local" controlPlaneRef: - apiVersion: controlplane.cluster.x-k8s.io/v1alpha3 + apiVersion: controlplane.cluster.x-k8s.io/v1alpha4 kind: KubeadmControlPlane name: controlplane namespace: default infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 kind: MaasCluster name: my-cluster namespace: default --- -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 +apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 kind: MaasMachineTemplate metadata: name: controlplane @@ -46,7 +46,7 @@ spec: minMemory: 8192 image: u-1804-0-k-1208-0 --- -apiVersion: controlplane.cluster.x-k8s.io/v1alpha3 +apiVersion: controlplane.cluster.x-k8s.io/v1alpha4 kind: KubeadmControlPlane metadata: name: controlplane @@ -54,11 +54,12 @@ metadata: spec: replicas: 1 version: v1.20.8 - infrastructureTemplate: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 - kind: MaasMachineTemplate - name: controlplane - namespace: default + machineTemplate: + infrastructureRef: + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 + kind: MaasMachineTemplate + name: controlplane + namespace: default kubeadmConfigSpec: clusterConfiguration: apiServer: diff --git a/examples/sample-with-workerpool.yaml b/examples/sample-with-workerpool.yaml index 524999d..347e2d8 100644 --- a/examples/sample-with-workerpool.yaml +++ b/examples/sample-with-workerpool.yaml @@ -1,5 +1,5 @@ # Creates a cluster with one control-plane node and one worker node -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 +apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 kind: MaasCluster metadata: name: my-cluster @@ -7,7 +7,7 @@ spec: dnsDomain: maas.sc --- -apiVersion: cluster.x-k8s.io/v1alpha3 +apiVersion: cluster.x-k8s.io/v1alpha4 kind: Cluster metadata: name: my-cluster @@ -19,17 +19,17 @@ spec: cidrBlocks: ["192.168.0.0/16"] serviceDomain: "cluster.local" controlPlaneRef: - apiVersion: controlplane.cluster.x-k8s.io/v1alpha3 + apiVersion: controlplane.cluster.x-k8s.io/v1alpha4 kind: KubeadmControlPlane name: my-cluster-cp namespace: default infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 kind: MaasCluster name: my-cluster namespace: default --- -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 +apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 kind: MaasMachineTemplate metadata: name: my-cluster-cp @@ -41,7 +41,7 @@ spec: minMemory: 8192 image: u-1804-0-k-11912-0 --- -apiVersion: controlplane.cluster.x-k8s.io/v1alpha3 +apiVersion: controlplane.cluster.x-k8s.io/v1alpha4 kind: KubeadmControlPlane metadata: name: my-cluster-cp @@ -49,11 +49,12 @@ metadata: spec: replicas: 1 version: v1.19.12 - infrastructureTemplate: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 - kind: MaasMachineTemplate - name: my-cluster-cp - namespace: default + machineTemplate: + infrastructureRef: + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 + kind: MaasMachineTemplate + name: my-cluster-cp + namespace: default kubeadmConfigSpec: clusterConfiguration: apiServer: @@ -107,7 +108,7 @@ spec: useExperimentalRetryJoin: true --- status: -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 +apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 kind: MaasMachineTemplate metadata: name: my-cluster-worker @@ -119,7 +120,7 @@ spec: minMemory: 8192 image: u-1804-0-k-11912-0 --- -apiVersion: cluster.x-k8s.io/v1alpha3 +apiVersion: cluster.x-k8s.io/v1alpha4 kind: MachineDeployment metadata: name: my-cluster-worker @@ -136,15 +137,15 @@ spec: version: 1.19.12 bootstrap: configRef: - apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3 + apiVersion: bootstrap.cluster.x-k8s.io/v1alpha4 kind: KubeadmConfigTemplate name: my-cluster-worker infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 kind: MaasMachineTemplate name: my-cluster-worker --- -apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3 +apiVersion: bootstrap.cluster.x-k8s.io/v1alpha4 kind: KubeadmConfigTemplate metadata: name: my-cluster-worker diff --git a/metadata.yaml b/metadata.yaml index 30ac4e0..7a888ca 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -11,3 +11,6 @@ releaseSeries: - major: 0 minor: 2 contract: v1alpha4 + - major: 0 + minor: 3 + contract: v1alpha4