8585 {{- if .retryPeriod }}
8686 - --leader-elect-retry-period={{ .retryPeriod }}
8787 {{- end }}
88+ {{- if $.Values.profilerAddress }}
89+ - --profiler-address=localhost{{ $.Values.profilerAddress }}
90+ {{- end }}
91+ {{- if $.Values.contentionProfiling }}
92+ - --contention-profiling={{ $.Values.contentionProfiling }}
93+ {{- end }}
8894 {{- end }}
8995 command :
9096 - /manager
@@ -94,18 +100,21 @@ spec:
94100 imagePullPolicy : {{ .Values.image.manager.pullPolicy }}
95101 name : manager
96102 ports :
103+ {{- if $.Values.profilerAddress }}
104+ {{- $profilerPort := $.Values.profilerAddress | toString | trimPrefix ":" | int }}
105+ - containerPort : {{ $profilerPort }}
106+ name : profiler
107+ protocol : TCP
108+ {{- end }}
97109 - containerPort : 9443
98110 name : webhook-server
99111 protocol : TCP
100- {{- if $.Values.diagnosticsAddress }}
101- {{- $diagnosticsPort := $.Values.diagnosticsAddress }}
102- {{- if contains ":" $diagnosticsPort -}}
103- {{ $diagnosticsPort = ( split ":" $.Values.diagnosticsAddress)._1 | int }}
104- {{- end }}
105- - containerPort : {{ $diagnosticsPort | int }}
106- name : metrics
112+ {{- if .Values.diagnosticsAddress }}
113+ {{- $diagnosticsPort := .Values.diagnosticsAddress | toString | trimPrefix ":" | int }}
114+ - containerPort : {{ $diagnosticsPort }}
115+ name : diagnostics
107116 protocol : TCP
108- {{- end }}
117+ {{- end }}
109118 {{- with .Values.resources.manager }}
110119 resources :
111120 {{- toYaml . | nindent 12 }}
@@ -123,15 +132,15 @@ spec:
123132 {{- toYaml . | nindent 12 }}
124133 {{- end }}
125134 terminationMessagePolicy : FallbackToLogsOnError
126- {{- $healthAddr := $.Values.healthAddr }}
127- {{- if contains ":" $ healthAddr - }}
128- {{ $healthAddr = ( split ":" $.Values.healthAddr)._1 | int }}
135+ {{- $healthPort := 9440 }}
136+ {{- if .Values. healthAddr }}
137+ {{- $healthPort = .Values.healthAddr | toString | trimPrefix ":" | int }}
129138 {{- end }}
130139 livenessProbe :
131140 failureThreshold : 3
132141 httpGet :
133142 path : /healthz
134- port : {{ $healthAddr | default 9440 }}
143+ port : {{ $healthPort }}
135144 scheme : HTTP
136145 initialDelaySeconds : 15
137146 periodSeconds : 20
@@ -141,7 +150,7 @@ spec:
141150 failureThreshold : 3
142151 httpGet :
143152 path : /readyz
144- port : {{ $healthAddr | default 9440 }}
153+ port : {{ $healthPort }}
145154 scheme : HTTP
146155 initialDelaySeconds : 5
147156 periodSeconds : 10
0 commit comments