helm: Make namespace configurable and CR opt out

This commit is contained in:
Endre Karlson 2019-10-16 23:43:40 +02:00
parent 930058d5b2
commit eeb8b5cf89
4 changed files with 56 additions and 52 deletions

View File

@ -2,4 +2,4 @@ apiVersion: v1
appVersion: "0.2.2" appVersion: "0.2.2"
description: Kubernetes native operator which fully manages Jenkins on Kubernetes description: Kubernetes native operator which fully manages Jenkins on Kubernetes
name: jenkins-operator name: jenkins-operator
version: 0.0.2 version: 0.0.3

View File

@ -1,6 +1,9 @@
{{ if .Values.jenkins.enabled }}
apiVersion: {{ .Values.jenkins.apiVersion }} apiVersion: {{ .Values.jenkins.apiVersion }}
kind: Jenkins kind: Jenkins
metadata: metadata:
name: {{ .Values.jenkins.name }} name: {{ .Values.jenkins.name }}
namespace: {{ .Release.Namespace }}
spec: spec:
{{- toYaml .Values.jenkins.spec | nindent 4 }} {{- toYaml .Values.jenkins.spec | nindent 4 }}
{{- end }}

View File

@ -1,19 +1,19 @@
apiVersion: apiextensions.k8s.io/v1beta1 apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
name: jenkins.jenkins.io name: jenkins.jenkins.io
spec: spec:
group: jenkins.io group: jenkins.io
names: names:
kind: Jenkins kind: Jenkins
listKind: JenkinsList listKind: JenkinsList
plural: jenkins plural: jenkins
singular: jenkins singular: jenkins
scope: Namespaced scope: Namespaced
versions: versions:
- name : v1alpha2 - name : v1alpha2
served: true served: true
storage: true storage: true
- name : v1alpha1 - name : v1alpha1
served: true served: true
storage: false storage: false

View File

@ -14,41 +14,42 @@ nameOverride: ""
fullnameOverride: "" fullnameOverride: ""
jenkins: jenkins:
apiVersion: jenkins.io/v1alpha2 enabled: true
name: example apiVersion: jenkins.io/v1alpha2
spec: name: example
master: spec:
containers: master:
- name: jenkins-master containers:
image: jenkins/jenkins:lts - name: jenkins-master
imagePullPolicy: Always image: jenkins/jenkins:lts
livenessProbe: imagePullPolicy: Always
failureThreshold: 12 livenessProbe:
httpGet: failureThreshold: 12
path: /login httpGet:
port: http path: /login
scheme: HTTP port: http
initialDelaySeconds: 80 scheme: HTTP
periodSeconds: 10 initialDelaySeconds: 80
successThreshold: 1 periodSeconds: 10
timeoutSeconds: 5 successThreshold: 1
readinessProbe: timeoutSeconds: 5
failureThreshold: 3 readinessProbe:
httpGet: failureThreshold: 3
path: /login httpGet:
port: http path: /login
scheme: HTTP port: http
initialDelaySeconds: 30 scheme: HTTP
periodSeconds: 10 initialDelaySeconds: 30
successThreshold: 1 periodSeconds: 10
timeoutSeconds: 1 successThreshold: 1
resources: timeoutSeconds: 1
limits: resources:
cpu: 1500m limits:
memory: 3Gi cpu: 1500m
requests: memory: 3Gi
cpu: "1" requests:
memory: 500Mi cpu: "1"
memory: 500Mi
resources: {} resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious # We usually recommend not to specify default resources and to leave this as a conscious