Skip to content

Commit

Permalink
Upgrade CAPI and CAPO to v1.7.2 / v0.10.3 (#4)
Browse files Browse the repository at this point in the history
* Update CAPI and CAPO to v1.7.2 / v0.10.3
* Update dependents
* Amend CAPO resource definitions to use v1beta1
* Template updates for v1beta1
* Bump cluster-openstack Chart version
  • Loading branch information
yankcrime authored May 28, 2024
1 parent 23c3610 commit 21cc229
Show file tree
Hide file tree
Showing 46 changed files with 26,005 additions and 9,300 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Update this for every tagged release.
CHART_VERSION = v0.1.11
CHART_VERSION = v0.2.0

# Defines the versions to use for cluster API components.
CAPI_VERSION = v1.6.2
CAPO_VERSION = v0.9.0
CAPI_VERSION = v1.7.2
CAPO_VERSION = v0.10.3

# All the charts we can generate.
CHARTS = cluster-api-core \
Expand Down
4 changes: 2 additions & 2 deletions charts/cluster-api-bootstrap-kubeadm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
appVersion: v1.6.2
appVersion: v1.7.2
description: A Helm chart for deploying cluster API.
icon: https://assets.unikorn-cloud.org/assets/images/logos/dark-on-light/icon.png
name: cluster-api-bootstrap-kubeadm
type: application
version: v0.1.11
version: v0.2.0

Large diffs are not rendered by default.

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions charts/cluster-api-bootstrap-kubeadm/templates/deployment-0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@ spec:
- --logging-format=json
command:
- /manager
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_UID
valueFrom:
fieldRef:
fieldPath: metadata.uid
image: '{{ .Values.image }}'
imagePullPolicy: IfNotPresent
livenessProbe:
Expand Down
4 changes: 2 additions & 2 deletions charts/cluster-api-bootstrap-kubeadm/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
capi_diagnostics_address: :8443
capi_insecure_diagnostics: false
exp_kubeadm_bootstrap_format_ignition: false
exp_machine_pool: false
image: registry.k8s.io/cluster-api/kubeadm-bootstrap-controller:v1.6.2
exp_machine_pool: true
image: registry.k8s.io/cluster-api/kubeadm-bootstrap-controller:v1.7.2
kubeadm_bootstrap_token_ttl: 15m
2 changes: 1 addition & 1 deletion charts/cluster-api-cluster-openstack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: cluster-api-cluster-openstack
description: A Helm chart to deploy a Kubernetes Cluster
type: application
version: v0.3.27
version: v0.4.0
icon: https://raw.githubusercontent.com/unikorn-cloud/helm-cluster-api/main/icons/default.png
22 changes: 10 additions & 12 deletions charts/cluster-api-cluster-openstack/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ spec:
{{- end }}
serviceDomain: "cluster.local"
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: OpenStackCluster
name: {{ include "openstackcluster.name" . }}
controlPlaneRef:
kind: KubeadmControlPlane
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
name: {{ include "kubeadmcontrolplane.name" . }}
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: OpenStackCluster
metadata:
name: {{ include "openstackcluster.name" . }}
Expand All @@ -37,10 +37,9 @@ metadata:
# Let CAPO do this in its chosen order.
argocd.argoproj.io/sync-options: Delete=false
spec:
cloudName: {{ .Values.openstack.cloud }}
identityRef:
name: {{ include "cloudconfig.name" . }}
kind: Secret
cloudName: {{ .Values.openstack.cloud }}
apiServerLoadBalancer:
enabled: true
{{- with $api := .Values.api }}
Expand All @@ -51,14 +50,13 @@ spec:
{{- end }}
{{- end }}
{{- end }}
managedSecurityGroups: true
allowAllInClusterTraffic: true
nodeCidr: {{ .Values.network.nodeCIDR }}
dnsNameservers:
{{- range .Values.network.dnsNameservers}}
{{- printf "- %s" . | nindent 2 }}
{{- end }}
externalNetworkId: {{ .Values.openstack.externalNetworkID }}
managedSecurityGroups:
allowAllInClusterTraffic: true
managedSubnets:
- cidr: {{ .Values.network.nodeCIDR }}
dnsNameservers: {{ toJson .Values.network.dnsNameservers }}
externalNetwork:
id: {{ .Values.openstack.externalNetworkID }}
---
apiVersion: v1
kind: Secret
Expand Down
20 changes: 12 additions & 8 deletions charts/cluster-api-cluster-openstack/templates/control-plane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
machineTemplate:
infrastructureRef:
kind: OpenStackMachineTemplate
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
name: {{ include "controlplane.openstackmachinetemplate.name" . }}
kubeadmConfigSpec:
initConfiguration:
Expand Down Expand Up @@ -60,7 +60,7 @@ spec:
authorization-always-allow-paths: "/healthz,/readyz,/livez,/metrics"
bind-address: "0.0.0.0"
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: OpenStackMachineTemplate
metadata:
name: {{ include "controlplane.openstackmachinetemplate.name" . }}
Expand All @@ -73,23 +73,27 @@ spec:
template:
spec:
flavor: {{ .Values.controlPlane.machine.flavor }}
image: {{ .Values.controlPlane.machine.image }}
image:
filter:
name: {{ .Values.controlPlane.machine.image }}
{{- if .Values.openstack.sshKeyName }}
sshKeyName: {{ .Values.openstack.sshKeyName }}
{{- end }}
cloudName: {{ .Values.openstack.cloud }}
identityRef:
name: {{ include "cloudconfig.name" . }}
kind: Secret
cloudName: {{ .Values.openstack.cloud }}
{{- if .Values.controlPlane.machine.disk }}
rootVolume:
availabilityZone: {{ .Values.openstack.volumeFailureDomain }}
diskSize: {{ .Values.controlPlane.machine.disk.size }}
sizeGiB: {{ .Values.controlPlane.machine.disk.size }}
{{- end }}
{{- with $cluster := .Values.cluster -}}
{{- with $metadata := $cluster.serverMetadata -}}
{{- printf "serverMetadata:" | nindent 6 }}
{{- toYaml $metadata | nindent 8 }}
{{- printf "serverMetadata:" | nindent 6 -}}
{{ range $k, $v := $metadata -}}
{{- printf "- key: %s" $k | nindent 6 -}}
{{- printf " value: %s" $v | nindent 6 -}}
{{ end -}}
{{- end }}
{{- end }}
{{- if .Values.controlPlane.machine.serverGroupID }}
Expand Down
20 changes: 12 additions & 8 deletions charts/cluster-api-cluster-openstack/templates/workload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ spec:
kind: KubeadmConfigTemplate
infrastructureRef:
name: {{ $pool_name_discriminated }}
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: OpenStackMachineTemplate
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: OpenStackMachineTemplate
metadata:
name: {{ $pool_name_discriminated }}
Expand All @@ -64,24 +64,28 @@ metadata:
spec:
template:
spec:
cloudName: {{ $.Values.openstack.cloud }}
identityRef:
name: {{ include "cloudconfig.name" $ }}
kind: Secret
cloudName: {{ $.Values.openstack.cloud }}
flavor: {{ $pool.machine.flavor }}
image: {{ $pool.machine.image }}
image:
filter:
name: {{ $pool.machine.image }}
{{- if $.Values.openstack.sshKeyName }}
sshKeyName: {{ $.Values.openstack.sshKeyName }}
{{- end }}
{{- with $disk := $pool.machine.disk }}
rootVolume:
availabilityZone: {{ include "openstack.failureDomain.volume.workload" $context }}
diskSize: {{ $disk.size }}
sizeGiB: {{ $disk.size }}
{{- end }}
{{- with $cluster := $.Values.cluster -}}
{{- with $metadata := $cluster.serverMetadata -}}
{{- printf "serverMetadata:" | nindent 6 }}
{{- toYaml $metadata | nindent 8 }}
{{- printf "serverMetadata:" | nindent 6 -}}
{{ range $k, $v := $metadata -}}
{{- printf "- key: %s" $k | nindent 6 -}}
{{- printf " value: %s" $v | nindent 6 -}}
{{ end -}}
{{- end }}
{{- end }}
---
Expand Down
4 changes: 2 additions & 2 deletions charts/cluster-api-cluster-openstack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ controlPlane:
# Control plane machine type.
flavor: m1.large

# Ephemeral disk size in GB. If specified this overrides the default
# Ephemeral disk size in GiB. If specified this overrides the default
# size for the flavor.
# diskSize: 80

Expand All @@ -111,7 +111,7 @@ controlPlane:
# # Workload machine type.
# flavor: m1.large
#
# # Ephemeral disk size in GB. If specified this overrides the default
# # Ephemeral disk size in GiB. If specified this overrides the default
# # size for the flavor.
# diskSize: 160
#
Expand Down
4 changes: 2 additions & 2 deletions charts/cluster-api-control-plane-kubeadm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
appVersion: v1.6.2
appVersion: v1.7.2
description: A Helm chart for deploying cluster API.
icon: https://assets.unikorn-cloud.org/assets/images/logos/dark-on-light/icon.png
name: cluster-api-control-plane-kubeadm
type: application
version: v0.1.11
version: v0.2.0
Loading

0 comments on commit 21cc229

Please sign in to comment.