49
49
50
50
{{- $clusterName := .Values.clusterName | required ".Values.clusterName is required." -}}
51
51
{{- $region := .Values.region | required ".Values.region is required." -}}
52
-
52
+ {{- $isROSA := eq $.Values.k8sMode "ROSA" -}}
53
53
{{- range .Values.agents }}
54
54
{{- $agent := merge . (deepCopy $.Values.agent) }}
55
55
apiVersion : cloudwatch.aws.amazon.com/v1alpha1
64
64
nodeSelector :
65
65
kubernetes.io/os : linux
66
66
serviceAccount : {{ $agent.serviceAccount.name | default (include "cloudwatch-agent.serviceAccountName" $) }}
67
+ {{ if $isROSA }}
68
+ securityContext :
69
+ runAsNonRoot : false
70
+ capabilities :
71
+ add :
72
+ - SYS_ADMIN
73
+ {{ end }}
67
74
priorityClassName : {{ $agent.priorityClassName | default $.Values.agent.priorityClassName }}
68
75
affinity :
69
76
nodeAffinity :
@@ -111,6 +118,12 @@ spec:
111
118
readOnly : true
112
119
- mountPath : /run/containerd/containerd.sock
113
120
name : containerdsock
121
+ - mountPath : /var/run/crio/crio.sock
122
+ name : criosock
123
+ - mountPath : /var/lib/containers
124
+ name : criocontainer
125
+ - mountPath : /var/log/pods
126
+ name : criologs
114
127
- mountPath : /var/lib/docker
115
128
name : varlibdocker
116
129
readOnly : true
@@ -131,6 +144,10 @@ spec:
131
144
readOnly : true
132
145
- mountPath : /var/lib/kubelet/pod-resources
133
146
name : kubelet-podresources
147
+ {{ if $isROSA }}
148
+ - mountPath : /etc/kubernetes/kubelet-ca.crt
149
+ name : kubelet-ca
150
+ {{ end }}
134
151
volumes :
135
152
- name : kubelet-podresources
136
153
hostPath :
@@ -148,6 +165,15 @@ spec:
148
165
- hostPath :
149
166
path : /run/containerd/containerd.sock
150
167
name : containerdsock
168
+ - hostPath :
169
+ path : /var/run/crio/crio.sock
170
+ name : criosock
171
+ - hostPath :
172
+ path : /var/lib/containers
173
+ name : criocontainer
174
+ - hostPath :
175
+ path : /var/log/pods
176
+ name : criologs
151
177
- hostPath :
152
178
path : /sys
153
179
name : sys
@@ -174,6 +200,11 @@ spec:
174
200
path : server.crt
175
201
- key : tls.key
176
202
path : server.key
203
+ {{ if $isROSA }}
204
+ - name : kubelet-ca
205
+ hostPath :
206
+ path : /etc/kubernetes/kubelet-ca.crt
207
+ {{end }}
177
208
env :
178
209
- name : K8S_NODE_NAME
179
210
valueFrom :
@@ -191,6 +222,10 @@ spec:
191
222
valueFrom :
192
223
fieldRef :
193
224
fieldPath : metadata.namespace
225
+ {{ if $isROSA }}
226
+ - name : RUN_IN_ROSA
227
+ value : " True"
228
+ {{ end }}
194
229
- name : K8S_CLUSTER_NAME
195
230
value : {{ $.Values.clusterName }}
196
231
{{- with $.Values.tolerations }}
0 commit comments