mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
promote initContainrs to podspec (#1740)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
name: jenkins
|
||||
home: https://jenkins.io/
|
||||
version: 0.8.7
|
||||
version: 0.8.8
|
||||
appVersion: 2.67
|
||||
description: Open source continuous integration server. It supports multiple SCM tools including CVS, Subversion and Git. It can execute Apache Ant and Apache Maven-based projects as well as arbitrary scripts.
|
||||
sources:
|
||||
|
||||
@@ -24,32 +24,6 @@ spec:
|
||||
component: "{{ .Release.Name }}-{{ .Values.Master.Component }}"
|
||||
annotations:
|
||||
checksum/config: {{ include (print $.Template.BasePath "/config.yaml") . | sha256sum }}
|
||||
pod.alpha.kubernetes.io/init-containers: '[
|
||||
{
|
||||
"name": "copy-default-config",
|
||||
"image": "{{ .Values.Master.Image }}:{{ .Values.Master.ImageTag }}",
|
||||
"imagePullPolicy": "{{ .Values.Master.ImagePullPolicy }}",
|
||||
"command": [ "sh", "/var/jenkins_config/apply_config.sh" ],
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "jenkins-config",
|
||||
"mountPath": "/var/jenkins_config"
|
||||
},
|
||||
{
|
||||
"name": "jenkins-home",
|
||||
"mountPath": "/var/jenkins_home"
|
||||
},
|
||||
{
|
||||
"name": "plugin-dir",
|
||||
"mountPath": "/usr/share/jenkins/ref/plugins/"
|
||||
},
|
||||
{
|
||||
"name": "secrets-dir",
|
||||
"mountPath": "/usr/share/jenkins/ref/secrets/"
|
||||
}
|
||||
]
|
||||
}
|
||||
]'
|
||||
spec:
|
||||
{{- if .Values.Master.NodeSelector }}
|
||||
nodeSelector:
|
||||
@@ -62,6 +36,24 @@ spec:
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
serviceAccountName: {{ if .Values.rbac.install }}{{ template "fullname" . }}{{ else }}"{{ .Values.rbac.serviceAccountName }}"{{ end }}
|
||||
initContainers:
|
||||
- name: "copy-default-config"
|
||||
image: "{{ .Values.Master.Image }}:{{ .Values.Master.ImageTag }}"
|
||||
imagePullPolicy: "{{ .Values.Master.ImagePullPolicy }}"
|
||||
command: [ "sh", "/var/jenkins_config/apply_config.sh" ]
|
||||
volumeMounts:
|
||||
-
|
||||
mountPath: /var/jenkins_home
|
||||
name: jenkins-home
|
||||
-
|
||||
mountPath: /var/jenkins_config
|
||||
name: jenkins-config
|
||||
-
|
||||
mountPath: /usr/share/jenkins/ref/plugins/
|
||||
name: plugin-dir
|
||||
-
|
||||
mountPath: /usr/share/jenkins/ref/secrets/
|
||||
name: secrets-dir
|
||||
containers:
|
||||
- name: {{ template "fullname" . }}
|
||||
image: "{{ .Values.Master.Image }}:{{ .Values.Master.ImageTag }}"
|
||||
|
||||
@@ -4,20 +4,6 @@ metadata:
|
||||
name: "{{ .Release.Name }}-ui-test-{{ randAlphaNum 5 | lower }}"
|
||||
annotations:
|
||||
"helm.sh/hook": test-success
|
||||
"pod.beta.kubernetes.io/init-containers": '[
|
||||
{
|
||||
"name": "test-framework",
|
||||
"image": "dduportal/bats:0.4.0",
|
||||
"command": ["bash", "-c", "
|
||||
set -ex\n
|
||||
# copy bats to tools dir\n
|
||||
cp -R /usr/local/libexec/ /tools/bats/\n
|
||||
"],
|
||||
"volumeMounts": [
|
||||
{"name": "tools", "mountPath": "/tools"}
|
||||
]
|
||||
}
|
||||
]'
|
||||
spec:
|
||||
{{- if .Values.Master.NodeSelector }}
|
||||
nodeSelector:
|
||||
@@ -27,6 +13,19 @@ spec:
|
||||
tolerations:
|
||||
{{ toYaml .Values.Master.Tolerations | indent 4 }}
|
||||
{{- end }}
|
||||
initContainers:
|
||||
- name: "test-framework"
|
||||
image: "dduportal/bats:0.4.0"
|
||||
command:
|
||||
- "bash"
|
||||
- "-c"
|
||||
- |
|
||||
set -ex
|
||||
# copy bats to tools dir
|
||||
cp -R /usr/local/libexec/ /tools/bats/
|
||||
volumeMounts:
|
||||
- mountPath: /tools
|
||||
name: tools
|
||||
containers:
|
||||
- name: {{ .Release.Name }}-ui-test
|
||||
image: {{ .Values.Master.Image }}:{{ .Values.Master.ImageTag }}
|
||||
|
||||
Reference in New Issue
Block a user