mirror of
https://github.com/jenkinsci/kubernetes-operator.git
synced 2026-10-19 17:33:51 +02:00
Migrate Helm Chart to OSDK v1.3.0 (#551)
Migrate Helm Chart to OSDK v1.3.0
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,19 +0,0 @@
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: jenkinsimages.jenkins.io
|
||||
spec:
|
||||
group: jenkins.io
|
||||
names:
|
||||
kind: JenkinsImage
|
||||
listKind: JenkinsImageList
|
||||
plural: jenkinsimages
|
||||
singular: jenkinsimage
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name : v1alpha2
|
||||
served: true
|
||||
storage: true
|
||||
- name : v1alpha1
|
||||
served: true
|
||||
storage: false
|
||||
@@ -7,54 +7,80 @@ metadata:
|
||||
name: jenkins-operator
|
||||
namespace: {{ $namespace }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services
|
||||
- configmaps
|
||||
- secrets
|
||||
verbs:
|
||||
- get
|
||||
- create
|
||||
- update
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- deployments
|
||||
- daemonsets
|
||||
- deployments
|
||||
- replicasets
|
||||
- statefulsets
|
||||
verbs:
|
||||
- '*'
|
||||
- apiGroups:
|
||||
- ""
|
||||
- apps
|
||||
- jenkins-operator
|
||||
resources:
|
||||
- serviceaccounts
|
||||
- deployments/finalizers
|
||||
verbs:
|
||||
- get
|
||||
- create
|
||||
- update
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- rbac.authorization.k8s.io
|
||||
- build.openshift.io
|
||||
resources:
|
||||
- roles
|
||||
- rolebindings
|
||||
- buildconfigs
|
||||
- builds
|
||||
verbs:
|
||||
- get
|
||||
- create
|
||||
- update
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods/portforward
|
||||
- configmaps
|
||||
- secrets
|
||||
- services
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumeclaims
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
- pods/exec
|
||||
verbs:
|
||||
- '*'
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
@@ -66,28 +92,41 @@ rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
- pods/exec
|
||||
- pods/portforward
|
||||
verbs:
|
||||
- "*"
|
||||
- create
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
- serviceaccounts
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- image.openshift.io
|
||||
resources:
|
||||
- imagestreams
|
||||
verbs:
|
||||
- get
|
||||
- watch
|
||||
- list
|
||||
- create
|
||||
- patch
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps
|
||||
resourceNames:
|
||||
- jenkins-operator
|
||||
- jenkins.io
|
||||
resources:
|
||||
- deployments/finalizers
|
||||
- jenkins/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- jenkins.io
|
||||
resources:
|
||||
- jenkins/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- jenkins.io
|
||||
resources:
|
||||
@@ -95,23 +134,26 @@ rules:
|
||||
verbs:
|
||||
- '*'
|
||||
- apiGroups:
|
||||
- ""
|
||||
- rbac.authorization.k8s.io
|
||||
resources:
|
||||
- persistentvolumeclaims
|
||||
- rolebindings
|
||||
- roles
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- "route.openshift.io"
|
||||
resources:
|
||||
- routes
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- "image.openshift.io"
|
||||
resources:
|
||||
|
||||
@@ -9,31 +9,41 @@ metadata:
|
||||
{{- end }}
|
||||
spec:
|
||||
configurationAsCode:
|
||||
configurations:
|
||||
{{- range .Values.jenkins.configuration.configurationAsCode }}
|
||||
- name: {{ .configMapName }}
|
||||
{{- end }}
|
||||
{{- if .Values.jenkins.configuration.configurationAsCode }}
|
||||
configurations:
|
||||
{{ 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 }}
|
||||
{{- else }}
|
||||
configurations: []
|
||||
secret:
|
||||
name: ""
|
||||
{{- end }}
|
||||
groovyScripts:
|
||||
configurations:
|
||||
{{- range .Values.jenkins.configuration.groovyScripts }}
|
||||
- name: {{ .configMapName }}
|
||||
{{- end }}
|
||||
{{- if .Values.jenkins.configuration.groovyScripts }}
|
||||
configurations:
|
||||
{{- 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 }}
|
||||
{{- else }}
|
||||
configurations: []
|
||||
secret:
|
||||
name: ""
|
||||
{{- end }}
|
||||
jenkinsAPISettings:
|
||||
authorizationStrategy: {{ .Values.jenkins.authorizationStrategy }}
|
||||
{{- if .Values.jenkins.backup.enabled }}
|
||||
backup:
|
||||
containerName: {{ .Values.jenkins.backup.containerName }}
|
||||
@@ -84,7 +94,11 @@ spec:
|
||||
{{- with .Values.jenkins.plugins }}
|
||||
plugins: {{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
priorityClassName: {{ .Values.jenkins.priorityClassName }}
|
||||
{{- if .Values.jenkins.priorityClassName }}
|
||||
priorityClassName: {{- .Values.jenkins.priorityClassName }}
|
||||
{{- else }}
|
||||
priorityClassName: ""
|
||||
{{- end }}
|
||||
disableCSRFProtection: {{ .Values.jenkins.disableCSRFProtection }}
|
||||
containers:
|
||||
- name: jenkins-master
|
||||
@@ -112,6 +126,9 @@ spec:
|
||||
- name: {{ .Values.jenkins.backup.containerName }}
|
||||
image: {{ .Values.jenkins.backup.image }}
|
||||
imagePullPolicy: IfNotPresent
|
||||
{{- with .Values.jenkins.backup.resources }}
|
||||
resources: {{ toYaml . | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- with .Values.jenkins.backup.env }}
|
||||
env: {{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
---
|
||||
# permissions to do leader election.
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: leader-election-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
- coordination.k8s.io
|
||||
resources:
|
||||
- configmaps
|
||||
- leases
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
@@ -0,0 +1,12 @@
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: leader-election-rolebinding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: leader-election-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: jenkins-operator
|
||||
@@ -30,7 +30,7 @@ spec:
|
||||
containerPort: 80
|
||||
protocol: TCP
|
||||
command:
|
||||
- jenkins-operator
|
||||
- /manager
|
||||
args: []
|
||||
env:
|
||||
- name: WATCH_NAMESPACE
|
||||
|
||||
@@ -63,7 +63,7 @@ jenkins:
|
||||
#
|
||||
# basePlugins:
|
||||
# - name: kubernetes
|
||||
# version: 1.28.6
|
||||
# version: 1.29.2
|
||||
# - name: workflow-job
|
||||
# version: "2.40"
|
||||
# - name: workflow-aggregator
|
||||
@@ -136,6 +136,9 @@ jenkins:
|
||||
# volumeMounts are mounts for Jenkins pod
|
||||
volumeMounts: []
|
||||
|
||||
# defines authorization strategy of the operator for the Jenkins API
|
||||
authorizationStrategy: createUser
|
||||
|
||||
# securityContext for pod
|
||||
securityContext:
|
||||
runAsUser: 1000
|
||||
@@ -216,6 +219,15 @@ jenkins:
|
||||
# See https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class-1 for more details
|
||||
className: ""
|
||||
|
||||
# resources used by backup container
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1500m
|
||||
memory: 1Gi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
|
||||
# env contains container environment variables
|
||||
# PVC backup provider handles these variables:
|
||||
# BACKUP_DIR - path for storing backup files (default: "/backup")
|
||||
|
||||
Reference in New Issue
Block a user