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"
description: Kubernetes native operator which fully manages Jenkins on Kubernetes
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 }}
kind: Jenkins
metadata:
name: {{ .Values.jenkins.name }}
namespace: {{ .Release.Namespace }}
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
kind: CustomResourceDefinition
metadata:
name: jenkins.jenkins.io
name: jenkins.jenkins.io
spec:
group: jenkins.io
names:
kind: Jenkins
listKind: JenkinsList
plural: jenkins
singular: jenkins
scope: Namespaced
versions:
- name : v1alpha2
served: true
storage: true
- name : v1alpha1
served: true
storage: false
group: jenkins.io
names:
kind: Jenkins
listKind: JenkinsList
plural: jenkins
singular: jenkins
scope: Namespaced
versions:
- name : v1alpha2
served: true
storage: true
- name : v1alpha1
served: true
storage: false

View File

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