1
1
{{- with .Values }}
2
- {{- if not .rbac. only }}
2
+ {{- if not (and .rbac .rbac. only) }}
3
3
apiVersion : apps/v1
4
4
kind : Deployment
5
5
metadata :
@@ -114,87 +114,57 @@ spec:
114
114
{{- /*
115
115
Traffic agent configuration
116
116
*/}}
117
- {{- if .agent.logLevel }}
117
+ {{- with .agent }}
118
+ {{- if .logLevel }}
118
119
- name : AGENT_LOG_LEVEL
119
- value : {{ .agent. logLevel }}
120
+ value : {{ .logLevel }}
120
121
{{- end }}
121
- {{- if .agent. port }}
122
+ {{- if .port }}
122
123
- name : AGENT_PORT
123
- value : {{ .agent. port | quote }}
124
+ value : {{ .port | quote }}
124
125
{{- end }}
125
- {{- /* replaced by agent.appProtocolStrategy. Retained for backward compatibility */}}
126
- {{- if $.Values.agentInjector.appProtocolStrategy }}
127
- - name : AGENT_APP_PROTO_STRATEGY
128
- value : {{ $.Values.agentInjector.appProtocolStrategy }}
129
- {{- else }}
130
- {{- if .agent.appProtocolStrategy }}
126
+ {{- if .appProtocolStrategy }}
131
127
- name : AGENT_APP_PROTO_STRATEGY
132
- value : {{ .agent. appProtocolStrategy }}
128
+ value : {{ .appProtocolStrategy }}
133
129
{{- end }}
134
- {{- end }}
135
- {{- /* replaced by agent.resources. Retained for backward compatibility */}}
136
- {{- if $.Values.agentInjector.agentImage.resources }}
137
- - name : AGENT_RESOURCES
138
- value : ' {{ toJson $.Values.agentInjector.agentImage.resources }}'
139
- {{- else }}
140
- {{- if .agent.resources }}
130
+ {{- if .resources }}
141
131
- name : AGENT_RESOURCES
142
- value : ' {{ toJson .agent.resources }}'
143
- {{- end }}
132
+ value : ' {{ toJson .resources }}'
144
133
{{- end }}
145
- {{- /* replaced by agent.initResoruces. Retained for backward compatibility */}}
146
- {{- if $.Values.agentInjector.agentImage.initResources }}
134
+ {{- if .initResources }}
147
135
- name : AGENT_INIT_RESOURCES
148
- value : ' {{ toJson $.Values.agentInjector.agentImage.initResources }}'
149
- {{- else }}
150
- {{- if .agent.initResources }}
151
- - name : AGENT_INIT_RESOURCES
152
- value : ' {{ toJson .agent.initResources }}'
136
+ value : ' {{ toJson .initResources }}'
153
137
{{- end }}
154
- {{- end }}
155
- {{- /* replaced by agent.image.name Retained for backward compatibility */}}
156
- {{- if .agentInjector.agentImage.name }}
157
- - name : AGENT_IMAGE_NAME
158
- value : {{ .agentInjector.agentImage.name }}
159
- {{- else }}
160
- {{- if .agent.image.name }}
138
+ {{- with .image }}
139
+ {{- if .name }}
161
140
- name : AGENT_IMAGE_NAME
162
- value : {{ .agent.image. name }}
141
+ value : {{ .name }}
163
142
{{- end }}
164
- {{- end }}
165
- {{- if .agentInjector.agentImage.tag }}
166
- - name : AGENT_IMAGE_TAG
167
- value : {{ .agentInjector.agentImage.tag }}
168
- {{- else }}
169
- {{- if .agent.image.tag }}
143
+ {{- if .tag }}
170
144
- name : AGENT_IMAGE_TAG
171
- value : {{ .agent.image.tag }}
172
- {{- end }}
145
+ value : {{ .tag }}
173
146
{{- end }}
174
- {{- /* replaced by agent.image.registry Retained for backward compatibility */}}
175
- {{- if .agentInjector.agentImage.registry }}
147
+ {{- if .registry }}
176
148
- name : AGENT_REGISTRY
177
- value : {{ .agentInjector.agentImage.registry }}
178
- {{- else }}
179
- {{- if .agent.image.registry }}
180
- - name : AGENT_REGISTRY
181
- value : {{ .agent.image.registry }}
182
- {{- end }}
149
+ value : {{ .registry }}
183
150
{{- end }}
184
- {{- with .agent.image. pullSecrets }}
151
+ {{- with .pullSecrets }}
185
152
- name : AGENT_IMAGE_PULL_SECRETS
186
153
value : ' {{ toJson . }}'
187
154
{{- end }}
188
155
- name : AGENT_IMAGE_PULL_POLICY
189
- value : {{ .agent.image.pullPolicy }}
190
- {{- /* to allow running with no security context, must check against nil - this allows specifying an empty dict for the value */}}
191
- {{- if not (eq .agent.securityContext nil) }}
156
+ value : {{ .pullPolicy }}
157
+ {{- end }}
158
+ {{- /* must check against nil. An empty security context is a valid override */}}
159
+ {{- if not (eq .securityContext nil) }}
192
160
- name : AGENT_SECURITY_CONTEXT
193
- value : ' {{ toJson .agent. securityContext }}'
161
+ value : ' {{ toJson .securityContext }}'
194
162
{{- end }}
195
- {{- if .agent.initSecurityContext }}
163
+ {{- /* must check against nil. An empty security context is a valid override */}}
164
+ {{- if not (eq .initSecurityContext nil) }}
196
165
- name : AGENT_INIT_SECURITY_CONTEXT
197
- value : ' {{ toJson .agent.initSecurityContext }}'
166
+ value : ' {{ toJson .initSecurityContext }}'
167
+ {{- end }}
198
168
{{- end }}
199
169
{{- with fromJsonArray (include "traffic-manager.namespaces" $) }}
200
170
{{- /*
@@ -228,17 +198,6 @@ spec:
228
198
{{- with .client }}
229
199
- name : CLIENT_CONNECTION_TTL
230
200
value : {{ .connectionTTL }}
231
- {{- /* replaced by client.routing. Retained for backward compatibility */}}
232
- {{- with $.Values.dnsConfig }}
233
- {{- if .alsoProxySubnets }}
234
- - name : CLIENT_ROUTING_ALSO_PROXY_SUBNETS
235
- value : " {{ join " " .alsoProxySubnets }}"
236
- {{- end }}
237
- {{- if .neverProxySubnets }}
238
- - name : CLIENT_ROUTING_NEVER_PROXY_SUBNETS
239
- value : " {{ join " " .neverProxySubnets }}"
240
- {{- end }}
241
- {{- else }}
242
201
{{- with .routing }}
243
202
{{- if .alsoProxySubnets }}
244
203
- name : CLIENT_ROUTING_ALSO_PROXY_SUBNETS
@@ -253,7 +212,6 @@ spec:
253
212
value : " {{ join " " .allowConflictingSubnets }}"
254
213
{{- end }}
255
214
{{- end }}
256
- {{- end }}
257
215
{{- with .dns }}
258
216
{{- with .excludeSuffixes }}
259
217
- name : CLIENT_DNS_EXCLUDE_SUFFIXES
0 commit comments