Update CAPG test site to support phase run

Added support for following phases in CAPG provider
 clusterctl-init-ephemeral
 controlplane-ephemeral
 initinfra-target
 clusterctl-init-target
 clusterctl-move
 workers-target

Added support for deploying calico CNI for CAPG
through initinfra-target phase

Relates-To: #425
Change-Id: I91b29e561444d82d33802157eba5a1d94b25ba04
This commit is contained in:
Ratnopam Chakrabarti 2020-11-29 15:01:49 -05:00
parent e187740af8
commit e9f9d27732
17 changed files with 64 additions and 60 deletions

View File

@ -9,28 +9,28 @@ patchesJson6902:
group: infrastructure.cluster.x-k8s.io
version: v1alpha3
kind: GCPCluster
name: "gtc"
name: "target-cluster"
path: project_name.json
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha3
kind: GCPCluster
name: "gtc"
name: "target-cluster"
path: region_name.json
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha3
kind: GCPCluster
name: "gtc"
name: "target-cluster"
path: network_name.json
- target:
group: controlplane.cluster.x-k8s.io
version: v1alpha3
kind: KubeadmControlPlane
name: "gtc-control-plane"
name: "target-cluster-control-plane"
path: machine_count.json
@ -38,6 +38,6 @@ patchesJson6902:
group: infrastructure.cluster.x-k8s.io
version: v1alpha3
kind: GCPMachineTemplate
name: "gtc-control-plane"
name: "target-cluster-control-plane"
path: machine_type.json

View File

@ -0,0 +1,3 @@
[
{ "op": "replace","path": "/spec/network/name","value": "network01" }
]

View File

@ -0,0 +1,3 @@
[
{ "op": "replace","path": "/spec/project","value": "project01"}
]

View File

@ -0,0 +1,3 @@
[
{ "op": "replace","path": "/spec/region","value": "us-east1" }
]

View File

@ -0,0 +1,18 @@
[{
"op": "replace",
"path": "/init-options/infrastructure-providers",
"value": ["gcp:v0.3.0"]
},
{
"op": "replace",
"path": "/providers/0",
"value": {
"name": "gcp",
"type": "InfrastructureProvider",
"variable-substitution": true,
"versions": {
"v0.3.0": "airshipctl/manifests/function/capg/v0.3.0"
}
}
}
]

View File

@ -0,0 +1,11 @@
resources:
- ../../../phases
patchesStrategicMerge:
- plan.yaml
patchesJson6902:
- target:
group: airshipit.org
version: v1alpha1
kind: Clusterctl
name: "clusterctl_init"
path: infrastructure-providers.json

View File

@ -0,0 +1,13 @@
apiVersion: airshipit.org/v1alpha1
kind: PhasePlan
metadata:
name: phasePlan
phaseGroups:
- name: group1
phases:
- name: clusterctl-init-ephemeral
- name: controlplane-ephemeral
- name: initinfra-target
- name: clusterctl-init-target
- name: clusterctl-move
- name: workers-target

View File

@ -1,39 +0,0 @@
apiVersion: airshipit.org/v1alpha1
kind: Clusterctl
metadata:
labels:
airshipit.org/deploy-k8s: "false"
name: clusterctl-v1
init-options:
core-provider: "cluster-api:v0.3.3"
bootstrap-providers:
- "kubeadm:v0.3.3"
infrastructure-providers:
- "gcp:v0.3.0"
control-plane-providers:
- "kubeadm:v0.3.3"
providers:
- name: "gcp"
type: "InfrastructureProvider"
variable-substitution: true
versions:
v0.3.0: manifests/function/capg/v0.3.0
- name: "kubeadm"
type: "BootstrapProvider"
versions:
v0.3.3: manifests/function/cabpk/v0.3.3
- name: "cluster-api"
type: "CoreProvider"
versions:
v0.3.3: manifests/function/capi/v0.3.3
- name: "kubeadm"
type: "ControlPlaneProvider"
versions:
v0.3.3: manifests/function/cacpk/v0.3.3
additional-vars:
GCP_CONTROL_PLANE_MACHINE_TYPE: "YmFzZTY0X2VuY29kZWRfdmFsdWU="
GCP_NODE_MACHINE_TYPE: "YmFzZTY0X2VuY29kZWRfdmFsdWU="
GCP_PROJECT: "YmFzZTY0X2VuY29kZWRfdmFsdWU="
GCP_REGION: "YmFzZTY0X2VuY29kZWRfdmFsdWU="
GCP_NETWORK_NAME: "YmFzZTY0X2VuY29kZWRfdmFsdWU="
GCP_B64ENCODED_CREDENTIALS: "YmFzZTY0X2VuY29kZWRfdmFsdWU="

View File

@ -1,2 +0,0 @@
resources:
- clusterctl.yaml

View File

@ -1,3 +0,0 @@
[
{ "op": "replace","path": "/spec/network/name","value": "default" }
]

View File

@ -1,3 +0,0 @@
[
{ "op": "replace","path": "/spec/project","value": "<project_id>"}
]

View File

@ -1,3 +0,0 @@
[
{ "op": "replace","path": "/spec/region","value": "us-west1" }
]

View File

@ -1,4 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../shared/clusterctl
- ../../../../composite/infra
commonLabels:
airshipit.org/stage: initinfra

View File

@ -1,3 +1,3 @@
[
{ "op": "replace","path": "/spec/template/spec/failureDomain","value": "us-west1-a" }
{ "op": "replace","path": "/spec/template/spec/failureDomain","value": "us-east1-b" }
]

View File

@ -10,19 +10,19 @@ patchesJson6902:
group: cluster.x-k8s.io
version: v1alpha3
kind: MachineDeployment
name: "gtc-md-0"
name: "target-cluster-md-0"
path: failure_domain.json
- target:
group: cluster.x-k8s.io
version: v1alpha3
kind: MachineDeployment
name: "gtc-md-0"
name: "target-cluster-md-0"
path: machine_count.json
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha3
kind: GCPMachineTemplate
name: "gtc-md-0"
name: "target-cluster-md-0"
path: machine_type.json