File tree 3 files changed +30
-14
lines changed
manifests/charts/addon-agent 3 files changed +30
-14
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,9 @@ func NewAgentAddon(
145
145
addonfactory .GetAddOnDeploymentConfigValues (
146
146
utils .NewAddOnDeploymentConfigGetter (addonClient ),
147
147
toAgentAddOnChartValues (caCertData ),
148
+ addonfactory .ToAddOnNodePlacementValues ,
149
+ addonfactory .ToAddOnProxyConfigValues ,
150
+ addonfactory .ToAddOnResourceRequirementsValues ,
148
151
),
149
152
).
150
153
WithConfigCheckEnabledOption ().
Original file line number Diff line number Diff line change 32
32
{{- end }}
33
33
containers :
34
34
- name : proxy-agent
35
+ {{- $reverseResourceRequirements := reverse .Values.global.resourceRequirements }}
36
+ {{- range $item := $reverseResourceRequirements }}
37
+ {{- if regexMatch $item.containerIDRegex "deployments:deployment1:container1" }}
38
+ resources :
39
+ {{- toYaml $item.resources | nindent 12 }}
40
+ {{- break -}}
41
+ {{- end -}}
42
+ {{- end }}
35
43
image : {{ .Values.proxyAgentImage }}
36
44
imagePullPolicy : IfNotPresent
37
45
command :
@@ -84,14 +92,15 @@ spec:
84
92
- name : hub
85
93
mountPath : /etc/tls
86
94
readOnly : true
87
- resources :
88
- requests :
89
- memory : " 100Mi"
90
- cpu : " 200m"
91
- limits :
92
- memory : " 200Mi"
93
- cpu : " 300m"
94
95
- name : addon-agent
96
+ {{- $reverseResourceRequirements := reverse .Values.global.resourceRequirements }}
97
+ {{- range $item := $reverseResourceRequirements }}
98
+ {{- if regexMatch $item.containerIDRegex "deployments:deployment1:container1" }}
99
+ resources :
100
+ {{- toYaml $item.resources | nindent 12 }}
101
+ {{- break -}}
102
+ {{- end -}}
103
+ {{- end }}
95
104
image : {{ .Values.registry }}/{{ .Values.image }}:{{ .Values.tag }}
96
105
imagePullPolicy : IfNotPresent
97
106
command :
@@ -116,13 +125,6 @@ spec:
116
125
- name : hub
117
126
mountPath : /etc/tls
118
127
readOnly : true
119
- resources :
120
- requests :
121
- memory : " 50Mi"
122
- cpu : " 100m"
123
- limits :
124
- memory : " 100Mi"
125
- cpu : " 200m"
126
128
env :
127
129
- name : POD_NAMESPACE
128
130
valueFrom :
Original file line number Diff line number Diff line change @@ -37,3 +37,14 @@ proxyConfig:
37
37
HTTP_PROXY : null
38
38
HTTPS_PROXY : null
39
39
NO_PROXY : null
40
+
41
+ global :
42
+ resourceRequirements :
43
+ - containerIDRegex : ^.+:.+:.+$
44
+ resources :
45
+ requests :
46
+ memory : 100Mi
47
+ cpu : 200m
48
+ limits :
49
+ memory : 200Mi
50
+ cpu : 300m
You can’t perform that action at this time.
0 commit comments