File tree Expand file tree Collapse file tree 2 files changed +27
-2
lines changed
charts/openstack-cloud-controller-manager Expand file tree Collapse file tree 2 files changed +27
-2
lines changed Original file line number Diff line number Diff line change 11apiVersion : apps/v1
2- kind : DaemonSet
2+ kind : {{ .Values.controllerKind }}
33metadata :
44 name : {{ include "occm.name" . }}
55 labels : {{- include "common.labels.standard" . | nindent 4 }}
1212 selector :
1313 matchLabels :
1414 {{- include "occm.controllermanager.matchLabels" . | nindent 6 }}
15+ {{- if eq .Values.controllerKind "Deployment" }}
16+ replicas : {{ .Values.controllerReplicas }}
17+ strategy :
18+ type : RollingUpdate
19+ {{- else }}
1520 updateStrategy :
1621 type : RollingUpdate
22+ {{- end }}
1723 template :
1824 metadata :
1925 annotations :
@@ -26,10 +32,17 @@ spec:
2632 imagePullSecrets :
2733 {{- toYaml . | nindent 8 }}
2834 {{- end }}
35+ {{- if eq .Values.controllerKind "Deployment" }}
36+ {{- with .Values.deploymentNodeSelector }}
37+ nodeSelector :
38+ {{- toYaml . | nindent 8 }}
39+ {{- end }}
40+ {{- else }}
2941 {{- with .Values.nodeSelector }}
3042 nodeSelector :
3143 {{- toYaml . | nindent 8 }}
3244 {{- end }}
45+ {{- end }}
3346 {{- with .Values.podSecurityContext }}
3447 securityContext :
3548 {{- toYaml . | nindent 8 }}
Original file line number Diff line number Diff line change 22#
33# Define deployment mode for the controller and provide cloud credentials in cloudConfig at the end of the file
44#
5+ # Controller kind: DaemonSet or Deployment
6+ # Use DaemonSet to run on all control-plane nodes (default)
7+ # Use Deployment to run a specific number of replicas
8+ controllerKind : DaemonSet
9+
10+ # Number of replicas (only used when controllerKind is Deployment)
11+ controllerReplicas : 2
12+
513# # Annotations to apply to all resources
614commonAnnotations : {}
715# commonAnnotations:
@@ -48,10 +56,14 @@ readinessProbe: {}
4856
4957dnsPolicy : ClusterFirst
5058
51- # Set nodeSelector where the controller should run, i.e. controlplane nodes
59+ # Set nodeSelector where the controller should run, i.e. controlplane nodes (used for DaemonSet)
5260nodeSelector :
5361 node-role.kubernetes.io/control-plane : " "
5462
63+ # Set nodeSelector for Deployment (used when controllerKind is Deployment)
64+ # Defaults to empty (no node restriction)
65+ deploymentNodeSelector : {}
66+
5567# Set tolerations for nodes where the controller should run, i.e. node
5668# should be uninitialized, controlplane...
5769tolerations :
You can’t perform that action at this time.
0 commit comments