Merge pull request #354 from jakalkhalili/feature/improve-casc-gs-helm-chart
Improve helm chart configuration as code and groovy script section
This commit is contained in:
		
						commit
						c82b6a1346
					
				|  | @ -3,7 +3,17 @@ entries: | |||
|   jenkins-operator: | ||||
|   - apiVersion: v1 | ||||
|     appVersion: 0.4.0 | ||||
|     created: "2020-04-22T20:36:21.525010622+02:00" | ||||
|     created: "2020-04-30T09:52:29.969939+02:00" | ||||
|     description: Kubernetes native operator which fully manages Jenkins on Kubernetes | ||||
|     digest: 35ea98d6836b09946dcb1cb250c5e2b84391b92033f6ce8a0124ae15169b9db7 | ||||
|     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.2.0.tgz | ||||
|     version: 0.2.0 | ||||
|   - apiVersion: v1 | ||||
|     appVersion: 0.4.0 | ||||
|     created: "2020-04-30T09:52:29.98191+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 | ||||
|  | @ -13,7 +23,7 @@ entries: | |||
|     version: 0.1.3 | ||||
|   - apiVersion: v1 | ||||
|     appVersion: 0.4.0 | ||||
|     created: "2020-04-22T20:36:21.531498808+02:00" | ||||
|     created: "2020-04-30T09:52:29.980524+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 | ||||
|  | @ -23,7 +33,7 @@ entries: | |||
|     version: 0.1.2 | ||||
|   - apiVersion: v1 | ||||
|     appVersion: 0.4.0 | ||||
|     created: "2020-04-22T14:46:38.589196+02:00" | ||||
|     created: "2020-04-30T09:52:29.979597+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 | ||||
|  | @ -33,7 +43,7 @@ entries: | |||
|     version: 0.1.1 | ||||
|   - apiVersion: v1 | ||||
|     appVersion: 0.3.3 | ||||
|     created: "2020-04-22T14:46:38.587508+02:00" | ||||
|     created: "2020-04-30T09:52:29.976979+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 | ||||
|  | @ -43,7 +53,7 @@ entries: | |||
|     version: 0.1.0 | ||||
|   - apiVersion: v1 | ||||
|     appVersion: 0.3.3 | ||||
|     created: "2020-04-22T14:46:38.586346+02:00" | ||||
|     created: "2020-04-30T09:52:29.975998+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 | ||||
|  | @ -53,7 +63,7 @@ entries: | |||
|     version: 0.0.8 | ||||
|   - apiVersion: v1 | ||||
|     appVersion: 0.3.3 | ||||
|     created: "2020-04-22T14:46:38.584846+02:00" | ||||
|     created: "2020-04-30T09:52:29.975342+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 | ||||
|  | @ -63,7 +73,7 @@ entries: | |||
|     version: 0.0.7 | ||||
|   - apiVersion: v1 | ||||
|     appVersion: 0.3.2 | ||||
|     created: "2020-04-22T14:46:38.584064+02:00" | ||||
|     created: "2020-04-30T09:52:29.974625+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 | ||||
|  | @ -73,7 +83,7 @@ entries: | |||
|     version: 0.0.6 | ||||
|   - apiVersion: v1 | ||||
|     appVersion: 0.3.1 | ||||
|     created: "2020-04-22T14:46:38.583309+02:00" | ||||
|     created: "2020-04-30T09:52:29.973589+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 | ||||
|  | @ -83,7 +93,7 @@ entries: | |||
|     version: 0.0.5 | ||||
|   - apiVersion: v1 | ||||
|     appVersion: 0.3.0 | ||||
|     created: "2020-04-22T14:46:38.58258+02:00" | ||||
|     created: "2020-04-30T09:52:29.972746+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 | ||||
|  | @ -93,7 +103,7 @@ entries: | |||
|     version: 0.0.4 | ||||
|   - apiVersion: v1 | ||||
|     appVersion: 0.2.2 | ||||
|     created: "2020-04-22T14:46:38.581835+02:00" | ||||
|     created: "2020-04-30T09:52:29.972076+02:00" | ||||
|     description: Kubernetes native operator which fully manages Jenkins on Kubernetes | ||||
|     digest: 2b2e4d9399fdf49e6ed33753fd69619068da16b1ffbae6f27bce89cbf83e8174 | ||||
|     name: jenkins-operator | ||||
|  | @ -102,7 +112,7 @@ entries: | |||
|     version: 0.0.3 | ||||
|   - apiVersion: v1 | ||||
|     appVersion: 0.2.2 | ||||
|     created: "2020-04-22T14:46:38.581111+02:00" | ||||
|     created: "2020-04-30T09:52:29.971412+02:00" | ||||
|     description: Kubernetes native operator which fully manages Jenkins on Kubernetes | ||||
|     digest: 16229e795a171427cd019fd623569aab1672618d7bc1d6b2c9fd627310fa00ef | ||||
|     name: jenkins-operator | ||||
|  | @ -111,11 +121,11 @@ entries: | |||
|     version: 0.0.2 | ||||
|   - apiVersion: v1 | ||||
|     appVersion: 0.2.0 | ||||
|     created: "2020-04-22T14:46:38.580432+02:00" | ||||
|     created: "2020-04-30T09:52:29.970732+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 | ||||
|     version: 0.0.1 | ||||
| generated: "2020-04-22T14:46:38.578689+02:00" | ||||
| generated: "2020-04-30T09:52:29.967329+02:00" | ||||
|  |  | |||
|  | @ -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.2.0 | ||||
| icon: https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/assets/jenkins-operator-icon.png | ||||
|  |  | |||
										
											Binary file not shown.
										
									
								
							|  | @ -1,21 +1,28 @@ | |||
| {{ if .Values.jenkins.configuration.configurationAsCode.content }} | ||||
| apiVersion: v1 | ||||
| kind: ConfigMap | ||||
| metadata: | ||||
|   name: jenkins-{{ .Values.jenkins.name }}-casc | ||||
|   namespace: {{ .Values.jenkins.namespace }} | ||||
| {{- with .Values.jenkins.configuration.configurationAsCode.content }} | ||||
| data: {{ toYaml . | nindent 2 }} | ||||
| {{- end }} | ||||
| {{ end }} | ||||
| {{ if .Values.jenkins.configuration.groovyScripts.content }} | ||||
| {{- $root := . -}} | ||||
| {{ range .Values.jenkins.configuration.configurationAsCode }} | ||||
|   {{ if .content }} | ||||
| --- | ||||
| apiVersion: v1 | ||||
| kind: ConfigMap | ||||
| metadata: | ||||
|   name: jenkins-{{ .Values.jenkins.name }}-gs | ||||
|   namespace: {{ .Values.jenkins.namespace }} | ||||
| {{- with .Values.jenkins.configuration.groovyScripts.content }} | ||||
|   name: {{ .configMapName }} | ||||
|   namespace: {{ $root.Values.jenkins.namespace }} | ||||
| {{- with .content }} | ||||
| data: {{ toYaml . | nindent 2 }} | ||||
| {{- end }} | ||||
|   {{ end }} | ||||
| {{ end }} | ||||
| 
 | ||||
| {{ range .Values.jenkins.configuration.groovyScripts }} | ||||
|   {{ if .content }} | ||||
| --- | ||||
| apiVersion: v1 | ||||
| kind: ConfigMap | ||||
| metadata: | ||||
|   name: {{ .configMapName }} | ||||
|   namespace: {{ $root.Values.jenkins.namespace }} | ||||
| {{- with .content }} | ||||
| data: {{ toYaml . | nindent 2 }} | ||||
| {{- end }} | ||||
|   {{ end }} | ||||
| {{ end }} | ||||
|  | @ -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 }} | ||||
|  | @ -64,6 +64,7 @@ spec: | |||
|     {{- with .Values.jenkins.plugins }} | ||||
|     plugins: {{ toYaml . | nindent 4 }} | ||||
|     {{- end }} | ||||
|     priorityClassName: {{ .Values.jenkins.priorityClassName }} | ||||
|     disableCSRFProtection: {{ .Values.jenkins.disableCSRFProtection }} | ||||
|     containers: | ||||
|       - name:  jenkins-master | ||||
|  |  | |||
|  | @ -28,6 +28,10 @@ jenkins: | |||
|   # imagePullPolicy defines policy for pulling images | ||||
|   imagePullPolicy: Always | ||||
| 
 | ||||
|   # priorityClassName indicates the importance of a Pod relative to other Pods | ||||
|   # See: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ | ||||
|   priorityClassName: "" | ||||
| 
 | ||||
|   # disableCSRFProtection can enable or disable operator built-in CSRF protection | ||||
|   # Set it to true if you are using OpenShift Jenkins Plugin | ||||
|   # See https://github.com/jenkinsci/kubernetes-operator/pull/193 for more info | ||||
|  | @ -185,10 +189,12 @@ jenkins: | |||
|   # configuration is section where we can configure Jenkins instance | ||||
|   # See https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/customization/ for details | ||||
|   configuration: | ||||
|     configurationAsCode: | ||||
|       content: {} | ||||
|     groovyScripts: | ||||
|       content: {} | ||||
|     configurationAsCode: {} | ||||
| #    - configMapName: jenkins-casc | ||||
| #      content: {} | ||||
|     groovyScripts: {} | ||||
| #    - configMapName: jenkins-gs | ||||
| #      content: {} | ||||
| 
 | ||||
|     # secretRefName of existing secret (previously created) | ||||
|     secretRefName: "" | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue