From 38fa7bc1e7744d993e42abf2b8dc6eb88f917c6b Mon Sep 17 00:00:00 2001 From: Jakub Al-Khalili Date: Wed, 29 Apr 2020 14:16:47 +0200 Subject: [PATCH] Improve helm chart configuration as code and groovy script section --- chart/index.yaml | 70 +++++++++++------- chart/jenkins-operator/Chart.yaml | 2 +- .../jenkins-operator-0.1.4.tgz | Bin 0 -> 3804 bytes .../templates/configuration.yaml | 18 +++-- chart/jenkins-operator/templates/jenkins.yaml | 12 +-- chart/jenkins-operator/values.yaml | 2 + 6 files changed, 66 insertions(+), 38 deletions(-) create mode 100644 chart/jenkins-operator/jenkins-operator-0.1.4.tgz diff --git a/chart/index.yaml b/chart/index.yaml index 0682f00c6..acbdff1d7 100644 --- a/chart/index.yaml +++ b/chart/index.yaml @@ -3,119 +3,139 @@ entries: jenkins-operator: - apiVersion: v1 appVersion: 0.4.0 - created: "2020-04-22T20:36:21.525010622+02:00" + created: "2020-04-29T14:28:50.139669+02:00" + description: Kubernetes native operator which fully manages Jenkins on Kubernetes + digest: ee799022a8511b1017fe742645df4f88c5fec07ea4d4fce073ce2c0d384f61ad + icon: https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/assets/jenkins-operator-icon.png + name: jenkins-operator + urls: + - https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator-0.1.4.tgz + version: 0.1.4 + - apiVersion: v1 + appVersion: 0.4.0 + created: "2020-04-29T14:28:50.153015+02:00" + description: Kubernetes native operator which fully manages Jenkins on Kubernetes + digest: 844880609584b1aea94e147a621cd4cfc8cd3f70bfb069c31ee091d44ab94181 + icon: https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/assets/jenkins-operator-icon.png + name: jenkins-operator + urls: + - https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator/jenkins-operator-0.1.4.tgz + version: 0.1.4 + - apiVersion: v1 + appVersion: 0.4.0 + created: "2020-04-29T14:28:50.151951+02:00" description: Kubernetes native operator which fully manages Jenkins on Kubernetes digest: 97050b9409a18b4349f108d49022d0fe7cad29b2afc7866db6ae781e1b2237a6 icon: https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/assets/jenkins-operator-icon.png name: jenkins-operator urls: - - https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator-0.1.3.tgz + - https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator/jenkins-operator-0.1.3.tgz version: 0.1.3 - apiVersion: v1 appVersion: 0.4.0 - created: "2020-04-22T20:36:21.531498808+02:00" + created: "2020-04-29T14:28:50.150326+02:00" description: Kubernetes native operator which fully manages Jenkins on Kubernetes digest: e682ccc9359a6b1674711812f440a7aa1bbc0125e0148ed6ad388bbc5b08b32c icon: https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/assets/jenkins-operator-icon.png name: jenkins-operator urls: - - https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator-0.1.2.tgz + - https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator/jenkins-operator-0.1.2.tgz version: 0.1.2 - apiVersion: v1 appVersion: 0.4.0 - created: "2020-04-22T14:46:38.589196+02:00" + created: "2020-04-29T14:28:50.149338+02:00" description: Kubernetes native operator which fully manages Jenkins on Kubernetes digest: 3ac5720c5d1b46837018763710e54e75c1d156b15d64cc4727f0000858f85f32 icon: https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/assets/jenkins-operator-icon.png name: jenkins-operator urls: - - https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator-0.1.1.tgz + - https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator/jenkins-operator-0.1.1.tgz version: 0.1.1 - apiVersion: v1 appVersion: 0.3.3 - created: "2020-04-22T14:46:38.587508+02:00" + created: "2020-04-29T14:28:50.147912+02:00" description: Kubernetes native operator which fully manages Jenkins on Kubernetes digest: b45bd9e29735ecd62a7d4f1a146ed40288ca2c6871f447e8d2bc59c302388b31 icon: https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/assets/jenkins-operator-icon.png name: jenkins-operator urls: - - https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator-0.1.0.tgz + - https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator/jenkins-operator-0.1.0.tgz version: 0.1.0 - apiVersion: v1 appVersion: 0.3.3 - created: "2020-04-22T14:46:38.586346+02:00" + created: "2020-04-29T14:28:50.145744+02:00" description: Kubernetes native operator which fully manages Jenkins on Kubernetes digest: a8b2c7f7354d54b94e438ab8eccd220031c7066d97c4a8253da2919fdaaff34f icon: https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/assets/jenkins-operator-icon.png name: jenkins-operator urls: - - https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator-0.0.8.tgz + - https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator/jenkins-operator-0.0.8.tgz version: 0.0.8 - apiVersion: v1 appVersion: 0.3.3 - created: "2020-04-22T14:46:38.584846+02:00" + created: "2020-04-29T14:28:50.144958+02:00" description: Kubernetes native operator which fully manages Jenkins on Kubernetes digest: 8957f24ee68d23e903d4b9666b7670d1569a4fb5da04d548b756ea8324a96eb4 icon: https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/assets/jenkins-operator-icon.png name: jenkins-operator urls: - - https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator-0.0.7.tgz + - https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator/jenkins-operator-0.0.7.tgz version: 0.0.7 - apiVersion: v1 appVersion: 0.3.2 - created: "2020-04-22T14:46:38.584064+02:00" + created: "2020-04-29T14:28:50.144197+02:00" description: Kubernetes native operator which fully manages Jenkins on Kubernetes digest: a64b28ee639a2c2af662f66437db497dcdd36742c50aa664cfd6d023f8e6d4bd icon: https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/assets/jenkins-operator-icon.png name: jenkins-operator urls: - - https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator-0.0.6.tgz + - https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator/jenkins-operator-0.0.6.tgz version: 0.0.6 - apiVersion: v1 appVersion: 0.3.1 - created: "2020-04-22T14:46:38.583309+02:00" + created: "2020-04-29T14:28:50.14346+02:00" description: Kubernetes native operator which fully manages Jenkins on Kubernetes digest: e6914be2c96a7ae8c7794e0d356b073394d1ee99465c7a26aeb77a22a5b4b22d icon: https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/assets/jenkins-operator-icon.png name: jenkins-operator urls: - - https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator-0.0.5.tgz + - https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator/jenkins-operator-0.0.5.tgz version: 0.0.5 - apiVersion: v1 appVersion: 0.3.0 - created: "2020-04-22T14:46:38.58258+02:00" + created: "2020-04-29T14:28:50.142743+02:00" description: Kubernetes native operator which fully manages Jenkins on Kubernetes digest: 82d3748cce50ebc9fdcebba419c11dac0557e5ba2441b8deb5da49aa879b692a icon: https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/assets/jenkins-operator-icon.png name: jenkins-operator urls: - - https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator-0.0.4.tgz + - https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator/jenkins-operator-0.0.4.tgz version: 0.0.4 - apiVersion: v1 appVersion: 0.2.2 - created: "2020-04-22T14:46:38.581835+02:00" + created: "2020-04-29T14:28:50.142042+02:00" description: Kubernetes native operator which fully manages Jenkins on Kubernetes digest: 2b2e4d9399fdf49e6ed33753fd69619068da16b1ffbae6f27bce89cbf83e8174 name: jenkins-operator urls: - - https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator-0.0.3.tgz + - https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator/jenkins-operator-0.0.3.tgz version: 0.0.3 - apiVersion: v1 appVersion: 0.2.2 - created: "2020-04-22T14:46:38.581111+02:00" + created: "2020-04-29T14:28:50.141306+02:00" description: Kubernetes native operator which fully manages Jenkins on Kubernetes digest: 16229e795a171427cd019fd623569aab1672618d7bc1d6b2c9fd627310fa00ef name: jenkins-operator urls: - - https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator-0.0.2.tgz + - https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator/jenkins-operator-0.0.2.tgz version: 0.0.2 - apiVersion: v1 appVersion: 0.2.0 - created: "2020-04-22T14:46:38.580432+02:00" + created: "2020-04-29T14:28:50.14061+02:00" description: Kubernetes native operator which fully manages Jenkins on Kubernetes digest: d5828cba35e435fc6526d235ec98b3ffdb8d6ed20b82c953a81a5c1f660d1fb3 name: jenkins-operator urls: - - https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator-0.0.1.tgz + - https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator/jenkins-operator-0.0.1.tgz version: 0.0.1 -generated: "2020-04-22T14:46:38.578689+02:00" +generated: "2020-04-29T14:28:50.137166+02:00" diff --git a/chart/jenkins-operator/Chart.yaml b/chart/jenkins-operator/Chart.yaml index 2ed46401d..b3f9116bb 100644 --- a/chart/jenkins-operator/Chart.yaml +++ b/chart/jenkins-operator/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v1 appVersion: "0.4.0" description: Kubernetes native operator which fully manages Jenkins on Kubernetes name: jenkins-operator -version: 0.1.3 +version: 0.1.4 icon: https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/assets/jenkins-operator-icon.png diff --git a/chart/jenkins-operator/jenkins-operator-0.1.4.tgz b/chart/jenkins-operator/jenkins-operator-0.1.4.tgz new file mode 100644 index 0000000000000000000000000000000000000000..ed5d5274d929757d4e384ada4c9a93dec9002748 GIT binary patch literal 3804 zcmV<24kPg&iwG0|00000|0w_~VMtOiV@ORlOnEsqVl!4SWK%V1T2nbTPgYhoO;>Dc zVQyr3R8em|NM&qo0PH+#bK5wQ^O?V*PuZ78mf?8tKqLgIXw+NPjR8vd6~G4hAA4i3DgTqh z$zJ|4V2nSk_2U8jk zOdnS+vSuyYgvKaNGm$inSqsKw$}sdni4^miWdYL&@Q+8wzy5aq;pFW_Rt=D?Qy&Hv zn4<45Z%%)GdwTid=d*Wj8oi6N=BxuI>(UG zPnLnd^jyz7Mx-=M>-F-w zRh9ur`UQPB{E24I0;S>t*UwPishFZAXK94*cp58NjEMBpIZ=x?_5sxOtHoD)oHa?s zh_Y%*B%ZT$u2&)a*MB?NLYdKdDoDnXV(nB_NAj45SkPyh-jU?AMoB(I;J43|EE>;K#?CpT!Ho|`?3&!vS}rpZ3P#rECV!R*3DAcSXC!4xS8_#XG{`tx z3`}bCAyD#E1eo)R(TEm&0|=7ThvA{;MR`Sp5f?W;jLUWSDMi^F(CB>VdGB<0i9sr; zx;fU|{;bTHnfyucH1T2Rc}9dp8Xw8uB#N?5B8I>4X+g4C$QjOlbHM>5TFps4o$s@L z$BfX(k~SLE7ePL>5cEu0&So^G>L#Cj?e}OjXG;`HvGTIa5UWef4e9{7k(!ySd@D;8cRju0AY$Wot<&F270f6@b(7!^k!DM8YA?YD=SkJJ?K~6^acc66L8k5r&KMrQwv}9-Y5=W zGR}U|=rWzn=x6BlD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pinWE~v-&j>1d3v>`c+L=c+Zw^JgPfb?eb?|46-7K_I07Hke3X0O8~ne~t5Ng(Z!+HJfA6OB`~BSCyWk9K zr+s2d0+*y}!3F(dP9Q$M&aZ^8N$@Idibz>;1Ct~)yTWP3&GMVfD+;h*cp9>-FsC39 zNu<>$^ApV05XICQK1WrJ%o1?R$21A;M@D7U^;$cKUBqh7xQpDd^ph*{LV^*GC0bR5 z`)b!oMHJ3bCOcl``kqo}0fKCl^|Z+gqedXG9{{ER^x=HAQR-NEA$JC;;IZ_BGRW-qyupk-Ims`ggL zb-hpyW;7;@enHVnc)6Hb>8ZYh(S^y#=;MfPbuZn7yRxh38>ORV-E6P_H`xCVxrjc< z57=P;z42t&%>VR;2YdU!i&D4$KbqNoR5w7T(?2lKd)+=5OqaD#!WsvHGt4(>mW$Ha z9ZF$aL-hY=U;aL2jrvas`(a=-M%Qsq zEsNorfK1Ly_U#Ml zymaMt;=FXHuZxKP3UMkhEcI`ilm{-D5L74rKO8`mZdCG{e zYh}Ro2BZAKRp>zRAr5JOX%@5#RDSRl^2CSchgOSw+htvI@NkR4<{O|-y#V%QU-soM STmCly0RR7*2-;}?VgLXX0Cw;I literal 0 HcmV?d00001 diff --git a/chart/jenkins-operator/templates/configuration.yaml b/chart/jenkins-operator/templates/configuration.yaml index 910c7310e..bd099f37f 100644 --- a/chart/jenkins-operator/templates/configuration.yaml +++ b/chart/jenkins-operator/templates/configuration.yaml @@ -1,21 +1,27 @@ -{{ if .Values.jenkins.configuration.configurationAsCode.content }} +{{ range .Values.jenkins.configuration.configurationAsCode }} + {{ if .content }} +--- apiVersion: v1 kind: ConfigMap metadata: - name: jenkins-{{ .Values.jenkins.name }}-casc + name: {{ .configMapName }} namespace: {{ .Values.jenkins.namespace }} -{{- with .Values.jenkins.configuration.configurationAsCode.content }} +{{- with .content }} data: {{ toYaml . | nindent 2 }} {{- end }} + {{ end }} {{ end }} -{{ if .Values.jenkins.configuration.groovyScripts.content }} + +{{ range .Values.jenkins.configuration.groovyScripts }} + {{ if .content }} --- apiVersion: v1 kind: ConfigMap metadata: - name: jenkins-{{ .Values.jenkins.name }}-gs + name: {{ .configMapName }} namespace: {{ .Values.jenkins.namespace }} -{{- with .Values.jenkins.configuration.groovyScripts.content }} +{{- with .content }} data: {{ toYaml . | nindent 2 }} {{- end }} + {{ end }} {{ end }} \ No newline at end of file diff --git a/chart/jenkins-operator/templates/jenkins.yaml b/chart/jenkins-operator/templates/jenkins.yaml index 5defddec8..7fab45fe4 100644 --- a/chart/jenkins-operator/templates/jenkins.yaml +++ b/chart/jenkins-operator/templates/jenkins.yaml @@ -5,28 +5,28 @@ metadata: name: {{ .Values.jenkins.name }} namespace: {{ .Values.jenkins.namespace }} spec: - {{- if .Values.jenkins.configuration.configurationAsCode.content }} configurationAsCode: configurations: - - name: jenkins-{{ .Values.jenkins.name }}-casc + {{- range .Values.jenkins.configuration.configurationAsCode }} + - name: {{ .configMapName }} + {{- end }} secret: {{- if .Values.jenkins.configuration.secretRefName }} name: {{ .Values.jenkins.configuration.secretRefName }} {{ else if .Values.jenkins.configuration.secretData }} name: jenkins-{{ .Values.jenkins.name }} {{- end }} - {{- end }} - {{- if .Values.jenkins.configuration.groovyScripts.content }} groovyScripts: configurations: - - name: jenkins-{{ .Values.jenkins.name }}-gs + {{- range .Values.jenkins.configuration.groovyScripts }} + - name: {{ .configMapName }} + {{- end }} secret: {{- if .Values.jenkins.configuration.secretRefName }} name: {{ .Values.jenkins.configuration.secretRefName }} {{ else if .Values.jenkins.configuration.secretData }} name: jenkins-{{ .Values.jenkins.name }} {{- end }} - {{- end }} {{- if .Values.jenkins.backup.enabled }} backup: containerName: {{ .Values.jenkins.backup.containerName }} diff --git a/chart/jenkins-operator/values.yaml b/chart/jenkins-operator/values.yaml index ff98a09f2..64651850e 100644 --- a/chart/jenkins-operator/values.yaml +++ b/chart/jenkins-operator/values.yaml @@ -186,8 +186,10 @@ jenkins: # See https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/customization/ for details configuration: configurationAsCode: + - configMapName: jenkins-casc content: {} groovyScripts: + - configMapName: jenkins-gs content: {} # secretRefName of existing secret (previously created)