Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bump capi to v0.3.10-rc.0
Browse files Browse the repository at this point in the history
nader-ziada committed Sep 27, 2020
1 parent 110f084 commit f914cf0
Showing 7 changed files with 274 additions and 34 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -419,7 +419,7 @@ create-management-cluster: $(KUSTOMIZE) $(ENVSUBST)
kubectl wait --for=condition=Available --timeout=5m -n cert-manager deployment/cert-manager-webhook

# Deploy CAPI
curl -sSL https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.3.9/cluster-api-components.yaml | $(ENVSUBST) | kubectl apply -f -
curl -sSL https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.3.10-rc.0/cluster-api-components.yaml | $(ENVSUBST) | kubectl apply -f -

# Deploy CAPZ
kind load docker-image $(CONTROLLER_IMG)-$(ARCH):$(TAG) --name=capz
2 changes: 1 addition & 1 deletion Tiltfile
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ settings = {
"deploy_cert_manager": True,
"preload_images_for_kind": True,
"kind_cluster_name": "capz",
"capi_version": "v0.3.9",
"capi_version": "v0.3.10-rc.0",
"cert_manager_version": "v0.16.1",
"kubernetes_version": "v1.18.8",
"aks_kubernetes_version": "v1.17.7"
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -28,8 +28,8 @@ require (
k8s.io/klog v1.0.0
k8s.io/kubectl v0.17.11
k8s.io/utils v0.0.0-20200821003339-5e75c0163111
sigs.k8s.io/cluster-api v0.3.9
sigs.k8s.io/controller-runtime v0.5.10
sigs.k8s.io/cluster-api v0.3.10-rc.0
sigs.k8s.io/controller-runtime v0.5.11
)

replace github.com/Azure/go-autorest => github.com/Azure/go-autorest v14.2.0+incompatible
18 changes: 8 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
@@ -219,6 +219,8 @@ github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+
github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA=
github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/gobuffalo/flect v0.2.2 h1:PAVD7sp0KOdfswjAw9BpLCU9hXo7wFSzgpQ+zNeks/A=
github.com/gobuffalo/flect v0.2.2/go.mod h1:vmkQwuZYhN5Pc4ljYQZzP+1sq+NEkK+lh20jmEmX3jc=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE=
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
@@ -729,16 +731,12 @@ gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
k8s.io/api v0.17.8 h1:8JHlbqJ3A6sGhoacXfu/sASSD+HWWqVq67qt9lyB0kU=
k8s.io/api v0.17.8/go.mod h1:N++Llhs8kCixMUoCaXXAyMMPbo8dDVnh+IQ36xZV2/0=
k8s.io/api v0.17.9/go.mod h1:avJJAA1fSV6tnbCGW2K+S+ilDFW7WpNr5BScoiZ1M1U=
k8s.io/api v0.17.11 h1:FAO+RMv/JhjBawixa33qZNZ2Yb5lNjgGuK8IjN2Ac3s=
k8s.io/api v0.17.11/go.mod h1:WR3CbTwCAxtfMcEB6c92W3l5aZw09unPCyxmxjYV3xg=
k8s.io/apiextensions-apiserver v0.17.9 h1:GWtUr9LErCZBV7QEUIF7wiICPG6wzPukFRrwDv/AIdM=
k8s.io/apiextensions-apiserver v0.17.9/go.mod h1:p2C9cDflVAUPMl5/QOMHxnSzQWF/cDqu7AP2KUXHHMA=
k8s.io/apimachinery v0.17.0/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg=
k8s.io/apimachinery v0.17.8 h1:zXvd8rYMAjRJXpILP9tdAiUnFIENM9EmHuE81apIoms=
k8s.io/apimachinery v0.17.8/go.mod h1:Lg8zZ5iC/O8UjCqW6DNhcQG2m4TdjF9kwG3891OWbbA=
k8s.io/apimachinery v0.17.9/go.mod h1:Lg8zZ5iC/O8UjCqW6DNhcQG2m4TdjF9kwG3891OWbbA=
k8s.io/apimachinery v0.17.11 h1:hgMFLIR+ofBpaPb27lZkf44v3bLn3MLqcbnw32PgoGA=
k8s.io/apimachinery v0.17.11/go.mod h1:q+iFxLyaMeWIBhSlQ4OMkvdwbwrb8Ux0ALl90XD9paU=
@@ -748,8 +746,8 @@ k8s.io/cli-runtime v0.17.11/go.mod h1:2bPKmyTY4YnSmuuO3V70aYS0++YehwJFKT7QTQhztw
k8s.io/client-go v0.17.9/go.mod h1:3cM92qAd1XknA5IRkRfpJhl9OQjkYy97ZEUio70wVnI=
k8s.io/client-go v0.17.11 h1:IswaAabeyBFGzKjz2eFm4QKXgSwBoWLaRolWXLkaY/M=
k8s.io/client-go v0.17.11/go.mod h1:gCpWJ1+skW2CjzFGChniiXrX2e51gflrCsDsbykZLLQ=
k8s.io/cluster-bootstrap v0.17.8 h1:qee9dmkOVwngBf98zbwrij1s898EZ2aHg+ymXw1UBLU=
k8s.io/cluster-bootstrap v0.17.8/go.mod h1:SC9J2Lt/MBOkxcCB04+5mYULLfDQL5kdM0BjtKaVCVU=
k8s.io/cluster-bootstrap v0.17.9 h1:IH/MwGor5/7bwHClz0PO/8pKq+SU1eSB1rs645pGu8Y=
k8s.io/cluster-bootstrap v0.17.9/go.mod h1:Q6nXn/sqVfMvT1VIJVPxFboYAoqH06PCjZnaYzbpZC0=
k8s.io/code-generator v0.17.9/go.mod h1:iiHz51+oTx+Z9D0vB3CH3O4HDDPWrvZyUgUYaIE9h9M=
k8s.io/code-generator v0.17.11/go.mod h1:iiHz51+oTx+Z9D0vB3CH3O4HDDPWrvZyUgUYaIE9h9M=
k8s.io/component-base v0.17.9/go.mod h1:Wg22ePDK0mfTa+bEFgZHGwr0h40lXnYy6D7D+f7itFk=
@@ -779,10 +777,10 @@ modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=
modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs=
modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I=
sigs.k8s.io/cluster-api v0.3.9 h1:WongQFeW+vbII9Karc3nIarxMfuUuTr33QU9aSyiKfs=
sigs.k8s.io/cluster-api v0.3.9/go.mod h1:A7Om/um/j7hvqTvm+KEMEjDOn6fHKRhcVtBiuAH+tYQ=
sigs.k8s.io/controller-runtime v0.5.10 h1:IJ2zO+BeNvTJEo2W1Kho1+X756QroQjYCKIzEYYqsI8=
sigs.k8s.io/controller-runtime v0.5.10/go.mod h1:OTqxLuz7gVcrq+BHGUgedRu6b2VIKCEc7Pu4Jbwui0A=
sigs.k8s.io/cluster-api v0.3.10-rc.0 h1:0TcwqaNbArWmap2awVdZBYOsZONnIav0LUepjejqGmI=
sigs.k8s.io/cluster-api v0.3.10-rc.0/go.mod h1:XBBDBiaczcyNlH4D7FNjSKc5bBofYRppfg0ZgaP2x1U=
sigs.k8s.io/controller-runtime v0.5.11 h1:U/FjGJ61aR2T2mCrdlBCxEcWgLEwLmK6YZKf0NC0a24=
sigs.k8s.io/controller-runtime v0.5.11/go.mod h1:OTqxLuz7gVcrq+BHGUgedRu6b2VIKCEc7Pu4Jbwui0A=
sigs.k8s.io/kind v0.7.1-0.20200303021537-981bd80d3802 h1:L6/8hETA7jvdx3xBcbDifrIN2xaYHE7tA58n+Kdp2Zw=
sigs.k8s.io/kind v0.7.1-0.20200303021537-981bd80d3802/go.mod h1:HIZ3PWUezpklcjkqpFbnYOqaqsAE1JeCTEwkgvPLXjk=
sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU=
14 changes: 8 additions & 6 deletions test/e2e/config/azure-dev.yaml
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@ providers:
- name: cluster-api
type: CoreProvider
versions:
- name: v0.3.9
value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.3.9/core-components.yaml
- name: v0.3.10-rc.0
value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.3.10-rc.0/core-components.yaml
type: url
replacements:
- old: "imagePullPolicy: Always"
@@ -19,8 +19,8 @@ providers:
- name: kubeadm
type: BootstrapProvider
versions:
- name: v0.3.9
value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.3.9/bootstrap-components.yaml
- name: v0.3.10-rc.0
value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.3.10-rc.0/bootstrap-components.yaml
type: url
replacements:
- old: "imagePullPolicy: Always"
@@ -30,8 +30,8 @@ providers:
- name: kubeadm
type: ControlPlaneProvider
versions:
- name: v0.3.9
value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.3.9/control-plane-components.yaml
- name: v0.3.10-rc.0
value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.3.10-rc.0/control-plane-components.yaml
type: url
replacements:
- old: "imagePullPolicy: Always"
@@ -50,6 +50,8 @@ providers:
targetName: "cluster-template-kcp-adoption.yaml"
- sourcePath: "${PWD}/templates/test/cluster-template-prow-ipv6.yaml"
targetName: "cluster-template-ipv6.yaml"
- sourcePath: "../data/infrastructure-azure/cluster-template-mhc.yaml"
targetName: "cluster-template-mhc.yaml"

variables:
KUBERNETES_VERSION: "${KUBERNETES_VERSION:-v1.18.8}"
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
##
# these resources are sequenced by label:
# 1. initial: just the resources to bootstrap an initial controlplane
# 1. kcp-adoption.step1: just the resources to bootstrap an kcp-adoption.step1 controlplane
# 2. kcp: the KCP resources (note the duplicated Cluster to associate the control plane)
##
###
# 1. initial
# 1. kcp-adoption.step1
###

apiVersion: cluster.x-k8s.io/v1alpha3
kind: Cluster
metadata:
name: ${CLUSTER_NAME}
labels:
initial: ''
kcp-adoption.step1: ''
cni: "${CLUSTER_NAME}-crs-0"
spec:
clusterNetwork:
@@ -29,7 +29,7 @@ kind: AzureCluster
metadata:
name: ${CLUSTER_NAME}
labels:
initial: ''
kcp-adoption.step1: ''
spec:
additionalTags:
creationTimestamp: ${TIMESTAMP}
@@ -46,7 +46,7 @@ kind: AzureMachine
metadata:
name: ${CLUSTER_NAME}-control-plane-0
labels:
initial: ''
kcp-adoption.step1: ''
spec:
dataDisks:
- diskSizeGB: 256
@@ -66,7 +66,7 @@ kind: Machine
metadata:
name: ${CLUSTER_NAME}-control-plane-0
labels:
initial: ''
kcp-adoption.step1: ''
cluster.x-k8s.io/control-plane: "true"
spec:
version: ${KUBERNETES_VERSION}
@@ -86,7 +86,7 @@ kind: KubeadmConfig
metadata:
name: ${CLUSTER_NAME}-control-plane-0
labels:
initial: ''
kcp-adoption.step1: ''
spec:
useExperimentalRetryJoin: true
initConfiguration:
@@ -162,7 +162,7 @@ kind: Cluster
metadata:
name: ${CLUSTER_NAME}
labels:
kcp: ''
kcp-adoption.step2: ""
cni: "${CLUSTER_NAME}-crs-0"
spec:
clusterNetwork:
@@ -184,7 +184,7 @@ metadata:
name: ${CLUSTER_NAME}-control-plane
labels:
cluster.x-k8s.io/cluster-name: "${ CLUSTER_NAME }"
kcp: ''
kcp-adoption.step2: ""
spec:
infrastructureTemplate:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
@@ -265,7 +265,7 @@ kind: AzureMachineTemplate
metadata:
name: ${CLUSTER_NAME}-control-plane
labels:
kcp: ''
kcp-adoption.step2: ""
spec:
template:
spec:
@@ -287,17 +287,15 @@ kind: ConfigMap
metadata:
name: "cni-${CLUSTER_NAME}-crs-0"
labels:
initial: ''
kcp: ''
kcp-adoption.step1: ''
data: ${CNI_RESOURCES}
---
apiVersion: addons.cluster.x-k8s.io/v1alpha3
kind: ClusterResourceSet
metadata:
name: "${CLUSTER_NAME}-crs-0"
labels:
initial: ''
kcp: ''
kcp-adoption.step1: ''
spec:
strategy: ApplyOnce
clusterSelector:
242 changes: 242 additions & 0 deletions test/e2e/data/infrastructure-azure/cluster-template-mhc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,242 @@
apiVersion: cluster.x-k8s.io/v1alpha3
kind: Cluster
metadata:
labels:
cni: ${CLUSTER_NAME}-crs-0
name: ${CLUSTER_NAME}
namespace: default
spec:
clusterNetwork:
pods:
cidrBlocks:
- 192.168.0.0/16
controlPlaneRef:
apiVersion: controlplane.cluster.x-k8s.io/v1alpha3
kind: KubeadmControlPlane
name: ${CLUSTER_NAME}-control-plane
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: AzureCluster
name: ${CLUSTER_NAME}
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: AzureCluster
metadata:
name: ${CLUSTER_NAME}
namespace: default
spec:
additionalTags:
creationTimestamp: ${TIMESTAMP}
jobName: ${JOB_NAME}
location: ${AZURE_LOCATION}
networkSpec:
vnet:
name: ${AZURE_VNET_NAME:=${CLUSTER_NAME}-vnet}
resourceGroup: ${AZURE_RESOURCE_GROUP:=${CLUSTER_NAME}}
subscriptionID: ${AZURE_SUBSCRIPTION_ID}
---
apiVersion: controlplane.cluster.x-k8s.io/v1alpha3
kind: KubeadmControlPlane
metadata:
name: ${CLUSTER_NAME}-control-plane
namespace: default
spec:
infrastructureTemplate:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
kubeadmConfigSpec:
clusterConfiguration:
apiServer:
extraArgs:
cloud-config: /etc/kubernetes/azure.json
cloud-provider: azure
extraVolumes:
- hostPath: /etc/kubernetes/azure.json
mountPath: /etc/kubernetes/azure.json
name: cloud-config
readOnly: true
timeoutForControlPlane: 20m
controllerManager:
extraArgs:
allocate-node-cidrs: "false"
cloud-config: /etc/kubernetes/azure.json
cloud-provider: azure
cluster-name: ${CLUSTER_NAME}
extraVolumes:
- hostPath: /etc/kubernetes/azure.json
mountPath: /etc/kubernetes/azure.json
name: cloud-config
readOnly: true
etcd:
local:
dataDir: /var/lib/etcddisk/etcd
diskSetup:
filesystems:
- device: /dev/disk/azure/scsi1/lun0
extraOpts:
- -E
- lazy_itable_init=1,lazy_journal_init=1
filesystem: ext4
label: etcd_disk
- device: ephemeral0.1
filesystem: ext4
label: ephemeral0
replaceFS: ntfs
partitions:
- device: /dev/disk/azure/scsi1/lun0
layout: true
overwrite: false
tableType: gpt
files:
- contentFrom:
secret:
key: azure.json
name: ${CLUSTER_NAME}-control-plane-azure-json
owner: root:root
path: /etc/kubernetes/azure.json
permissions: "0644"
initConfiguration:
nodeRegistration:
kubeletExtraArgs:
cloud-config: /etc/kubernetes/azure.json
cloud-provider: azure
name: '{{ ds.meta_data["local_hostname"] }}'
joinConfiguration:
nodeRegistration:
kubeletExtraArgs:
cloud-config: /etc/kubernetes/azure.json
cloud-provider: azure
name: '{{ ds.meta_data["local_hostname"] }}'
mounts:
- - LABEL=etcd_disk
- /var/lib/etcddisk
useExperimentalRetryJoin: true
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
version: ${KUBERNETES_VERSION}
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: AzureMachineTemplate
metadata:
name: ${CLUSTER_NAME}-control-plane
namespace: default
spec:
template:
spec:
dataDisks:
- diskSizeGB: 256
lun: 0
nameSuffix: etcddisk
location: ${AZURE_LOCATION}
osDisk:
diskSizeGB: 128
managedDisk:
storageAccountType: Premium_LRS
osType: Linux
sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""}
vmSize: ${AZURE_CONTROL_PLANE_MACHINE_TYPE}
---
apiVersion: cluster.x-k8s.io/v1alpha3
kind: MachineDeployment
metadata:
name: ${CLUSTER_NAME}-md-0
namespace: default
spec:
clusterName: ${CLUSTER_NAME}
replicas: ${WORKER_MACHINE_COUNT}
selector:
matchLabels: null
template:
metadata:
labels:
nodepool: pool1
spec:
bootstrap:
configRef:
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3
kind: KubeadmConfigTemplate
name: ${CLUSTER_NAME}-md-0
clusterName: ${CLUSTER_NAME}
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-md-0
version: ${KUBERNETES_VERSION}
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: AzureMachineTemplate
metadata:
name: ${CLUSTER_NAME}-md-0
namespace: default
spec:
template:
spec:
location: ${AZURE_LOCATION}
osDisk:
diskSizeGB: 128
managedDisk:
storageAccountType: Premium_LRS
osType: Linux
sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""}
vmSize: ${AZURE_NODE_MACHINE_TYPE}
---
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3
kind: KubeadmConfigTemplate
metadata:
name: ${CLUSTER_NAME}-md-0
namespace: default
spec:
template:
spec:
files:
- contentFrom:
secret:
key: azure.json
name: ${CLUSTER_NAME}-md-0-azure-json
owner: root:root
path: /etc/kubernetes/azure.json
permissions: "0644"
joinConfiguration:
nodeRegistration:
kubeletExtraArgs:
cloud-config: /etc/kubernetes/azure.json
cloud-provider: azure
name: '{{ ds.meta_data["local_hostname"] }}'
useExperimentalRetryJoin: true
---
apiVersion: cluster.x-k8s.io/v1alpha3
kind: MachineHealthCheck
metadata:
name: ${CLUSTER_NAME}-mhc-0
namespace: default
spec:
clusterName: ${CLUSTER_NAME}
maxUnhealthy: 100%
selector:
matchLabels:
nodepool: pool1
unhealthyConditions:
- status: "True"
timeout: 30s
type: E2ENodeUnhealthy
---
apiVersion: v1
data: ${CNI_RESOURCES}
kind: ConfigMap
metadata:
name: cni-${CLUSTER_NAME}-crs-0
namespace: default
---
apiVersion: addons.cluster.x-k8s.io/v1alpha3
kind: ClusterResourceSet
metadata:
name: ${CLUSTER_NAME}-crs-0
namespace: default
spec:
clusterSelector:
matchLabels:
cni: ${CLUSTER_NAME}-crs-0
resources:
- kind: ConfigMap
name: cni-${CLUSTER_NAME}-crs-0
strategy: ApplyOnce

0 comments on commit f914cf0

Please sign in to comment.