Skip to content

Commit

Permalink
Improve helm chart configuration as code and groovy script section
Browse files Browse the repository at this point in the history
  • Loading branch information
tumevoiz authored and akram committed May 6, 2020
1 parent 7895edd commit 38fa7bc
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 38 deletions.
70 changes: 45 additions & 25 deletions chart/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion chart/jenkins-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Binary file added chart/jenkins-operator/jenkins-operator-0.1.4.tgz
Binary file not shown.
18 changes: 12 additions & 6 deletions chart/jenkins-operator/templates/configuration.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
12 changes: 6 additions & 6 deletions chart/jenkins-operator/templates/jenkins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 2 additions & 0 deletions chart/jenkins-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 38fa7bc

Please sign in to comment.