Skip to content

Commit

Permalink
feat: added ability to skip kube-proxy and registering CP nodes
Browse files Browse the repository at this point in the history
* option to skip kube-proxy phase of kubeadm init - defaults to false
* option to register the node - defaults to true
  • Loading branch information
drew-viles committed Jul 18, 2024
1 parent 9f75951 commit 4e8af7c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Update this for every tagged release.
CHART_VERSION = v0.2.0
CHART_VERSION = v0.3.0

# Defines the versions to use for cluster API components.
CAPI_VERSION = v1.7.4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ metadata:
labels:
{{- include "openstackcluster.labels" . | nindent 4 }}
annotations:
controlplane.cluster.x-k8s.io/skip-kube-proxy: "{{ .Values.controlPlane.skipKubeProxy }}"
# Let CAPO do this in its chosen order.
argocd.argoproj.io/sync-options: Delete=false

spec:
version: "{{ .Values.controlPlane.version }}"
replicas: {{ .Values.controlPlane.replicas }}
Expand All @@ -25,6 +27,10 @@ spec:
node-labels: {{- include "openstack.nodelabels.control-plane" . | nindent 12 }}
taints:
{{- include "openstack.taints.control-plane" . | nindent 8 }}
{{- if .Values.controlPlane.skipKubeProxy }}
skipPhases:
- addon/kube-proxy
{{- end }}
joinConfiguration:
nodeRegistration:
name: {{ "'{{ local_hostname }}'" }}
Expand Down
3 changes: 3 additions & 0 deletions charts/cluster-api-cluster-openstack/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,9 @@
},
"machine": {
"$ref": "#/$defs/machine"
},
"skipKubeProxy": {
"type": "boolean"
}
}
},
Expand Down
15 changes: 9 additions & 6 deletions charts/cluster-api-cluster-openstack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,22 @@ openstack:
# Modifications to this object will trigger a control plane upgrade.
controlPlane:
# Version of Kubernetes, should match that installed on the base images.
version: v1.25.2
version: v1.30.2

# Number of control plane machines.
replicas: 3

# Skips the kube proxy init phase in kubeadm.
skipKubeProxy: false

# Defines the physical properties of a machine.
# Modifications to this object will trigger a control plane upgrade.
machine:
# Openstack image name.
imageID: f810a963-437d-4a24-a972-a0bff942542b

# Control plane machine type.
flavorID: 6ac45c49-3e3b-4cdf-acbc-d98a321a92c0
# Control plane machine type (This is the name of the flavor rather than the actual ID)
flavorID: some-flavor-name

# Ephemeral disk size in GiB. If specified this overrides the default
# size for the flavor.
Expand All @@ -100,7 +103,7 @@ controlPlane:
# default:
# # Version of Kubernetes, should match that installed on the base images
# # in order to improve provisioning and scaling time.
# version: v1.25.2
# version: v1.30.2
#
# # Number of workload machines.
# replicas: 3
Expand All @@ -111,8 +114,8 @@ controlPlane:
# # Openstack image name.
# imageID: f810a963-437d-4a24-a972-a0bff942542b
#
# # Workload machine type.
# flavorID: 6ac45c49-3e3b-4cdf-acbc-d98a321a92c0
# # Workload machine type (This is the name of the flavor rather than the actual ID).
# flavorID: some-flavor-name
#
# # Ephemeral disk size in GiB. If specified this overrides the default
# # size for the flavor.
Expand Down

0 comments on commit 4e8af7c

Please sign in to comment.