Ignore extra dind container when contaerinMode.type=dind. (#2418)
This commit is contained in:
parent
e5d8d65396
commit
064039afc0
|
|
@ -439,7 +439,9 @@ jobs:
|
||||||
--set githubConfigUrl="https://github.com/${{ steps.resolved_inputs.outputs.TARGET_ORG }}/${{steps.resolved_inputs.outputs.TARGET_REPO}}" \
|
--set githubConfigUrl="https://github.com/${{ steps.resolved_inputs.outputs.TARGET_ORG }}/${{steps.resolved_inputs.outputs.TARGET_REPO}}" \
|
||||||
--set githubConfigSecret.github_token="${{ steps.setup.outputs.token }}" \
|
--set githubConfigSecret.github_token="${{ steps.setup.outputs.token }}" \
|
||||||
--set containerMode.type="kubernetes" \
|
--set containerMode.type="kubernetes" \
|
||||||
|
--set containerMode.kubernetesModeWorkVolumeClaim.accessModes={"ReadWriteOnce"} \
|
||||||
--set containerMode.kubernetesModeWorkVolumeClaim.storageClassName="openebs-hostpath" \
|
--set containerMode.kubernetesModeWorkVolumeClaim.storageClassName="openebs-hostpath" \
|
||||||
|
--set containerMode.kubernetesModeWorkVolumeClaim.resources.requests.storage="1Gi" \
|
||||||
./charts/gha-runner-scale-set \
|
./charts/gha-runner-scale-set \
|
||||||
--debug
|
--debug
|
||||||
echo "ARC_NAME=$ARC_NAME" >> $GITHUB_OUTPUT
|
echo "ARC_NAME=$ARC_NAME" >> $GITHUB_OUTPUT
|
||||||
|
|
|
||||||
|
|
@ -248,7 +248,6 @@ type AutoscalingRunnerSetStatus struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ars *AutoscalingRunnerSet) ListenerSpecHash() string {
|
func (ars *AutoscalingRunnerSet) ListenerSpecHash() string {
|
||||||
type listenerSpec = AutoscalingRunnerSetSpec
|
|
||||||
arsSpec := ars.Spec.DeepCopy()
|
arsSpec := ars.Spec.DeepCopy()
|
||||||
spec := arsSpec
|
spec := arsSpec
|
||||||
return hash.ComputeTemplateHash(&spec)
|
return hash.ComputeTemplateHash(&spec)
|
||||||
|
|
|
||||||
|
|
@ -163,6 +163,14 @@ volumeMounts:
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{- define "gha-runner-scale-set.non-runner-non-dind-containers" -}}
|
||||||
|
{{- range $i, $container := .Values.template.spec.containers }}
|
||||||
|
{{- if and (ne $container.name "runner") (ne $container.name "dind") }}
|
||||||
|
- {{ $container | toYaml | nindent 2 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{- define "gha-runner-scale-set.dind-runner-container" -}}
|
{{- define "gha-runner-scale-set.dind-runner-container" -}}
|
||||||
{{- $tlsConfig := (default (dict) .Values.githubServerTLS) }}
|
{{- $tlsConfig := (default (dict) .Values.githubServerTLS) }}
|
||||||
{{- range $i, $container := .Values.template.spec.containers }}
|
{{- range $i, $container := .Values.template.spec.containers }}
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ spec:
|
||||||
{{- include "gha-runner-scale-set.dind-runner-container" . | nindent 8 }}
|
{{- include "gha-runner-scale-set.dind-runner-container" . | nindent 8 }}
|
||||||
- name: dind
|
- name: dind
|
||||||
{{- include "gha-runner-scale-set.dind-container" . | nindent 8 }}
|
{{- include "gha-runner-scale-set.dind-container" . | nindent 8 }}
|
||||||
{{- include "gha-runner-scale-set.non-runner-containers" . | nindent 6 }}
|
{{- include "gha-runner-scale-set.non-runner-non-dind-containers" . | nindent 6 }}
|
||||||
{{- else if eq .Values.containerMode.type "kubernetes" }}
|
{{- else if eq .Values.containerMode.type "kubernetes" }}
|
||||||
- name: runner
|
- name: runner
|
||||||
{{- include "gha-runner-scale-set.kubernetes-mode-runner-container" . | nindent 8 }}
|
{{- include "gha-runner-scale-set.kubernetes-mode-runner-container" . | nindent 8 }}
|
||||||
|
|
|
||||||
|
|
@ -86,11 +86,11 @@ template:
|
||||||
## template:
|
## template:
|
||||||
## spec:
|
## spec:
|
||||||
## initContainers:
|
## initContainers:
|
||||||
## - name: initExternalsInternalVolume
|
## - name: init-dind-externals
|
||||||
## image: ghcr.io/actions/actions-runner:latest
|
## image: ghcr.io/actions/actions-runner:latest
|
||||||
## command: ["cp", "-r", "-v", "/home/runner/externals/.", "/home/runner/tmpDir/"]
|
## command: ["cp", "-r", "-v", "/home/runner/externals/.", "/home/runner/tmpDir/"]
|
||||||
## volumeMounts:
|
## volumeMounts:
|
||||||
## - name: externalsInternal
|
## - name: dind-externals
|
||||||
## mountPath: /home/runner/tmpDir
|
## mountPath: /home/runner/tmpDir
|
||||||
## containers:
|
## containers:
|
||||||
## - name: runner
|
## - name: runner
|
||||||
|
|
@ -103,9 +103,9 @@ template:
|
||||||
## - name: DOCKER_CERT_PATH
|
## - name: DOCKER_CERT_PATH
|
||||||
## value: /certs/client
|
## value: /certs/client
|
||||||
## volumeMounts:
|
## volumeMounts:
|
||||||
## - name: workingDirectoryInternal
|
## - name: work
|
||||||
## mountPath: /home/runner/_work
|
## mountPath: /home/runner/_work
|
||||||
## - name: dinDInternal
|
## - name: dind-cert
|
||||||
## mountPath: /certs/client
|
## mountPath: /certs/client
|
||||||
## readOnly: true
|
## readOnly: true
|
||||||
## - name: dind
|
## - name: dind
|
||||||
|
|
@ -113,18 +113,18 @@ template:
|
||||||
## securityContext:
|
## securityContext:
|
||||||
## privileged: true
|
## privileged: true
|
||||||
## volumeMounts:
|
## volumeMounts:
|
||||||
## - mountPath: /certs/client
|
## - name: work
|
||||||
## name: dinDInternal
|
## mountPath: /home/runner/_work
|
||||||
## - mountPath: /home/runner/_work
|
## - name: dind-cert
|
||||||
## name: workingDirectoryInternal
|
## mountPath: /certs/client
|
||||||
## - mountPath: /home/runner/externals
|
## - name: dind-externals
|
||||||
## name: externalsInternal
|
## mountPath: /home/runner/externals
|
||||||
## volumes:
|
## volumes:
|
||||||
## - name: dinDInternal
|
## - name: work
|
||||||
## emptyDir: {}
|
## emptyDir: {}
|
||||||
## - name: workingDirectoryInternal
|
## - name: dind-cert
|
||||||
## emptyDir: {}
|
## emptyDir: {}
|
||||||
## - name: externalsInternal
|
## - name: dind-externals
|
||||||
## emptyDir: {}
|
## emptyDir: {}
|
||||||
######################################################################################################
|
######################################################################################################
|
||||||
## with containerMode.type=kubernetes, we will populate the template.spec with following pod spec
|
## with containerMode.type=kubernetes, we will populate the template.spec with following pod spec
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue