feat(chart): make dind container template configurable
In addition to the pre-populated values for the dind container template parse spec from Values.template.spec.containers["dind"] to enable users to add config
This commit is contained in:
parent
47dfed3ced
commit
1ddc73c7bb
|
|
@ -96,6 +96,15 @@ volumeMounts:
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- define "gha-runner-scale-set.dind-container" -}}
|
{{- define "gha-runner-scale-set.dind-container" -}}
|
||||||
|
{{- range $i, $container := .Values.template.spec.containers }}
|
||||||
|
{{- if eq $container.name "dind" }}
|
||||||
|
{{- range $key, $val := $container }}
|
||||||
|
{{- if and (ne $key "env") (ne $key "volumeMounts") (ne $key "name") (ne $key "image") (ne $key "command") (ne $key "args") }}
|
||||||
|
{{ $key }}: {{ $val | toYaml | nindent 2 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
image: docker:dind
|
image: docker:dind
|
||||||
args:
|
args:
|
||||||
- dockerd
|
- dockerd
|
||||||
|
|
|
||||||
|
|
@ -22,10 +22,21 @@ template:
|
||||||
limits:
|
limits:
|
||||||
memory: "64Mi"
|
memory: "64Mi"
|
||||||
cpu: "250m"
|
cpu: "250m"
|
||||||
|
requests:
|
||||||
|
cpu: "32Mi"
|
||||||
|
memory: "100Mi"
|
||||||
|
- name: dind
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
memory: "64Mi"
|
||||||
|
cpu: "250m"
|
||||||
|
requests:
|
||||||
|
cpu: "32Mi"
|
||||||
|
memory: "100Mi"
|
||||||
volumes:
|
volumes:
|
||||||
- name: work
|
- name: work
|
||||||
hostPath:
|
hostPath:
|
||||||
path: /data
|
path: /data
|
||||||
type: Directory
|
type: Directory
|
||||||
containerMode:
|
containerMode:
|
||||||
type: dind
|
type: dind
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue