diff --git a/charts/openstack-cloud-controller-manager/Chart.yaml b/charts/openstack-cloud-controller-manager/Chart.yaml index 00782c7123..2c23035744 100644 --- a/charts/openstack-cloud-controller-manager/Chart.yaml +++ b/charts/openstack-cloud-controller-manager/Chart.yaml @@ -4,7 +4,7 @@ description: Openstack Cloud Controller Manager Helm Chart icon: https://object-storage-ca-ymq-1.vexxhost.net/swift/v1/6e4619c416ff4bd19e1c087f27a43eea/www-images-prod/openstack-logo/OpenStack-Logo-Vertical.png home: https://github.com/kubernetes/cloud-provider-openstack name: openstack-cloud-controller-manager -version: 2.34.2 +version: 2.35.0 maintainers: - name: eumel8 email: f.kloeker@telekom.de diff --git a/charts/openstack-cloud-controller-manager/templates/daemonset.yaml b/charts/openstack-cloud-controller-manager/templates/daemonset.yaml index 40f98ea3f8..e520680242 100644 --- a/charts/openstack-cloud-controller-manager/templates/daemonset.yaml +++ b/charts/openstack-cloud-controller-manager/templates/daemonset.yaml @@ -1,5 +1,5 @@ apiVersion: apps/v1 -kind: DaemonSet +kind: {{ .Values.controllerKind }} metadata: name: {{ include "occm.name" . }} labels: {{- include "common.labels.standard" . | nindent 4 }} @@ -12,8 +12,14 @@ spec: selector: matchLabels: {{- include "occm.controllermanager.matchLabels" . | nindent 6 }} + {{- if eq .Values.controllerKind "Deployment" }} + replicas: {{ .Values.controllerReplicas }} + strategy: + type: RollingUpdate + {{- else }} updateStrategy: type: RollingUpdate + {{- end }} template: metadata: annotations: @@ -26,10 +32,17 @@ spec: imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} + {{- if eq .Values.controllerKind "Deployment" }} + {{- with .Values.deploymentNodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- else }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} + {{- end }} {{- with .Values.podSecurityContext }} securityContext: {{- toYaml . | nindent 8 }} diff --git a/charts/openstack-cloud-controller-manager/values.yaml b/charts/openstack-cloud-controller-manager/values.yaml index d813226992..5c0b41c6dc 100644 --- a/charts/openstack-cloud-controller-manager/values.yaml +++ b/charts/openstack-cloud-controller-manager/values.yaml @@ -2,6 +2,14 @@ # # Define deployment mode for the controller and provide cloud credentials in cloudConfig at the end of the file # +# Controller kind: DaemonSet or Deployment +# Use DaemonSet to run on all control-plane nodes (default) +# Use Deployment to run a specific number of replicas +controllerKind: DaemonSet + +# Number of replicas (only used when controllerKind is Deployment) +controllerReplicas: 2 + ## Annotations to apply to all resources commonAnnotations: {} # commonAnnotations: @@ -48,10 +56,14 @@ readinessProbe: {} dnsPolicy: ClusterFirst -# Set nodeSelector where the controller should run, i.e. controlplane nodes +# Set nodeSelector where the controller should run, i.e. controlplane nodes (used for DaemonSet) nodeSelector: node-role.kubernetes.io/control-plane: "" +# Set nodeSelector for Deployment (used when controllerKind is Deployment) +# Defaults to empty (no node restriction) +deploymentNodeSelector: {} + # Set tolerations for nodes where the controller should run, i.e. node # should be uninitialized, controlplane... tolerations: