Skip to content

Commit

Permalink
Adjusted how the skipPhases work by enabling a list to be passed thro…
Browse files Browse the repository at this point in the history
…ugh and also added more to the comment explaining what it is.
  • Loading branch information
drew-viles committed Jul 18, 2024
1 parent 991b773 commit 1612068
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ metadata:
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 @@ -27,9 +26,11 @@ spec:
node-labels: {{- include "openstack.nodelabels.control-plane" . | nindent 12 }}
taints:
{{- include "openstack.taints.control-plane" . | nindent 8 }}
{{- if .Values.controlPlane.skipKubeProxy }}
{{- if .Values.controlPlane.kubeadmSkipPhases }}
skipPhases:
- addon/kube-proxy
{{- range .Values.controlPlane.kubeadmSkipPhases }}
- {{ . }}
{{- end }}
{{- end }}
joinConfiguration:
nodeRegistration:
Expand Down
5 changes: 4 additions & 1 deletion charts/cluster-api-cluster-openstack/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,10 @@
"$ref": "#/$defs/machine"
},
"skipKubeProxy": {
"type": "boolean"
"type": "array",
"items": {
"type": "string"
}
}
}
},
Expand Down
11 changes: 9 additions & 2 deletions charts/cluster-api-cluster-openstack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,15 @@ controlPlane:
# Number of control plane machines.
replicas: 3

# Skips the kube proxy init phase in kubeadm.
skipKubeProxy: false
# kubeadm uses phases to init a node.
# https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-init-phase
# Any phase can be skipped by adding --skip-phase NAME to the kubeadm init command.
# To skip kubeadm phases in Unikorn, you can supply a list below
# WARNING: Skipping phases may cause cluster instability so make sure you know what you're skipping before enabling this!
# List of Phases: https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-init/
kubeadmSkipPhases: []
# - addon/kube-proxy
# - addon/coredns

# Defines the physical properties of a machine.
# Modifications to this object will trigger a control plane upgrade.
Expand Down

0 comments on commit 1612068

Please sign in to comment.