File tree Expand file tree Collapse file tree 14 files changed +787
-139
lines changed 
cronjob-tutorial/testdata/project/dist/chart 
getting-started/testdata/project/dist/chart 
multiversion-tutorial/testdata/project/dist/chart 
pkg/plugins/optional/helm/v2alpha/scaffolds/internal 
testdata/project-v4-with-plugins/dist/chart Expand file tree Collapse file tree 14 files changed +787
-139
lines changed Original file line number Diff line number Diff line change 2323        spec :
2424            containers :
2525                - args :
26+                     {{- if .Values.metrics.enable }} 
2627                    - --metrics-bind-address=:8443 
27-                     - --leader-elect 
28+                     {{- else }} 
29+                     #  Bind to :0 to disable the controller-runtime managed metrics server
30+                     - --metrics-bind-address=:0 
31+                     {{- end }} 
2832                    - --health-probe-bind-address=:8081 
33+                     {{- range .Values.controllerManager.args }} 
34+                     - {{ . }} 
35+                     {{- end }} 
2936                    {{- if and .Values.certManager.enable .Values.metrics.enable }} 
3037                    - --metrics-cert-path=/tmp/k8s-metrics-server/metrics-certs 
3138                    {{- end }} 
3542                  command :
3643                    - /manager 
3744                  image : " {{ .Values.controllerManager.image.repository }}:{{ .Values.controllerManager.image.tag }}" 
45+                   imagePullPolicy : {{ .Values.controllerManager.image.pullPolicy }} 
3846                  livenessProbe :
3947                    httpGet :
4048                        path : /healthz 
@@ -53,18 +61,17 @@ spec:
5361                    initialDelaySeconds : 5 
5462                    periodSeconds : 10 
5563                  resources :
56-                     limits :
57-                         cpu : 500m 
58-                         memory : 128Mi 
59-                     requests :
60-                         cpu : 10m 
61-                         memory : 64Mi 
64+                     {{- if .Values.controllerManager.resources }} 
65+                     {{- toYaml .Values.controllerManager.resources | nindent 20 }} 
66+                     {{- else }} 
67+                     {} 
68+                     {{- end }} 
6269                  securityContext :
63-                     allowPrivilegeEscalation :  false 
64-                     capabilities : 
65-                          drop : 
66-                             -  ALL 
67-                     readOnlyRootFilesystem :  true 
70+                     {{- if .Values.controllerManager.securityContext }} 
71+                     {{- toYaml .Values.controllerManager.securityContext | nindent 20 }} 
72+                     {{- else }} 
73+                     {} 
74+                     {{- end }} 
6875                  volumeMounts :
6976                    {{- if and .Values.certManager.enable .Values.metrics.enable }} 
7077                    - mountPath : /tmp/k8s-metrics-server/metrics-certs 
7784                      readOnly : true 
7885                    {{- end }} 
7986            securityContext :
80-                 runAsNonRoot : true 
81-                 seccompProfile :
82-                     type : RuntimeDefault 
87+               {{- if .Values.controllerManager.podSecurityContext }} 
88+               {{- toYaml .Values.controllerManager.podSecurityContext | nindent 14 }} 
89+               {{- else }} 
90+               {} 
91+               {{- end }} 
8392            serviceAccountName : project-controller-manager 
8493            terminationGracePeriodSeconds : 10 
8594            volumes :
Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ controllerManager:
77    tag : latest 
88    pullPolicy : IfNotPresent 
99
10+   #  Arguments
11+   args :
12+     - --leader-elect 
13+ 
1014  #  Environment variables
1115  env : [] 
1216
Original file line number Diff line number Diff line change @@ -23,12 +23,20 @@ spec:
2323        spec :
2424            containers :
2525                - args :
26+                     {{- if .Values.metrics.enable }} 
2627                    - --metrics-bind-address=:8443 
27-                     - --leader-elect 
28+                     {{- else }} 
29+                     #  Bind to :0 to disable the controller-runtime managed metrics server
30+                     - --metrics-bind-address=:0 
31+                     {{- end }} 
2832                    - --health-probe-bind-address=:8081 
33+                     {{- range .Values.controllerManager.args }} 
34+                     - {{ . }} 
35+                     {{- end }} 
2936                  command :
3037                    - /manager 
3138                  image : " {{ .Values.controllerManager.image.repository }}:{{ .Values.controllerManager.image.tag }}" 
39+                   imagePullPolicy : {{ .Values.controllerManager.image.pullPolicy }} 
3240                  livenessProbe :
3341                    httpGet :
3442                        path : /healthz 
@@ -44,23 +52,24 @@ spec:
4452                    initialDelaySeconds : 5 
4553                    periodSeconds : 10 
4654                  resources :
47-                     limits :
48-                         cpu : 500m 
49-                         memory : 128Mi 
50-                     requests :
51-                         cpu : 10m 
52-                         memory : 64Mi 
55+                     {{- if .Values.controllerManager.resources }} 
56+                     {{- toYaml .Values.controllerManager.resources | nindent 20 }} 
57+                     {{- else }} 
58+                     {} 
59+                     {{- end }} 
5360                  securityContext :
54-                     allowPrivilegeEscalation :  false 
55-                     capabilities : 
56-                          drop : 
57-                             -  ALL 
58-                     readOnlyRootFilesystem :  true 
61+                     {{- if .Values.controllerManager.securityContext }} 
62+                     {{- toYaml .Values.controllerManager.securityContext | nindent 20 }} 
63+                     {{- else }} 
64+                     {} 
65+                     {{- end }} 
5966                  volumeMounts : [] 
6067            securityContext :
61-                 runAsNonRoot : true 
62-                 seccompProfile :
63-                     type : RuntimeDefault 
68+               {{- if .Values.controllerManager.podSecurityContext }} 
69+               {{- toYaml .Values.controllerManager.podSecurityContext | nindent 14 }} 
70+               {{- else }} 
71+               {} 
72+               {{- end }} 
6473            serviceAccountName : project-controller-manager 
6574            terminationGracePeriodSeconds : 10 
6675            volumes : [] 
Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ controllerManager:
77    tag : latest 
88    pullPolicy : IfNotPresent 
99
10+   #  Arguments
11+   args :
12+     - --leader-elect 
13+ 
1014  #  Environment variables
1115  env : [] 
1216
Original file line number Diff line number Diff line change 2323        spec :
2424            containers :
2525                - args :
26+                     {{- if .Values.metrics.enable }} 
2627                    - --metrics-bind-address=:8443 
27-                     - --leader-elect 
28+                     {{- else }} 
29+                     #  Bind to :0 to disable the controller-runtime managed metrics server
30+                     - --metrics-bind-address=:0 
31+                     {{- end }} 
2832                    - --health-probe-bind-address=:8081 
33+                     {{- range .Values.controllerManager.args }} 
34+                     - {{ . }} 
35+                     {{- end }} 
2936                    {{- if and .Values.certManager.enable .Values.metrics.enable }} 
3037                    - --metrics-cert-path=/tmp/k8s-metrics-server/metrics-certs 
3138                    {{- end }} 
3542                  command :
3643                    - /manager 
3744                  image : " {{ .Values.controllerManager.image.repository }}:{{ .Values.controllerManager.image.tag }}" 
45+                   imagePullPolicy : {{ .Values.controllerManager.image.pullPolicy }} 
3846                  livenessProbe :
3947                    httpGet :
4048                        path : /healthz 
@@ -53,18 +61,17 @@ spec:
5361                    initialDelaySeconds : 5 
5462                    periodSeconds : 10 
5563                  resources :
56-                     limits :
57-                         cpu : 500m 
58-                         memory : 128Mi 
59-                     requests :
60-                         cpu : 10m 
61-                         memory : 64Mi 
64+                     {{- if .Values.controllerManager.resources }} 
65+                     {{- toYaml .Values.controllerManager.resources | nindent 20 }} 
66+                     {{- else }} 
67+                     {} 
68+                     {{- end }} 
6269                  securityContext :
63-                     allowPrivilegeEscalation :  false 
64-                     capabilities : 
65-                          drop : 
66-                             -  ALL 
67-                     readOnlyRootFilesystem :  true 
70+                     {{- if .Values.controllerManager.securityContext }} 
71+                     {{- toYaml .Values.controllerManager.securityContext | nindent 20 }} 
72+                     {{- else }} 
73+                     {} 
74+                     {{- end }} 
6875                  volumeMounts :
6976                    {{- if and .Values.certManager.enable .Values.metrics.enable }} 
7077                    - mountPath : /tmp/k8s-metrics-server/metrics-certs 
7784                      readOnly : true 
7885                    {{- end }} 
7986            securityContext :
80-                 runAsNonRoot : true 
81-                 seccompProfile :
82-                     type : RuntimeDefault 
87+               {{- if .Values.controllerManager.podSecurityContext }} 
88+               {{- toYaml .Values.controllerManager.podSecurityContext | nindent 14 }} 
89+               {{- else }} 
90+               {} 
91+               {{- end }} 
8392            serviceAccountName : project-controller-manager 
8493            terminationGracePeriodSeconds : 10 
8594            volumes :
Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ controllerManager:
77    tag : latest 
88    pullPolicy : IfNotPresent 
99
10+   #  Arguments
11+   args :
12+     - --leader-elect 
13+ 
1014  #  Environment variables
1115  env : [] 
1216
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments