Added chart versions:
cerbos/cerbos: - 0.38.1 jenkins/jenkins: - 5.5.4 kubemq/kubemq-controller: - 1.12.0 redpanda/redpanda: - 5.8.14pull/1059/head
parent
c5276bf148
commit
33c9b676a7
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,23 @@
|
||||||
|
# Patterns to ignore when building packages.
|
||||||
|
# This supports shell glob matching, relative path matching, and
|
||||||
|
# negation (prefixed with !). Only one pattern per line.
|
||||||
|
.DS_Store
|
||||||
|
# Common VCS dirs
|
||||||
|
.git/
|
||||||
|
.gitignore
|
||||||
|
.bzr/
|
||||||
|
.bzrignore
|
||||||
|
.hg/
|
||||||
|
.hgignore
|
||||||
|
.svn/
|
||||||
|
# Common backup files
|
||||||
|
*.swp
|
||||||
|
*.bak
|
||||||
|
*.tmp
|
||||||
|
*.orig
|
||||||
|
*~
|
||||||
|
# Various IDEs
|
||||||
|
.project
|
||||||
|
.idea/
|
||||||
|
*.tmproj
|
||||||
|
.vscode/
|
|
@ -0,0 +1,27 @@
|
||||||
|
annotations:
|
||||||
|
catalog.cattle.io/certified: partner
|
||||||
|
catalog.cattle.io/display-name: Cerbos
|
||||||
|
catalog.cattle.io/kube-version: '>=1.23.0-0'
|
||||||
|
catalog.cattle.io/release-name: cerbos
|
||||||
|
apiVersion: v2
|
||||||
|
appVersion: 0.38.1
|
||||||
|
description: A Helm chart to deploy Cerbos. Cerbos is an open core, language agnostic,
|
||||||
|
scalable solution that makes user permissions and authorization simple to implement
|
||||||
|
and manage by writing context-aware access control policies for your application
|
||||||
|
resources.
|
||||||
|
home: https://cerbos.dev
|
||||||
|
icon: file://assets/icons/cerbos.png
|
||||||
|
keywords:
|
||||||
|
- abac
|
||||||
|
- authorization
|
||||||
|
- developer tools
|
||||||
|
- policies
|
||||||
|
- rbac
|
||||||
|
- security
|
||||||
|
kubeVersion: '>=1.23.0-0'
|
||||||
|
maintainers:
|
||||||
|
- email: help+helm@cerbos.dev
|
||||||
|
name: Cerbos authors
|
||||||
|
name: cerbos
|
||||||
|
type: application
|
||||||
|
version: 0.38.1
|
|
@ -0,0 +1,9 @@
|
||||||
|
Cerbos Helm Chart
|
||||||
|
=================
|
||||||
|
|
||||||
|
Cerbos is the open core, language-agnostic, scalable authorization solution that makes user permissions and authorization simple to implement and manage by writing context-aware access control policies for your application resources.
|
||||||
|
|
||||||
|
* [Cerbos website](https://cerbos.dev)
|
||||||
|
* [Cerbos documentation](https://docs.cerbos.dev)
|
||||||
|
* [Cerbos GitHub repository](https://github.com/cerbos/cerbos)
|
||||||
|
* [Cerbos Slack community](http://go.cerbos.io/slack)
|
|
@ -0,0 +1,5 @@
|
||||||
|
## Cerbos
|
||||||
|
|
||||||
|
Implement roles and permissions in your application in minutes with Cerbos. Cerbos is a plug and play collaborative authorization service for developer, product and security teams.
|
||||||
|
|
||||||
|
A guide for how to deploy Cerbos can be found on the [Cerbos Documentation](https://docs.cerbos.dev/cerbos/latest/installation/helm) site.
|
|
@ -0,0 +1,17 @@
|
||||||
|
You have successfully deployed Cerbos.
|
||||||
|
|
||||||
|
You can get started with the API by accessing the Cerbos OpenAPI definitions as follows:
|
||||||
|
{{- $scheme := (include "cerbos.httpScheme" .) -}}
|
||||||
|
{{- if contains "NodePort" .Values.service.type }}
|
||||||
|
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "cerbos.fullname" . }})
|
||||||
|
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||||
|
echo {{ $scheme }}://$NODE_IP:$NODE_PORT/schema/swagger.json
|
||||||
|
{{- else if contains "LoadBalancer" .Values.service.type }}
|
||||||
|
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||||
|
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "cerbos.fullname" . }}'
|
||||||
|
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "cerbos.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||||
|
echo {{ $scheme }}://$SERVICE_IP:{{ .Values.service.port }}/schema/swagger.json
|
||||||
|
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||||
|
echo "Download OpenAPI definition by accesing {{ $scheme }}://127.0.0.1:{{ .Values.service.httpPort }}/schema/swagger.json"
|
||||||
|
kubectl --namespace {{ .Release.Namespace }} port-forward svc/{{ include "cerbos.fullname" . }} {{ .Values.service.httpPort }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,191 @@
|
||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "cerbos.name" -}}
|
||||||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
If release name contains chart name it will be used as a full name.
|
||||||
|
*/}}
|
||||||
|
{{- define "cerbos.fullname" -}}
|
||||||
|
{{- if .Values.fullnameOverride }}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- else }}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||||
|
{{- if contains $name .Release.Name }}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- else }}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create chart name and version as used by the chart label.
|
||||||
|
*/}}
|
||||||
|
{{- define "cerbos.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Common labels
|
||||||
|
*/}}
|
||||||
|
{{- define "cerbos.labels" -}}
|
||||||
|
helm.sh/chart: {{ include "cerbos.chart" . }}
|
||||||
|
{{ include "cerbos.selectorLabels" . }}
|
||||||
|
{{- if .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
|
{{- end }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
{{- with .Values.commonLabels }}
|
||||||
|
{{ toYaml . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Selector labels
|
||||||
|
*/}}
|
||||||
|
{{- define "cerbos.selectorLabels" -}}
|
||||||
|
app.kubernetes.io/name: {{ include "cerbos.name" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Name of the secret used to read the TLS certificates from
|
||||||
|
*/}}
|
||||||
|
{{- define "cerbos.tlsSecretName" -}}
|
||||||
|
{{ coalesce .Values.cerbos.tlsSecretName .Values.certManager.certSpec.secretName "None" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Determine the scheme based on whether the TLS secret is defined or not
|
||||||
|
*/}}
|
||||||
|
{{- define "cerbos.httpScheme" -}}
|
||||||
|
{{- $tlsDisabled := (eq (include "cerbos.tlsSecretName" .) "None") -}}
|
||||||
|
{{- if $tlsDisabled -}}
|
||||||
|
http
|
||||||
|
{{- else -}}
|
||||||
|
https
|
||||||
|
{{- end -}}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Prometheus annotations
|
||||||
|
*/}}
|
||||||
|
{{- define "cerbos.promAnnotations" -}}
|
||||||
|
prometheus.io/scrape: "true"
|
||||||
|
prometheus.io/port: "{{ .Values.cerbos.httpPort }}"
|
||||||
|
prometheus.io/path: "/_cerbos/metrics"
|
||||||
|
prometheus.io/scheme: {{ include "cerbos.httpScheme" . }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Generate pod annotations based on config
|
||||||
|
*/}}
|
||||||
|
{{- define "cerbos.podAnnotations" -}}
|
||||||
|
{{- $annotations := mustMergeOverwrite .Values.podAnnotations (dict "checksum/config" (include "cerbos.config" . | sha256sum)) -}}
|
||||||
|
{{- if .Values.cerbos.prometheusPodAnnotationsEnabled -}}
|
||||||
|
{{- $promAnnotations := (include "cerbos.promAnnotations" .)| fromYaml -}}
|
||||||
|
{{- $annotations = mustMergeOverwrite $annotations $promAnnotations -}}
|
||||||
|
{{- end -}}
|
||||||
|
annotations:
|
||||||
|
{{- $annotations | toYaml | nindent 2 }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service account to use
|
||||||
|
*/}}
|
||||||
|
{{- define "cerbos.serviceAccountName" -}}
|
||||||
|
{{- if .Values.serviceAccount.create }}
|
||||||
|
{{- default (include "cerbos.fullname" .) .Values.serviceAccount.name }}
|
||||||
|
{{- else }}
|
||||||
|
{{- default "default" .Values.serviceAccount.name }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Default configuration if none is provided
|
||||||
|
*/}}
|
||||||
|
{{- define "cerbos.defaultConfig" -}}
|
||||||
|
storage:
|
||||||
|
driver: "disk"
|
||||||
|
disk:
|
||||||
|
directory: /work
|
||||||
|
watchForChanges: false
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Configuration derived from values provided by the user
|
||||||
|
*/}}
|
||||||
|
{{- define "cerbos.derivedConfig" -}}
|
||||||
|
{{- $tlsDisabled := (eq (include "cerbos.tlsSecretName" .) "None") -}}
|
||||||
|
server:
|
||||||
|
httpListenAddr: ":{{ .Values.cerbos.httpPort }}"
|
||||||
|
grpcListenAddr: ":{{ .Values.cerbos.grpcPort }}"
|
||||||
|
{{- if not $tlsDisabled }}
|
||||||
|
tls:
|
||||||
|
cert: /certs/tls.crt
|
||||||
|
key: /certs/tls.key
|
||||||
|
caCert: /certs/ca.crt
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Merge the configurations to obtain the final configuration file
|
||||||
|
*/}}
|
||||||
|
{{- define "cerbos.config" -}}
|
||||||
|
{{- $defaultConf := (include "cerbos.defaultConfig" .) | fromYaml -}}
|
||||||
|
{{- $derivedConf := (include "cerbos.derivedConfig" .) | fromYaml -}}
|
||||||
|
{{ mustMergeOverwrite $defaultConf .Values.cerbos.config $derivedConf | toYaml }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Detect if hub driver is used with default config
|
||||||
|
*/}}
|
||||||
|
{{- define "cerbos.defaultHubDriverEnabled" -}}
|
||||||
|
{{- $isBundleDriver := (eq (dig "config" "storage" "driver" "<not_defined>" .Values.cerbos) "bundle") -}}
|
||||||
|
{{- $isHubDriver := (eq (dig "config" "storage" "driver" "<not_defined>" .Values.cerbos) "hub") -}}
|
||||||
|
{{- $isBundleStorage := (or $isBundleDriver $isHubDriver) -}}
|
||||||
|
{{- $isDefaultTmp := (eq (dig "config" "storage" "bundle" "remote" "tempDir" "<not_defined>" .Values.cerbos) "<not_defined>") -}}
|
||||||
|
{{- $isDefaultCache := (eq (dig "config" "storage" "bundle" "remote" "cacheDir" "<not_defined>" .Values.cerbos) "<not_defined>") -}}
|
||||||
|
{{- if (and $isBundleStorage $isDefaultTmp $isDefaultCache) -}}yes{{- else -}}no{{- end -}}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
The image reference to use in pods
|
||||||
|
*/}}
|
||||||
|
{{- define "cerbos.image" -}}
|
||||||
|
"{{ .Values.image.repository }}
|
||||||
|
{{- with .Values.image.digest -}}
|
||||||
|
@{{ . }}
|
||||||
|
{{- else -}}
|
||||||
|
:{{ .Values.image.tag | default .Chart.AppVersion }}
|
||||||
|
{{- end -}}
|
||||||
|
"
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Topology spread constraints with label selector injected
|
||||||
|
*/}}
|
||||||
|
{{- define "cerbos.topologySpreadConstraints" -}}
|
||||||
|
{{- if .Values.topologySpreadConstraints }}
|
||||||
|
{{- $defaultLabels := (fromYaml (include "cerbos.selectorLabels" $)) }}
|
||||||
|
{{- $defaultLabelSelector := (dict "labelSelector" (dict "matchLabels" $defaultLabels)) }}
|
||||||
|
{{- $constraints := list }}
|
||||||
|
{{- range $c := .Values.topologySpreadConstraints }}
|
||||||
|
{{- if (hasKey $c "labelSelector") }}
|
||||||
|
{{- $constraints = (append $constraints $c) }}
|
||||||
|
{{- else }}
|
||||||
|
{{- $constraints = (append $constraints (mergeOverwrite $c $defaultLabelSelector)) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
topologySpreadConstraints:
|
||||||
|
{{ toYaml $constraints | indent 2 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,10 @@
|
||||||
|
{{- if .Values.certManager.certSpec -}}
|
||||||
|
apiVersion: cert-manager.io/v1
|
||||||
|
kind: Certificate
|
||||||
|
metadata:
|
||||||
|
name: {{ include "cerbos.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "cerbos.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
{{- toYaml .Values.certManager.certSpec | nindent 2 }}
|
||||||
|
{{- end -}}
|
|
@ -0,0 +1,9 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ include "cerbos.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "cerbos.labels" . | nindent 4 }}
|
||||||
|
data:
|
||||||
|
".cerbos.yaml": |-
|
||||||
|
{{- include "cerbos.config" . | nindent 8 }}
|
|
@ -0,0 +1,149 @@
|
||||||
|
{{- $tlsDisabled := (eq (include "cerbos.tlsSecretName" .) "None") -}}
|
||||||
|
{{- $defaultHubDriverEnabled := (eq (include "cerbos.defaultHubDriverEnabled" .) "yes") -}}
|
||||||
|
apiVersion: apps/v1
|
||||||
|
{{- if eq .Values.type "deployment" }}
|
||||||
|
kind: Deployment
|
||||||
|
{{- else if eq .Values.type "daemonset" }}
|
||||||
|
kind: DaemonSet
|
||||||
|
{{- else }}
|
||||||
|
{{- fail "valid values for .Values.type are deployment or daemonset" }}
|
||||||
|
{{- end}}
|
||||||
|
metadata:
|
||||||
|
name: {{ include "cerbos.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "cerbos.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.deployment.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- if not .Values.autoscaling.enabled }}
|
||||||
|
{{- if eq .Values.type "deployment" }}
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "cerbos.selectorLabels" . | nindent 6 }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{- include "cerbos.selectorLabels" . | nindent 8 }}
|
||||||
|
{{- with .Values.commonLabels }}
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.podLabels }}
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- include "cerbos.podAnnotations" . | nindent 6 }}
|
||||||
|
spec:
|
||||||
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
serviceAccountName: {{ include "cerbos.serviceAccountName" . }}
|
||||||
|
{{- with .Values.podSecurityContext }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.initContainers }}
|
||||||
|
initContainers:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.priorityClassName }}
|
||||||
|
priorityClassName: {{- .Values.priorityClassName }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: {{ .Chart.Name }}
|
||||||
|
{{- with .Values.securityContext }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
image: {{ include "cerbos.image" . }}
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
args:
|
||||||
|
- "server"
|
||||||
|
- "--config=/config/.cerbos.yaml"
|
||||||
|
- "--log-level={{ .Values.cerbos.logLevel }}"
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: {{ .Values.cerbos.httpPort }}
|
||||||
|
- name: grpc
|
||||||
|
containerPort: {{ .Values.cerbos.grpcPort }}
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /_cerbos/health
|
||||||
|
port: http
|
||||||
|
scheme: {{ include "cerbos.httpScheme" . | upper }}
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /_cerbos/health
|
||||||
|
port: http
|
||||||
|
scheme: {{ include "cerbos.httpScheme" . | upper }}
|
||||||
|
{{- with .Values.resources }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.env }}
|
||||||
|
env:
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.envFrom }}
|
||||||
|
envFrom:
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: config
|
||||||
|
mountPath: /config
|
||||||
|
readOnly: true
|
||||||
|
{{- if $defaultHubDriverEnabled }}
|
||||||
|
- name: bundletmp
|
||||||
|
mountPath: /tmp
|
||||||
|
- name: bundlecache
|
||||||
|
mountPath: /.cache
|
||||||
|
{{- else }}
|
||||||
|
- name: work
|
||||||
|
mountPath: /work
|
||||||
|
{{- end }}
|
||||||
|
{{- if not $tlsDisabled }}
|
||||||
|
- name: certs
|
||||||
|
mountPath: /certs
|
||||||
|
readOnly: true
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.volumeMounts }}
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
volumes:
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: {{ include "cerbos.fullname" . }}
|
||||||
|
{{- if $defaultHubDriverEnabled }}
|
||||||
|
- name: bundletmp
|
||||||
|
emptyDir: {}
|
||||||
|
- name: bundlecache
|
||||||
|
emptyDir: {}
|
||||||
|
{{- else }}
|
||||||
|
- name: work
|
||||||
|
emptyDir: {}
|
||||||
|
{{- end }}
|
||||||
|
{{- if not $tlsDisabled }}
|
||||||
|
- name: certs
|
||||||
|
secret:
|
||||||
|
secretName: {{ include "cerbos.tlsSecretName" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.volumes }}
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- include "cerbos.topologySpreadConstraints" . | nindent 6}}
|
|
@ -0,0 +1,32 @@
|
||||||
|
{{- if and .Values.autoscaling.enabled (eq .Values.type "deployment") }}
|
||||||
|
apiVersion: autoscaling/v2
|
||||||
|
kind: HorizontalPodAutoscaler
|
||||||
|
metadata:
|
||||||
|
name: {{ include "cerbos.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "cerbos.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
scaleTargetRef:
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
name: {{ include "cerbos.fullname" . }}
|
||||||
|
minReplicas: {{ .Values.autoscaling.minReplicas }}
|
||||||
|
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
|
||||||
|
metrics:
|
||||||
|
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
|
||||||
|
- type: Resource
|
||||||
|
resource:
|
||||||
|
name: cpu
|
||||||
|
target:
|
||||||
|
type: Utilization
|
||||||
|
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
||||||
|
- type: Resource
|
||||||
|
resource:
|
||||||
|
name: memory
|
||||||
|
target:
|
||||||
|
type: Utilization
|
||||||
|
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,40 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ include "cerbos.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "cerbos.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.service.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
type: {{ .Values.service.type }}
|
||||||
|
{{- with .Values.service.clusterIP }}
|
||||||
|
clusterIP: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.service.loadBalancerIP }}
|
||||||
|
loadBalancerIP: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.service.internalTrafficPolicy }}
|
||||||
|
internalTrafficPolicy: {{ .Values.service.internalTrafficPolicy }}
|
||||||
|
{{- else if eq .Values.type "daemonset" }}
|
||||||
|
internalTrafficPolicy: Local
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
- port: {{ .Values.service.httpPort }}
|
||||||
|
targetPort: http
|
||||||
|
protocol: TCP
|
||||||
|
name: http
|
||||||
|
{{ if eq .Values.service.type "NodePort" -}}
|
||||||
|
nodePort: {{ .Values.service.httpNodePort }}
|
||||||
|
{{- end }}
|
||||||
|
- port: {{ .Values.service.grpcPort }}
|
||||||
|
targetPort: grpc
|
||||||
|
protocol: TCP
|
||||||
|
name: grpc
|
||||||
|
{{ if eq .Values.service.type "NodePort" -}}
|
||||||
|
nodePort: {{ .Values.service.grpcNodePort }}
|
||||||
|
{{- end }}
|
||||||
|
selector:
|
||||||
|
{{- include "cerbos.selectorLabels" . | nindent 4 }}
|
|
@ -0,0 +1,12 @@
|
||||||
|
{{- if .Values.serviceAccount.create -}}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: {{ include "cerbos.serviceAccountName" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "cerbos.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.serviceAccount.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,40 @@
|
||||||
|
# Illustrates how to deploy Cerbos with an SQLite3 backend and audit logs.
|
||||||
|
|
||||||
|
cerbos:
|
||||||
|
config:
|
||||||
|
# Configure the SQLite3 storage driver
|
||||||
|
storage:
|
||||||
|
driver: "sqlite3"
|
||||||
|
sqlite3:
|
||||||
|
dsn: "file:/data/cerbos.sqlite?mode=rwc&_fk=true"
|
||||||
|
# Configure audit logging
|
||||||
|
audit:
|
||||||
|
enabled: true
|
||||||
|
accessLogsEnabled: true
|
||||||
|
decisionLogsEnabled: true
|
||||||
|
backend: local
|
||||||
|
local:
|
||||||
|
storagePath: /audit/cerbos
|
||||||
|
|
||||||
|
# Create volumes to hold the SQLite3 database and the audit log.
|
||||||
|
# Note that this example uses emptyDir volumes that lose data when the pod or node is killed.
|
||||||
|
# Use persistent volumes in production to preserve the data between pod restarts.
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: cerbos-policies
|
||||||
|
emptyDir: {}
|
||||||
|
- name: cerbos-auditlog
|
||||||
|
emptyDir: {}
|
||||||
|
|
||||||
|
volumeMounts:
|
||||||
|
- name: cerbos-policies
|
||||||
|
mountPath: /data
|
||||||
|
- name: cerbos-auditlog
|
||||||
|
mountPath: /audit
|
||||||
|
|
||||||
|
# Optional: Autoscale the Cerbos deployment using CPU and memory utilization.
|
||||||
|
autoscaling:
|
||||||
|
enabled: true
|
||||||
|
targetCPUUtilizationPercentage: 80
|
||||||
|
targetMemoryUtilizationPercentage: 80
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
# Illustrates how to connect a PDP to Cerbos Hub
|
||||||
|
# Prerequisites:
|
||||||
|
# - Sign up to Cerbos Hub and follow the instructions to create client credentials.
|
||||||
|
# - Create a Kubernetes secret named `cerbos-hub-credentials`:
|
||||||
|
# kubectl create secret generic cerbos-hub-credentials \
|
||||||
|
# --from-literal=CERBOS_HUB_CLIENT_ID=<YOUR_CLIENT_ID> \
|
||||||
|
# --from-literal=CERBOS_HUB_CLIENT_SECRET=<YOUR_CLIENT_SECRET> \
|
||||||
|
# --from-literal=CERBOS_HUB_WORKSPACE_SECRET=<YOUR_WORKSPACE_SECRET>
|
||||||
|
|
||||||
|
cerbos:
|
||||||
|
config:
|
||||||
|
# Configure the Hub storage driver
|
||||||
|
storage:
|
||||||
|
driver: "hub"
|
||||||
|
hub:
|
||||||
|
remote:
|
||||||
|
bundleLabel: "YOUR_LABEL" # Alternatively, add `CERBOS_HUB_BUNDLE=<YOUR_LABEL>` to the secret you created above.
|
||||||
|
|
||||||
|
# Configure the Hub audit backend
|
||||||
|
audit:
|
||||||
|
enabled: true
|
||||||
|
backend: "hub"
|
||||||
|
hub:
|
||||||
|
storagePath: /audit_logs
|
||||||
|
|
||||||
|
# Create environment variables from the secret.
|
||||||
|
envFrom:
|
||||||
|
- secretRef:
|
||||||
|
name: cerbos-hub-credentials
|
||||||
|
|
||||||
|
# Mount volume for locally buffering the audit logs. A persistent volume is recommended for production use cases.
|
||||||
|
volumes:
|
||||||
|
- name: cerbos-audit-logs
|
||||||
|
emptyDir: {}
|
||||||
|
|
||||||
|
volumeMounts:
|
||||||
|
- name: cerbos-audit-logs
|
||||||
|
mountPath: /audit_logs
|
|
@ -0,0 +1,40 @@
|
||||||
|
# Illustrates how to deploy Cerbos with a TLS certificate issued by cert-manager.
|
||||||
|
|
||||||
|
cerbos:
|
||||||
|
config:
|
||||||
|
# Configure the SQLite3 storage driver
|
||||||
|
storage:
|
||||||
|
driver: "sqlite3"
|
||||||
|
sqlite3:
|
||||||
|
dsn: "file:/data/cerbos.sqlite?mode=rwc&_fk=true"
|
||||||
|
|
||||||
|
certManager:
|
||||||
|
certSpec:
|
||||||
|
secretName: cerbos-certs
|
||||||
|
secretTemplate:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: certificate
|
||||||
|
app.kubernetes.io/part-of: cerbos
|
||||||
|
duration: 48h
|
||||||
|
renewBefore: 36h
|
||||||
|
subject:
|
||||||
|
organizations:
|
||||||
|
- cerbos
|
||||||
|
isCA: false
|
||||||
|
dnsNames: ["cerbos.security.svc.cluster.local"]
|
||||||
|
issuerRef:
|
||||||
|
name: ca-cluster-issuer
|
||||||
|
kind: ClusterIssuer
|
||||||
|
|
||||||
|
|
||||||
|
# Create volumes to hold the SQLite3 database.
|
||||||
|
# Note that this example uses emptyDir volumes that lose data when the pod or node is killed.
|
||||||
|
# Use persistent volumes in production to preserve the data between pod restarts.
|
||||||
|
volumes:
|
||||||
|
- name: cerbos-policies
|
||||||
|
emptyDir: {}
|
||||||
|
|
||||||
|
volumeMounts:
|
||||||
|
- name: cerbos-policies
|
||||||
|
mountPath: /data
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
# Illustrates how to connect Cerbos to a policy repository hosted on GitHub.
|
||||||
|
# Prerequisites:
|
||||||
|
# - Create a personal access token (PAT) in GitHub with `repo` permissions (https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token).
|
||||||
|
# - Create a Kubernetes secret named `cerbos-github-token`:
|
||||||
|
# PAT=YOUR_GITHUB_PAT kubectl create secret generic cerbos-github-token --from-literal=GITHUB_TOKEN=$PAT
|
||||||
|
|
||||||
|
cerbos:
|
||||||
|
config:
|
||||||
|
# Configure the git storage driver
|
||||||
|
storage:
|
||||||
|
driver: "git"
|
||||||
|
git:
|
||||||
|
protocol: https
|
||||||
|
# Replace with the URL of your GitHub repo.
|
||||||
|
url: https://github.com/cerbos/sample-policies.git
|
||||||
|
# Replace with the branch name of your repo.
|
||||||
|
branch: main
|
||||||
|
# Remove or leave empty if the policies are not stored in a subdirectory.
|
||||||
|
subDir: hr
|
||||||
|
# Path to checkout. By default, /work is a Kubernetes emptyDir volume that is only available for the lifetime of the pod.
|
||||||
|
# If you want the work directory to persist between pod restarts, specify the mount path of a persistent volume here.
|
||||||
|
checkoutDir: /work
|
||||||
|
# How often the remote repo should be checked for updates.
|
||||||
|
updatePollInterval: 60s
|
||||||
|
# Credentials used to login to the remote GitHub repo. We are using an environment variable mounted from the secret we created earlier.
|
||||||
|
https:
|
||||||
|
username: ${GITHUB_TOKEN}
|
||||||
|
password: ""
|
||||||
|
|
||||||
|
# Create an environment variable from the GitHub PAT stored in a secret.
|
||||||
|
envFrom:
|
||||||
|
- secretRef:
|
||||||
|
name: cerbos-github-token
|
|
@ -0,0 +1,43 @@
|
||||||
|
# Illustrates how to deploy Cerbos with traces exported via OTLP.
|
||||||
|
|
||||||
|
cerbos:
|
||||||
|
config:
|
||||||
|
# Configure the SQLite3 storage driver
|
||||||
|
storage:
|
||||||
|
driver: "sqlite3"
|
||||||
|
sqlite3:
|
||||||
|
dsn: "file:/data/cerbos.sqlite?mode=rwc&_fk=true"
|
||||||
|
|
||||||
|
# Environment variables to configure OTLP exporter.
|
||||||
|
env:
|
||||||
|
- name: OTEL_SERVICE_NAME
|
||||||
|
value: cerbos.myns.svc
|
||||||
|
- name: OTEL_TRACE_SAMPLER
|
||||||
|
value: parentbased_always_on
|
||||||
|
- name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
|
||||||
|
value: https://otlp.monitoring.svc.cluster.local
|
||||||
|
|
||||||
|
# Optional common labels for resources.
|
||||||
|
commonLabels:
|
||||||
|
app.kubernetes.io/part-of: my-awesome-app
|
||||||
|
|
||||||
|
# Optional annotations for the service.
|
||||||
|
service:
|
||||||
|
annotations:
|
||||||
|
a8r.io/owner: my-awesome-team
|
||||||
|
a8r.io/uptime: dashboard.example.com/cerbos
|
||||||
|
|
||||||
|
# Optional annotations for the Cerbos pod.
|
||||||
|
podAnnotations:
|
||||||
|
a8r.io/owner: my-awesome-team
|
||||||
|
|
||||||
|
# Create volumes to hold the SQLite3 database.
|
||||||
|
# Note that this example uses emptyDir volumes that lose data when the pod or node is killed.
|
||||||
|
# Use persistent volumes in production to preserve the data between pod restarts.
|
||||||
|
volumes:
|
||||||
|
- name: cerbos-policies
|
||||||
|
emptyDir: {}
|
||||||
|
|
||||||
|
volumeMounts:
|
||||||
|
- name: cerbos-policies
|
||||||
|
mountPath: /data
|
|
@ -0,0 +1,19 @@
|
||||||
|
# Illustrates how to mount a volume containing policies to the Cerbos pod.
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: cerbos-policies
|
||||||
|
hostPath:
|
||||||
|
path: /data/cerbos-policies
|
||||||
|
|
||||||
|
volumeMounts:
|
||||||
|
- name: cerbos-policies
|
||||||
|
mountPath: /policies
|
||||||
|
readOnly: true
|
||||||
|
|
||||||
|
cerbos:
|
||||||
|
config:
|
||||||
|
storage:
|
||||||
|
driver: "disk"
|
||||||
|
disk:
|
||||||
|
directory: /policies
|
||||||
|
watchForChanges: true
|
|
@ -0,0 +1,498 @@
|
||||||
|
{
|
||||||
|
"additionalProperties": false,
|
||||||
|
"properties": {
|
||||||
|
"affinity": {
|
||||||
|
"additionalProperties": true,
|
||||||
|
"description": "Pod affinity rules. See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#scheduling.",
|
||||||
|
"title": "affinity",
|
||||||
|
"type": [
|
||||||
|
"object",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"autoscaling": {
|
||||||
|
"additionalProperties": true,
|
||||||
|
"properties": {
|
||||||
|
"enabled": {
|
||||||
|
"default": false,
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"maxReplicas": {
|
||||||
|
"default": 100,
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"minReplicas": {
|
||||||
|
"default": 1,
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"targetCPUUtilizationPercentage": {
|
||||||
|
"default": 80,
|
||||||
|
"type": [
|
||||||
|
"integer",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"targetMemoryUtilizationPercentage": {
|
||||||
|
"type": [
|
||||||
|
"integer",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Autoscaling configuration.",
|
||||||
|
"title": "autoscaling",
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"cerbos": {
|
||||||
|
"additionalProperties": false,
|
||||||
|
"properties": {
|
||||||
|
"config": {
|
||||||
|
"additionalProperties": true,
|
||||||
|
"description": "Cerbos config file contents.\nSome server settings like server.httpListenAddr, server.grpcListenAddr, server.tls will be overwritten by the chart based on values provided above.",
|
||||||
|
"title": "config",
|
||||||
|
"type": [
|
||||||
|
"object",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpcPort": {
|
||||||
|
"default": 3593,
|
||||||
|
"description": "Port to expose the gRPC service on.",
|
||||||
|
"title": "grpcPort",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"httpPort": {
|
||||||
|
"default": 3592,
|
||||||
|
"description": "Port to expose the http service on.",
|
||||||
|
"title": "httpPort",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"logLevel": {
|
||||||
|
"default": "INFO",
|
||||||
|
"description": "Cerbos log level. Valid values are DEBUG, INFO, WARN and ERROR",
|
||||||
|
"title": "logLevel",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"prometheusPodAnnotationsEnabled": {
|
||||||
|
"default": true,
|
||||||
|
"description": "Add Prometheus service discovery annotations to the pod.",
|
||||||
|
"title": "prometheusPodAnnotationsEnabled",
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"tlsSecretName": {
|
||||||
|
"default": "",
|
||||||
|
"description": "Secret containing the TLS certificate.\nLeave empty to disable TLS.\nThe secret must contain the following keys:\n - tls.crt: Required. Certificate file contents.\n - tls.key: Required. Private key for the certificate.\n - ca.crt: Optional. CA certificate to add to the trust pool.",
|
||||||
|
"title": "tlsSecretName",
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Cerbos deployment settings.",
|
||||||
|
"title": "cerbos",
|
||||||
|
"required": [
|
||||||
|
"httpPort",
|
||||||
|
"grpcPort",
|
||||||
|
"logLevel",
|
||||||
|
"prometheusPodAnnotationsEnabled"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"certManager": {
|
||||||
|
"additionalProperties": false,
|
||||||
|
"properties": {
|
||||||
|
"certSpec": {
|
||||||
|
"type": [
|
||||||
|
"object",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Spec of the cert-manager certificate to create for the Cerbos deployment.\nIf certSpec is not empty, a cert-manager.io/v1/Certificate resource will be created with its spec populated with values from certSpec.\nThe certSpec value must be a valid Certificate spec. This Helm chart does not provide any defaults or inject any values into it.\nIf cerbos.tlsSecretName is defined, it takes precedence over the generated certificate.",
|
||||||
|
"title": "certManager",
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"commonLabels": {
|
||||||
|
"additionalProperties": true,
|
||||||
|
"description": "Common labels to add to the resources. See https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-meta/#ObjectMeta.",
|
||||||
|
"title": "commonLabels",
|
||||||
|
"type": [
|
||||||
|
"object",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"deployment": {
|
||||||
|
"additionalProperties": false,
|
||||||
|
"properties": {
|
||||||
|
"annotations": {
|
||||||
|
"additionalProperties": true,
|
||||||
|
"title": "annotations",
|
||||||
|
"type": [
|
||||||
|
"object",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Annotations to add to the deployment. See https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-meta/#ObjectMeta.",
|
||||||
|
"title": "deployment"
|
||||||
|
},
|
||||||
|
"env": {
|
||||||
|
"items": {
|
||||||
|
"additionalProperties": true,
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"value": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"description": "Environment variables to add to the pod. See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#environment-variables.",
|
||||||
|
"title": "env",
|
||||||
|
"type": [
|
||||||
|
"array",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"envFrom": {
|
||||||
|
"items": {
|
||||||
|
"additionalProperties": true,
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"description": "Source environment variables from config maps or secrets. See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#environment-variables.",
|
||||||
|
"title": "envFrom",
|
||||||
|
"type": [
|
||||||
|
"array",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"fullnameOverride": {
|
||||||
|
"default": "",
|
||||||
|
"title": "fullnameOverride",
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"global": {
|
||||||
|
"description": "Global values are values that can be accessed from any chart or subchart by exactly the same name.",
|
||||||
|
"title": "global",
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"image": {
|
||||||
|
"additionalProperties": false,
|
||||||
|
"properties": {
|
||||||
|
"digest": {
|
||||||
|
"default": "",
|
||||||
|
"description": "Image digest to use. Takes precedence over tag if specified.",
|
||||||
|
"title": "digest",
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"pullPolicy": {
|
||||||
|
"default": [
|
||||||
|
"IfNotPresent"
|
||||||
|
],
|
||||||
|
"description": "Image pull policy.",
|
||||||
|
"title": "pullPolicy",
|
||||||
|
"enum": [
|
||||||
|
"IfNotPresent",
|
||||||
|
"Always"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"default": "ghcr.io.cerbos/cerbos",
|
||||||
|
"description": "Container image name without the tag.",
|
||||||
|
"title": "repository"
|
||||||
|
},
|
||||||
|
"tag": {
|
||||||
|
"default": "",
|
||||||
|
"description": "Image tag to use. Defaults to the chart appVersion.",
|
||||||
|
"title": "tag",
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Container image details. See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#image.",
|
||||||
|
"title": "image"
|
||||||
|
},
|
||||||
|
"imagePullSecrets": {
|
||||||
|
"items": {
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"description": "Image pull secrets to use if pulling the image from a private container registry. See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#containers.",
|
||||||
|
"title": "imagePullSecrets",
|
||||||
|
"type": [
|
||||||
|
"array",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"initContainers": {
|
||||||
|
"items": {},
|
||||||
|
"description": "Init containers to inject into the deployment. See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#containers.",
|
||||||
|
"title": "initContainers",
|
||||||
|
"type": [
|
||||||
|
"array",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"nameOverride": {
|
||||||
|
"default": "",
|
||||||
|
"title": "nameOverride",
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"nodeSelector": {
|
||||||
|
"additionalProperties": true,
|
||||||
|
"description": "Node selector for the pod. See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#scheduling.",
|
||||||
|
"title": "nodeSelector",
|
||||||
|
"type": [
|
||||||
|
"object",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"podAnnotations": {
|
||||||
|
"additionalProperties": true,
|
||||||
|
"description": "Annotations to add to the pod. See https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-meta/#ObjectMeta.",
|
||||||
|
"title": "podAnnotations",
|
||||||
|
"type": [
|
||||||
|
"object",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"podLabels": {
|
||||||
|
"additionalProperties": true,
|
||||||
|
"description": "Labels to add to the pod. See https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-meta/#ObjectMeta.",
|
||||||
|
"title": "podLabels",
|
||||||
|
"type": [
|
||||||
|
"object",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"podSecurityContext": {
|
||||||
|
"additionalProperties": true,
|
||||||
|
"description": "Security context for the whole pod. See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1.",
|
||||||
|
"title": "podSecurityContext",
|
||||||
|
"type": [
|
||||||
|
"object",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"priorityClassName": {
|
||||||
|
"default": "",
|
||||||
|
"description": "PriorityClassName to set on deployed pods",
|
||||||
|
"title": "priorityClassName",
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"replicaCount": {
|
||||||
|
"default": 1,
|
||||||
|
"description": "Number of Cerbos pods to run",
|
||||||
|
"title": "replicaCount",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"resources": {
|
||||||
|
"additionalProperties": true,
|
||||||
|
"properties": {
|
||||||
|
"limits": {
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"requests": {
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Resource limits for the pod. See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#resources.",
|
||||||
|
"title": "resources",
|
||||||
|
"type": [
|
||||||
|
"object",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"securityContext": {
|
||||||
|
"additionalProperties": true,
|
||||||
|
"description": "Security context for the Cerbos container. See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1.",
|
||||||
|
"title": "securityContext",
|
||||||
|
"type": [
|
||||||
|
"object",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"service": {
|
||||||
|
"additionalProperties": false,
|
||||||
|
"properties": {
|
||||||
|
"annotations": {
|
||||||
|
"additionalProperties": true,
|
||||||
|
"description": "Service annotations",
|
||||||
|
"title": "annotations",
|
||||||
|
"type": [
|
||||||
|
"object",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"clusterIP": {
|
||||||
|
"default": "null",
|
||||||
|
"description": "Service Cluster IP",
|
||||||
|
"title": "clusterIP",
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpcNodePort": {
|
||||||
|
"default": 13593,
|
||||||
|
"description": "gRPC node port (if service type is NodePort)",
|
||||||
|
"title": "grpcNodePort"
|
||||||
|
},
|
||||||
|
"grpcPort": {
|
||||||
|
"default": 3593,
|
||||||
|
"description": "Service gRPC port",
|
||||||
|
"title": "grpcPort"
|
||||||
|
},
|
||||||
|
"httpNodePort": {
|
||||||
|
"default": 13592,
|
||||||
|
"description": "HTTP node port (if service type is NodePort)",
|
||||||
|
"title": "httpNodePort"
|
||||||
|
},
|
||||||
|
"httpPort": {
|
||||||
|
"default": 3592,
|
||||||
|
"description": "Service HTTP port",
|
||||||
|
"title": "httpPort"
|
||||||
|
},
|
||||||
|
"internalTrafficPolicy": {
|
||||||
|
"default": "",
|
||||||
|
"description": "Set the internalTrafficPolicy. If this is unset and .Values.type is set to daemonset, this will default to \"Local\"",
|
||||||
|
"title": "internalTrafficPolicy",
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"loadBalancerIP": {
|
||||||
|
"default": "null",
|
||||||
|
"description": "LoadBalancer static IP",
|
||||||
|
"title": "loadBalancerIP",
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"default": "ClusterIP",
|
||||||
|
"description": "Service type",
|
||||||
|
"title": "type",
|
||||||
|
"enum": [
|
||||||
|
"ClusterIP",
|
||||||
|
"NodePort",
|
||||||
|
"LoadBalancer"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Cerbos service settings.",
|
||||||
|
"title": "service"
|
||||||
|
},
|
||||||
|
"serviceAccount": {
|
||||||
|
"additionalProperties": false,
|
||||||
|
"properties": {
|
||||||
|
"annotations": {
|
||||||
|
"additionalProperties": true,
|
||||||
|
"description": "Annotations to add to the service account. See https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-meta/#ObjectMeta.",
|
||||||
|
"title": "annotations",
|
||||||
|
"type": [
|
||||||
|
"object",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"create": {
|
||||||
|
"default": true,
|
||||||
|
"description": "Specifies whether a service account should be created.",
|
||||||
|
"title": "create"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"default": "",
|
||||||
|
"description": "The name of the service account to use.\nIf not set and create is true, a name is generated using the fullname template",
|
||||||
|
"title": "name",
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Service account settings",
|
||||||
|
"title": "serviceAccount"
|
||||||
|
},
|
||||||
|
"tolerations": {
|
||||||
|
"items": {
|
||||||
|
"additionalProperties": true,
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"description": "Pod tolerations. See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#scheduling.",
|
||||||
|
"title": "tolerations",
|
||||||
|
"type": [
|
||||||
|
"array",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"topologySpreadConstraints": {
|
||||||
|
"items": {
|
||||||
|
"additionalProperties": true,
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"description": "Topology Spread Constraints rules. See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#scheduling.",
|
||||||
|
"title": "topologySpreadConstraints",
|
||||||
|
"type": [
|
||||||
|
"array",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"default": "deployment",
|
||||||
|
"description": "Kubernetes workload type to use. Valid values are `deployment` or `daemonset`.",
|
||||||
|
"title": "type",
|
||||||
|
"enum": [
|
||||||
|
"deployment",
|
||||||
|
"daemonset"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"volumeMounts": {
|
||||||
|
"items": {
|
||||||
|
"additionalProperties": true,
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"description": "Volume mounts to add to the Cerbos container. See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#volumes-1.",
|
||||||
|
"title": "volumeMounts",
|
||||||
|
"type": [
|
||||||
|
"array",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"volumes": {
|
||||||
|
"items": {
|
||||||
|
"additionalProperties": true,
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"description": "Volumes to add to the pod. See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#volumes.",
|
||||||
|
"title": "volumes",
|
||||||
|
"type": [
|
||||||
|
"array",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"type": "object"
|
||||||
|
}
|
|
@ -0,0 +1,366 @@
|
||||||
|
# Default values for cerbos.
|
||||||
|
# This is a YAML-formatted file.
|
||||||
|
# Declare variables to be passed into your templates.
|
||||||
|
|
||||||
|
# @schema
|
||||||
|
# type: [string,null]
|
||||||
|
# @schema
|
||||||
|
nameOverride: ""
|
||||||
|
|
||||||
|
# @schema
|
||||||
|
# type: [string,null]
|
||||||
|
# @schema
|
||||||
|
fullnameOverride: ""
|
||||||
|
|
||||||
|
# @schema
|
||||||
|
# type: [integer]
|
||||||
|
# default: 1
|
||||||
|
# @schema
|
||||||
|
# Number of Cerbos pods to run
|
||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
# @schema
|
||||||
|
# required: false
|
||||||
|
# @schema
|
||||||
|
# Container image details. See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#image.
|
||||||
|
image:
|
||||||
|
# @schema
|
||||||
|
# default: "ghcr.io.cerbos/cerbos"
|
||||||
|
# @schema
|
||||||
|
# Container image name without the tag.
|
||||||
|
repository: ghcr.io/cerbos/cerbos
|
||||||
|
# @schema
|
||||||
|
# enum: [IfNotPresent, Always]
|
||||||
|
# default: ["IfNotPresent"]
|
||||||
|
# @schema
|
||||||
|
# Image pull policy.
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
# @schema
|
||||||
|
# type: [string,null]
|
||||||
|
# @schema
|
||||||
|
# Image digest to use. Takes precedence over tag if specified.
|
||||||
|
digest: ""
|
||||||
|
# @schema
|
||||||
|
# type: [string,null]
|
||||||
|
# @schema
|
||||||
|
# Image tag to use. Defaults to the chart appVersion.
|
||||||
|
tag: ""
|
||||||
|
|
||||||
|
# @schema
|
||||||
|
# type: [array,null]
|
||||||
|
# items:
|
||||||
|
# type: object
|
||||||
|
# properties:
|
||||||
|
# name:
|
||||||
|
# type: string
|
||||||
|
# @schema
|
||||||
|
# Image pull secrets to use if pulling the image from a private container registry. See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#containers.
|
||||||
|
imagePullSecrets: []
|
||||||
|
|
||||||
|
# @schema
|
||||||
|
# type: [array, null]
|
||||||
|
# @schema
|
||||||
|
# Init containers to inject into the deployment. See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#containers.
|
||||||
|
initContainers: []
|
||||||
|
|
||||||
|
# @schema
|
||||||
|
# required: false
|
||||||
|
# @schema
|
||||||
|
# Service account settings
|
||||||
|
serviceAccount:
|
||||||
|
# @schema
|
||||||
|
# default: true
|
||||||
|
# @schema
|
||||||
|
# Specifies whether a service account should be created.
|
||||||
|
create: true
|
||||||
|
# @schema
|
||||||
|
# type: [object, null]
|
||||||
|
# additionalProperties: true
|
||||||
|
# @schema
|
||||||
|
# Annotations to add to the service account. See https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-meta/#ObjectMeta.
|
||||||
|
annotations: {}
|
||||||
|
# @schema
|
||||||
|
# type: [string,null]
|
||||||
|
# @schema
|
||||||
|
# The name of the service account to use.
|
||||||
|
# If not set and create is true, a name is generated using the fullname template
|
||||||
|
name: ""
|
||||||
|
|
||||||
|
# @schema
|
||||||
|
# type: [object, null]
|
||||||
|
# additionalProperties: true
|
||||||
|
# @schema
|
||||||
|
# Annotations to add to the pod. See https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-meta/#ObjectMeta.
|
||||||
|
podAnnotations: {}
|
||||||
|
|
||||||
|
# @schema
|
||||||
|
# type: [object, null]
|
||||||
|
# additionalProperties: true
|
||||||
|
# @schema
|
||||||
|
# Labels to add to the pod. See https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-meta/#ObjectMeta.
|
||||||
|
podLabels: {}
|
||||||
|
|
||||||
|
# @schema
|
||||||
|
# type: [object, null]
|
||||||
|
# additionalProperties: true
|
||||||
|
# @schema
|
||||||
|
# Common labels to add to the resources. See https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-meta/#ObjectMeta.
|
||||||
|
commonLabels: {}
|
||||||
|
|
||||||
|
# @schema
|
||||||
|
# required: false
|
||||||
|
# @schema
|
||||||
|
# Annotations to add to the deployment. See https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-meta/#ObjectMeta.
|
||||||
|
deployment:
|
||||||
|
# @schema
|
||||||
|
# type: [object, null]
|
||||||
|
# additionalProperties: true
|
||||||
|
# @schema
|
||||||
|
annotations: {}
|
||||||
|
|
||||||
|
# @schema
|
||||||
|
# type: [object, null]
|
||||||
|
# additionalProperties: true
|
||||||
|
# @schema
|
||||||
|
# Security context for the whole pod. See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1.
|
||||||
|
podSecurityContext: {}
|
||||||
|
|
||||||
|
# @schema
|
||||||
|
# type: [object, null]
|
||||||
|
# additionalProperties: true
|
||||||
|
# @schema
|
||||||
|
# Security context for the Cerbos container. See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1.
|
||||||
|
securityContext: {}
|
||||||
|
|
||||||
|
# @schema
|
||||||
|
# type: [object, null]
|
||||||
|
# properties:
|
||||||
|
# limits:
|
||||||
|
# type: object
|
||||||
|
# requests:
|
||||||
|
# type: object
|
||||||
|
# additionalProperties: true
|
||||||
|
# @schema
|
||||||
|
# Resource limits for the pod. See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#resources.
|
||||||
|
resources:
|
||||||
|
{}
|
||||||
|
# limits:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
# requests:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
|
||||||
|
# @schema
|
||||||
|
# type: object
|
||||||
|
# properties:
|
||||||
|
# enabled:
|
||||||
|
# type: boolean
|
||||||
|
# default: false
|
||||||
|
# minReplicas:
|
||||||
|
# type: integer
|
||||||
|
# default: 1
|
||||||
|
# maxReplicas:
|
||||||
|
# type: integer
|
||||||
|
# default: 100
|
||||||
|
# targetCPUUtilizationPercentage:
|
||||||
|
# type: [integer, null]
|
||||||
|
# default: 80
|
||||||
|
# targetMemoryUtilizationPercentage:
|
||||||
|
# type: [integer, null]
|
||||||
|
# additionalProperties: true
|
||||||
|
# @schema
|
||||||
|
# Autoscaling configuration.
|
||||||
|
autoscaling:
|
||||||
|
enabled: false
|
||||||
|
minReplicas: 1
|
||||||
|
maxReplicas: 100
|
||||||
|
targetCPUUtilizationPercentage: 80
|
||||||
|
# targetMemoryUtilizationPercentage: 80
|
||||||
|
|
||||||
|
# @schema
|
||||||
|
# type: [object, null]
|
||||||
|
# additionalProperties: true
|
||||||
|
# @schema
|
||||||
|
# Node selector for the pod. See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#scheduling.
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
|
# @schema
|
||||||
|
# type: [array, null]
|
||||||
|
# items:
|
||||||
|
# type: object
|
||||||
|
# additionalProperties: true
|
||||||
|
# @schema
|
||||||
|
# Pod tolerations. See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#scheduling.
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
# @schema
|
||||||
|
# type: [object, null]
|
||||||
|
# additionalProperties: true
|
||||||
|
# @schema
|
||||||
|
# Pod affinity rules. See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#scheduling.
|
||||||
|
affinity: {}
|
||||||
|
|
||||||
|
# @schema
|
||||||
|
# type: [array, null]
|
||||||
|
# items:
|
||||||
|
# type: object
|
||||||
|
# additionalProperties: true
|
||||||
|
# @schema
|
||||||
|
# Topology Spread Constraints rules. See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#scheduling.
|
||||||
|
topologySpreadConstraints:
|
||||||
|
[] # @schema type:[array,null]
|
||||||
|
# - topologyKey: topology.kubernetes.io/zone
|
||||||
|
# maxSkew: 1
|
||||||
|
# whenUnsatisfiable: ScheduleAnyway
|
||||||
|
|
||||||
|
# @schema
|
||||||
|
# type: [array, null]
|
||||||
|
# items:
|
||||||
|
# type: object
|
||||||
|
# additionalProperties: true
|
||||||
|
# @schema
|
||||||
|
# Volumes to add to the pod. See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#volumes.
|
||||||
|
volumes: []
|
||||||
|
|
||||||
|
# @schema
|
||||||
|
# type: [array, null]
|
||||||
|
# items:
|
||||||
|
# type: object
|
||||||
|
# additionalProperties: true
|
||||||
|
# @schema
|
||||||
|
# Volume mounts to add to the Cerbos container. See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#volumes-1.
|
||||||
|
volumeMounts: []
|
||||||
|
|
||||||
|
# @schema
|
||||||
|
# type: [array, null]
|
||||||
|
# items:
|
||||||
|
# type: object
|
||||||
|
# properties:
|
||||||
|
# name:
|
||||||
|
# type: string
|
||||||
|
# value:
|
||||||
|
# type: string
|
||||||
|
# additionalProperties: true
|
||||||
|
# @schema
|
||||||
|
# Environment variables to add to the pod. See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#environment-variables.
|
||||||
|
env: [] # @schema type[array,null]
|
||||||
|
|
||||||
|
# @schema
|
||||||
|
# type: [array, null]
|
||||||
|
# items:
|
||||||
|
# type: object
|
||||||
|
# additionalProperties: true
|
||||||
|
# @schema
|
||||||
|
# Source environment variables from config maps or secrets. See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#environment-variables.
|
||||||
|
envFrom: []
|
||||||
|
|
||||||
|
# @schema
|
||||||
|
# type: object
|
||||||
|
# properties:
|
||||||
|
# certSpec:
|
||||||
|
# type: [object, null]
|
||||||
|
# @schema
|
||||||
|
# Spec of the cert-manager certificate to create for the Cerbos deployment.
|
||||||
|
# If certSpec is not empty, a cert-manager.io/v1/Certificate resource will be created with its spec populated with values from certSpec.
|
||||||
|
# The certSpec value must be a valid Certificate spec. This Helm chart does not provide any defaults or inject any values into it.
|
||||||
|
# If cerbos.tlsSecretName is defined, it takes precedence over the generated certificate.
|
||||||
|
certManager:
|
||||||
|
certSpec: {}
|
||||||
|
|
||||||
|
# @schema
|
||||||
|
# enum: [deployment,daemonset]
|
||||||
|
# default: deployment
|
||||||
|
# @schema
|
||||||
|
# Kubernetes workload type to use. Valid values are `deployment` or `daemonset`.
|
||||||
|
type: deployment
|
||||||
|
|
||||||
|
# @schema
|
||||||
|
# type: [string,null]
|
||||||
|
# @schema
|
||||||
|
# PriorityClassName to set on deployed pods
|
||||||
|
priorityClassName: ""
|
||||||
|
|
||||||
|
# @schema
|
||||||
|
# required: false
|
||||||
|
# @schema
|
||||||
|
# Cerbos service settings.
|
||||||
|
service:
|
||||||
|
# @schema
|
||||||
|
# enum: [ClusterIP, NodePort, LoadBalancer]
|
||||||
|
# default: ClusterIP
|
||||||
|
# @schema
|
||||||
|
# Service type
|
||||||
|
type: ClusterIP
|
||||||
|
# @schema
|
||||||
|
# default: 3592
|
||||||
|
# @schema
|
||||||
|
# Service HTTP port
|
||||||
|
httpPort: 3592
|
||||||
|
# @schema
|
||||||
|
# default: 3593
|
||||||
|
# @schema
|
||||||
|
# Service gRPC port
|
||||||
|
grpcPort: 3593
|
||||||
|
# @schema
|
||||||
|
# default: 13592
|
||||||
|
# @schema
|
||||||
|
# HTTP node port (if service type is NodePort)
|
||||||
|
httpNodePort: 13592
|
||||||
|
# @schema
|
||||||
|
# default: 13593
|
||||||
|
# @schema
|
||||||
|
# gRPC node port (if service type is NodePort)
|
||||||
|
grpcNodePort: 13593
|
||||||
|
# @schema
|
||||||
|
# type: [object, null]
|
||||||
|
# additionalProperties: true
|
||||||
|
# @schema
|
||||||
|
# Service annotations
|
||||||
|
annotations: {}
|
||||||
|
# @schema
|
||||||
|
# type: [string, null]
|
||||||
|
# @schema
|
||||||
|
# Service Cluster IP
|
||||||
|
clusterIP: null
|
||||||
|
# @schema
|
||||||
|
# type: [string, null]
|
||||||
|
# @schema
|
||||||
|
# LoadBalancer static IP
|
||||||
|
loadBalancerIP: null
|
||||||
|
# @schema
|
||||||
|
# type: [string, null]
|
||||||
|
# @schema
|
||||||
|
# Set the internalTrafficPolicy. If this is unset and .Values.type is set to daemonset, this will default to "Local"
|
||||||
|
internalTrafficPolicy: ""
|
||||||
|
|
||||||
|
# @schema
|
||||||
|
# required: false
|
||||||
|
# @schema
|
||||||
|
# Cerbos deployment settings.
|
||||||
|
cerbos:
|
||||||
|
# Port to expose the http service on.
|
||||||
|
httpPort: 3592
|
||||||
|
# Port to expose the gRPC service on.
|
||||||
|
grpcPort: 3593
|
||||||
|
# @schema
|
||||||
|
# type: [string, null]
|
||||||
|
# @schema
|
||||||
|
# Secret containing the TLS certificate.
|
||||||
|
# Leave empty to disable TLS.
|
||||||
|
# The secret must contain the following keys:
|
||||||
|
# - tls.crt: Required. Certificate file contents.
|
||||||
|
# - tls.key: Required. Private key for the certificate.
|
||||||
|
# - ca.crt: Optional. CA certificate to add to the trust pool.
|
||||||
|
tlsSecretName: ""
|
||||||
|
# Cerbos log level. Valid values are DEBUG, INFO, WARN and ERROR
|
||||||
|
logLevel: INFO
|
||||||
|
# Add Prometheus service discovery annotations to the pod.
|
||||||
|
prometheusPodAnnotationsEnabled: true
|
||||||
|
# @schema
|
||||||
|
# type: [object, null]
|
||||||
|
# additionalProperties: true
|
||||||
|
# @schema
|
||||||
|
# Cerbos config file contents.
|
||||||
|
# Some server settings like server.httpListenAddr, server.grpcListenAddr, server.tls will be overwritten by the chart based on values provided above.
|
||||||
|
config: {}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,54 @@
|
||||||
|
annotations:
|
||||||
|
artifacthub.io/category: integration-delivery
|
||||||
|
artifacthub.io/changes: |
|
||||||
|
- Update `jenkins/jenkins` to version `2.462.1-jdk17`
|
||||||
|
artifacthub.io/images: |
|
||||||
|
- name: jenkins
|
||||||
|
image: docker.io/jenkins/jenkins:2.462.1-jdk17
|
||||||
|
- name: k8s-sidecar
|
||||||
|
image: docker.io/kiwigrid/k8s-sidecar:1.27.5
|
||||||
|
- name: inbound-agent
|
||||||
|
image: jenkins/inbound-agent:3256.v88a_f6e922152-1
|
||||||
|
artifacthub.io/license: Apache-2.0
|
||||||
|
artifacthub.io/links: |
|
||||||
|
- name: Chart Source
|
||||||
|
url: https://github.com/jenkinsci/helm-charts/tree/main/charts/jenkins
|
||||||
|
- name: Jenkins
|
||||||
|
url: https://www.jenkins.io/
|
||||||
|
- name: support
|
||||||
|
url: https://github.com/jenkinsci/helm-charts/issues
|
||||||
|
catalog.cattle.io/certified: partner
|
||||||
|
catalog.cattle.io/display-name: Jenkins
|
||||||
|
catalog.cattle.io/kube-version: '>=1.14-0'
|
||||||
|
catalog.cattle.io/release-name: jenkins
|
||||||
|
apiVersion: v2
|
||||||
|
appVersion: 2.462.1
|
||||||
|
description: 'Jenkins - Build great things at any scale! As the leading open source
|
||||||
|
automation server, Jenkins provides over 1800 plugins to support building, deploying
|
||||||
|
and automating any project. '
|
||||||
|
home: https://www.jenkins.io/
|
||||||
|
icon: file://assets/icons/jenkins.svg
|
||||||
|
keywords:
|
||||||
|
- jenkins
|
||||||
|
- ci
|
||||||
|
- devops
|
||||||
|
kubeVersion: '>=1.14-0'
|
||||||
|
maintainers:
|
||||||
|
- email: maor.friedman@redhat.com
|
||||||
|
name: maorfr
|
||||||
|
- email: mail@torstenwalter.de
|
||||||
|
name: torstenwalter
|
||||||
|
- email: garridomota@gmail.com
|
||||||
|
name: mogaal
|
||||||
|
- email: wmcdona89@gmail.com
|
||||||
|
name: wmcdona89
|
||||||
|
- email: timjacomb1@gmail.com
|
||||||
|
name: timja
|
||||||
|
name: jenkins
|
||||||
|
sources:
|
||||||
|
- https://github.com/jenkinsci/jenkins
|
||||||
|
- https://github.com/jenkinsci/docker-inbound-agent
|
||||||
|
- https://github.com/maorfr/kube-tasks
|
||||||
|
- https://github.com/jenkinsci/configuration-as-code-plugin
|
||||||
|
type: application
|
||||||
|
version: 5.5.4
|
|
@ -0,0 +1,706 @@
|
||||||
|
# Jenkins
|
||||||
|
|
||||||
|
[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/jenkins)](https://artifacthub.io/packages/helm/jenkinsci/jenkins)
|
||||||
|
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
|
||||||
|
[![Releases downloads](https://img.shields.io/github/downloads/jenkinsci/helm-charts/total.svg)](https://github.com/jenkinsci/helm-charts/releases)
|
||||||
|
[![Join the chat at https://app.gitter.im/#/room/#jenkins-ci:matrix.org](https://badges.gitter.im/badge.svg)](https://app.gitter.im/#/room/#jenkins-ci:matrix.org)
|
||||||
|
|
||||||
|
[Jenkins](https://www.jenkins.io/) is the leading open source automation server, Jenkins provides over 1800 plugins to support building, deploying and automating any project.
|
||||||
|
|
||||||
|
This chart installs a Jenkins server which spawns agents on [Kubernetes](http://kubernetes.io) utilizing the [Jenkins Kubernetes plugin](https://plugins.jenkins.io/kubernetes/).
|
||||||
|
|
||||||
|
Inspired by the awesome work of [Carlos Sanchez](https://github.com/carlossg).
|
||||||
|
|
||||||
|
## Get Repository Info
|
||||||
|
|
||||||
|
```console
|
||||||
|
helm repo add jenkins https://charts.jenkins.io
|
||||||
|
helm repo update
|
||||||
|
```
|
||||||
|
|
||||||
|
_See [`helm repo`](https://helm.sh/docs/helm/helm_repo/) for command documentation._
|
||||||
|
|
||||||
|
## Install Chart
|
||||||
|
|
||||||
|
```console
|
||||||
|
# Helm 3
|
||||||
|
$ helm install [RELEASE_NAME] jenkins/jenkins [flags]
|
||||||
|
```
|
||||||
|
|
||||||
|
_See [configuration](#configuration) below._
|
||||||
|
|
||||||
|
_See [helm install](https://helm.sh/docs/helm/helm_install/) for command documentation._
|
||||||
|
|
||||||
|
## Uninstall Chart
|
||||||
|
|
||||||
|
```console
|
||||||
|
# Helm 3
|
||||||
|
$ helm uninstall [RELEASE_NAME]
|
||||||
|
```
|
||||||
|
|
||||||
|
This removes all the Kubernetes components associated with the chart and deletes the release.
|
||||||
|
|
||||||
|
_See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command documentation._
|
||||||
|
|
||||||
|
## Upgrade Chart
|
||||||
|
|
||||||
|
```console
|
||||||
|
# Helm 3
|
||||||
|
$ helm upgrade [RELEASE_NAME] jenkins/jenkins [flags]
|
||||||
|
```
|
||||||
|
|
||||||
|
_See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documentation._
|
||||||
|
|
||||||
|
Visit the chart's [CHANGELOG](https://github.com/jenkinsci/helm-charts/blob/main/charts/jenkins/CHANGELOG.md) to view the chart's release history.
|
||||||
|
For migration between major version check [migration guide](#migration-guide).
|
||||||
|
|
||||||
|
## Building weekly releases
|
||||||
|
|
||||||
|
The default charts target Long-Term-Support (LTS) releases of Jenkins.
|
||||||
|
To use other versions the easiest way is to update the image tag to the version you want.
|
||||||
|
You can also rebuild the chart if you want the `appVersion` field to match.
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing).
|
||||||
|
To see all configurable options with detailed comments, visit the chart's [values.yaml](https://github.com/jenkinsci/helm-charts/blob/main/charts/jenkins/values.yaml), or run these configuration commands:
|
||||||
|
|
||||||
|
```console
|
||||||
|
# Helm 3
|
||||||
|
$ helm show values jenkins/jenkins
|
||||||
|
```
|
||||||
|
|
||||||
|
For a summary of all configurable options, see [VALUES_SUMMARY.md](https://github.com/jenkinsci/helm-charts/blob/main/charts/jenkins/VALUES_SUMMARY.md).
|
||||||
|
|
||||||
|
### Configure Security Realm and Authorization Strategy
|
||||||
|
|
||||||
|
This chart configured a `securityRealm` and `authorizationStrategy` as shown below:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
controller:
|
||||||
|
JCasC:
|
||||||
|
securityRealm: |-
|
||||||
|
local:
|
||||||
|
allowsSignup: false
|
||||||
|
enableCaptcha: false
|
||||||
|
users:
|
||||||
|
- id: "${chart-admin-username}"
|
||||||
|
name: "Jenkins Admin"
|
||||||
|
password: "${chart-admin-password}"
|
||||||
|
authorizationStrategy: |-
|
||||||
|
loggedInUsersCanDoAnything:
|
||||||
|
allowAnonymousRead: false
|
||||||
|
```
|
||||||
|
|
||||||
|
With the configuration above there is only a single user.
|
||||||
|
This is fine for getting started quickly, but it needs to be adjusted for any serious environment.
|
||||||
|
|
||||||
|
So you should adjust this to suite your needs.
|
||||||
|
That could be using LDAP / OIDC / .. as authorization strategy and use globalMatrix as authorization strategy to configure more fine-grained permissions.
|
||||||
|
|
||||||
|
### Consider using a custom image
|
||||||
|
|
||||||
|
This chart allows the user to specify plugins which should be installed. However, for production use cases one should consider to build a custom Jenkins image which has all required plugins pre-installed.
|
||||||
|
This way you can be sure which plugins Jenkins is using when starting up and you avoid trouble in case of connectivity issues to the Jenkins update site.
|
||||||
|
|
||||||
|
The [docker repository](https://github.com/jenkinsci/docker) for the Jenkins image contains [documentation](https://github.com/jenkinsci/docker#preinstalling-plugins) how to do it.
|
||||||
|
|
||||||
|
Here is an example how that can be done:
|
||||||
|
|
||||||
|
```Dockerfile
|
||||||
|
FROM jenkins/jenkins:lts
|
||||||
|
RUN jenkins-plugin-cli --plugins kubernetes workflow-aggregator git configuration-as-code
|
||||||
|
```
|
||||||
|
|
||||||
|
NOTE: If you want a reproducible build then you should specify a non-floating tag for the image `jenkins/jenkins:2.249.3` and specify plugin versions.
|
||||||
|
|
||||||
|
Once you built the image and pushed it to your registry you can specify it in your values file like this:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
controller:
|
||||||
|
image: "registry/my-jenkins"
|
||||||
|
tag: "v1.2.3"
|
||||||
|
installPlugins: false
|
||||||
|
```
|
||||||
|
|
||||||
|
Notice: `installPlugins` is set to false to disable plugin download. In this case, the image `registry/my-jenkins:v1.2.3` must have the plugins specified as default value for [the `controller.installPlugins` directive](https://github.com/jenkinsci/helm-charts/blob/main/charts/jenkins/VALUES_SUMMARY.md#jenkins-plugins) to ensure that the configuration side-car system works as expected.
|
||||||
|
|
||||||
|
In case you are using a private registry you can use 'imagePullSecretName' to specify the name of the secret to use when pulling the image:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
controller:
|
||||||
|
image: "registry/my-jenkins"
|
||||||
|
tag: "v1.2.3"
|
||||||
|
imagePullSecretName: registry-secret
|
||||||
|
installPlugins: false
|
||||||
|
```
|
||||||
|
|
||||||
|
### External URL Configuration
|
||||||
|
|
||||||
|
If you are using the ingress definitions provided by this chart via the `controller.ingress` block the configured hostname will be the ingress hostname starting with `https://` or `http://` depending on the `tls` configuration.
|
||||||
|
The Protocol can be overwritten by specifying `controller.jenkinsUrlProtocol`.
|
||||||
|
|
||||||
|
If you are not using the provided ingress you can specify `controller.jenkinsUrl` to change the URL definition.
|
||||||
|
|
||||||
|
### Configuration as Code
|
||||||
|
|
||||||
|
Jenkins Configuration as Code (JCasC) is now a standard component in the Jenkins project.
|
||||||
|
To allow JCasC's configuration from the helm values, the plugin [`configuration-as-code`](https://plugins.jenkins.io/configuration-as-code/) must be installed in the Jenkins Controller's Docker image (which is the case by default as specified by the [default value of the directive `controller.installPlugins`](https://github.com/jenkinsci/helm-charts/blob/main/charts/jenkins/VALUES_SUMMARY.md#jenkins-plugins)).
|
||||||
|
|
||||||
|
JCasc configuration is passed through Helm values under the key `controller.JCasC`.
|
||||||
|
The section ["Jenkins Configuration as Code (JCasC)" of the page "VALUES_SUMMARY.md"](https://github.com/jenkinsci/helm-charts/blob/main/charts/jenkins/VALUES_SUMMARY.md#jenkins-configuration-as-code-jcasc) lists all the possible directives.
|
||||||
|
|
||||||
|
In particular, you may specify custom JCasC scripts by adding sub-key under the `controller.JCasC.configScripts` for each configuration area where each corresponds to a plugin or section of the UI.
|
||||||
|
|
||||||
|
The sub-keys (prior to `|` character) are only labels used to give the section a meaningful name.
|
||||||
|
The only restriction is they must conform to RFC 1123 definition of a DNS label, so they may only contain lowercase letters, numbers, and hyphens.
|
||||||
|
|
||||||
|
Each key will become the name of a configuration yaml file on the controller in `/var/jenkins_home/casc_configs` (by default) and will be processed by the Configuration as Code Plugin during Jenkins startup.
|
||||||
|
|
||||||
|
The lines after each `|` become the content of the configuration yaml file.
|
||||||
|
|
||||||
|
The first line after this is a JCasC root element, e.g. jenkins, credentials, etc.
|
||||||
|
|
||||||
|
Best reference is the Documentation link here: `https://<jenkins_url>/configuration-as-code`.
|
||||||
|
|
||||||
|
The example below sets custom systemMessage:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
controller:
|
||||||
|
JCasC:
|
||||||
|
configScripts:
|
||||||
|
welcome-message: |
|
||||||
|
jenkins:
|
||||||
|
systemMessage: Welcome to our CI\CD server.
|
||||||
|
```
|
||||||
|
|
||||||
|
More complex example that creates ldap settings:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
controller:
|
||||||
|
JCasC:
|
||||||
|
configScripts:
|
||||||
|
ldap-settings: |
|
||||||
|
jenkins:
|
||||||
|
securityRealm:
|
||||||
|
ldap:
|
||||||
|
configurations:
|
||||||
|
- server: ldap.acme.com
|
||||||
|
rootDN: dc=acme,dc=uk
|
||||||
|
managerPasswordSecret: ${LDAP_PASSWORD}
|
||||||
|
groupMembershipStrategy:
|
||||||
|
fromUserRecord:
|
||||||
|
attributeName: "memberOf"
|
||||||
|
```
|
||||||
|
|
||||||
|
Keep in mind that default configuration file already contains some values that you won't be able to override under configScripts section.
|
||||||
|
|
||||||
|
For example, you can not configure Jenkins URL and System Admin email address like this because of conflicting configuration error.
|
||||||
|
|
||||||
|
Incorrect:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
controller:
|
||||||
|
JCasC:
|
||||||
|
configScripts:
|
||||||
|
jenkins-url: |
|
||||||
|
unclassified:
|
||||||
|
location:
|
||||||
|
url: https://example.com/jenkins
|
||||||
|
adminAddress: example@mail.com
|
||||||
|
```
|
||||||
|
|
||||||
|
Correct:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
controller:
|
||||||
|
jenkinsUrl: https://example.com/jenkins
|
||||||
|
jenkinsAdminEmail: example@mail.com
|
||||||
|
```
|
||||||
|
|
||||||
|
Further JCasC examples can be found [here](https://github.com/jenkinsci/configuration-as-code-plugin/tree/master/demos).
|
||||||
|
|
||||||
|
#### Breaking out large Config as Code scripts
|
||||||
|
|
||||||
|
Jenkins Config as Code scripts can become quite large, and maintaining all of your scripts within one yaml file can be difficult. The Config as Code plugin itself suggests updating the `CASC_JENKINS_CONFIG` environment variable to be a comma separated list of paths for the plugin to traverse, picking up the yaml files as needed.
|
||||||
|
However, under the Jenkins helm chart, this `CASC_JENKINS_CONFIG` value is maintained through the templates. A better solution is to split your `controller.JCasC.configScripts` into separate values files, and provide each file during the helm install.
|
||||||
|
|
||||||
|
For example, you can have a values file (e.g values_main.yaml) that defines the values described in the `VALUES_SUMMARY.md` for your Jenkins configuration:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
jenkins:
|
||||||
|
controller:
|
||||||
|
jenkinsUrlProtocol: https
|
||||||
|
installPlugins: false
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
In a second file (e.g values_jenkins_casc.yaml), you can define a section of your config scripts:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
jenkins:
|
||||||
|
controller:
|
||||||
|
JCasC:
|
||||||
|
configScripts:
|
||||||
|
jenkinsCasc: |
|
||||||
|
jenkins:
|
||||||
|
disableRememberMe: false
|
||||||
|
mode: NORMAL
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
And keep extending your config scripts by creating more files (so not all config scripts are located in one yaml file for better maintenance):
|
||||||
|
|
||||||
|
values_jenkins_unclassified.yaml
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
jenkins:
|
||||||
|
controller:
|
||||||
|
JCasC:
|
||||||
|
configScripts:
|
||||||
|
unclassifiedCasc: |
|
||||||
|
unclassified:
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
When installing, you provide all relevant yaml files (e.g `helm install -f values_main.yaml -f values_jenkins_casc.yaml -f values_jenkins_unclassified.yaml ...`). Instead of updating the `CASC_JENKINS_CONFIG` environment variable to include multiple paths, multiple CasC yaml files will be created in the same path `var/jenkins_home/casc_configs`.
|
||||||
|
|
||||||
|
#### Config as Code With or Without Auto-Reload
|
||||||
|
|
||||||
|
Config as Code changes (to `controller.JCasC.configScripts`) can either force a new pod to be created and only be applied at next startup, or can be auto-reloaded on-the-fly.
|
||||||
|
If you set `controller.sidecars.configAutoReload.enabled` to `true`, a second, auxiliary container will be installed into the Jenkins controller pod, known as a "sidecar".
|
||||||
|
This watches for changes to configScripts, copies the content onto the Jenkins file-system and issues a POST to `http://<jenkins_url>/reload-configuration-as-code` with a pre-shared key.
|
||||||
|
You can monitor this sidecar's logs using command `kubectl logs <controller_pod> -c config-reload -f`.
|
||||||
|
If you want to enable auto-reload then you also need to configure rbac as the container which triggers the reload needs to watch the config maps:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
controller:
|
||||||
|
sidecars:
|
||||||
|
configAutoReload:
|
||||||
|
enabled: true
|
||||||
|
rbac:
|
||||||
|
create: true
|
||||||
|
```
|
||||||
|
|
||||||
|
### Allow Limited HTML Markup in User-Submitted Text
|
||||||
|
|
||||||
|
Some third-party systems (e.g. GitHub) use HTML-formatted data in their payload sent to a Jenkins webhook (e.g. URL of a pull-request being built).
|
||||||
|
To display such data as processed HTML instead of raw text set `controller.enableRawHtmlMarkupFormatter` to true.
|
||||||
|
This option requires installation of the [OWASP Markup Formatter Plugin (antisamy-markup-formatter)](https://plugins.jenkins.io/antisamy-markup-formatter/).
|
||||||
|
This plugin is **not** installed by default but may be added to `controller.additionalPlugins`.
|
||||||
|
|
||||||
|
### Change max connections to Kubernetes API
|
||||||
|
When using agents with containers other than JNLP, The kubernetes plugin will communicate with those containers using the Kubernetes API. this changes the maximum concurrent connections
|
||||||
|
```yaml
|
||||||
|
agent:
|
||||||
|
maxRequestsPerHostStr: "32"
|
||||||
|
```
|
||||||
|
This will change the configuration of the kubernetes "cloud" (as called by jenkins) that is created automatically as part of this helm chart.
|
||||||
|
|
||||||
|
### Change container cleanup timeout API
|
||||||
|
For tasks that use very large images, this timeout can be increased to avoid early termination of the task while the Kubernetes pod is still deploying.
|
||||||
|
```yaml
|
||||||
|
agent:
|
||||||
|
retentionTimeout: "32"
|
||||||
|
```
|
||||||
|
This will change the configuration of the kubernetes "cloud" (as called by jenkins) that is created automatically as part of this helm chart.
|
||||||
|
|
||||||
|
### Change seconds to wait for pod to be running
|
||||||
|
This will change how long Jenkins will wait (seconds) for pod to be in running state.
|
||||||
|
```yaml
|
||||||
|
agent:
|
||||||
|
waitForPodSec: "32"
|
||||||
|
```
|
||||||
|
This will change the configuration of the kubernetes "cloud" (as called by jenkins) that is created automatically as part of this helm chart.
|
||||||
|
|
||||||
|
### Mounting Volumes into Agent Pods
|
||||||
|
|
||||||
|
Your Jenkins Agents will run as pods, and it's possible to inject volumes where needed:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
agent:
|
||||||
|
volumes:
|
||||||
|
- type: Secret
|
||||||
|
secretName: jenkins-mysecrets
|
||||||
|
mountPath: /var/run/secrets/jenkins-mysecrets
|
||||||
|
```
|
||||||
|
|
||||||
|
The supported volume types are: `ConfigMap`, `EmptyDir`, `HostPath`, `Nfs`, `PVC`, `Secret`.
|
||||||
|
Each type supports a different set of configurable attributes, defined by [the corresponding Java class](https://github.com/jenkinsci/kubernetes-plugin/tree/master/src/main/java/org/csanchez/jenkins/plugins/kubernetes/volumes).
|
||||||
|
|
||||||
|
### NetworkPolicy
|
||||||
|
|
||||||
|
To make use of the NetworkPolicy resources created by default, install [a networking plugin that implements the Kubernetes NetworkPolicy spec](https://kubernetes.io/docs/tasks/administer-cluster/declare-network-policy#before-you-begin).
|
||||||
|
|
||||||
|
[Install](#install-chart) helm chart with network policy enabled by setting `networkPolicy.enabled` to `true`.
|
||||||
|
|
||||||
|
You can use `controller.networkPolicy.internalAgents` and `controller.networkPolicy.externalAgents` stanzas for fine-grained controls over where internal/external agents can connect from.
|
||||||
|
Internal ones are allowed based on pod labels and (optionally) namespaces, and external ones are allowed based on IP ranges.
|
||||||
|
|
||||||
|
### Script approval list
|
||||||
|
|
||||||
|
`controller.scriptApproval` allows to pass function signatures that will be allowed in pipelines.
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
controller:
|
||||||
|
scriptApproval:
|
||||||
|
- "method java.util.Base64$Decoder decode java.lang.String"
|
||||||
|
- "new java.lang.String byte[]"
|
||||||
|
- "staticMethod java.util.Base64 getDecoder"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Custom Labels
|
||||||
|
|
||||||
|
`controller.serviceLabels` can be used to add custom labels in `jenkins-controller-svc.yaml`.
|
||||||
|
For example:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
ServiceLabels:
|
||||||
|
expose: true
|
||||||
|
```
|
||||||
|
|
||||||
|
### Persistence
|
||||||
|
|
||||||
|
The Jenkins image stores persistence under `/var/jenkins_home` path of the container.
|
||||||
|
A dynamically managed Persistent Volume Claim is used to keep the data across deployments, by default.
|
||||||
|
This is known to work in GCE, AWS, and minikube. Alternatively, a previously configured Persistent Volume Claim can be used.
|
||||||
|
|
||||||
|
It is possible to mount several volumes using `persistence.volumes` and `persistence.mounts` parameters.
|
||||||
|
See additional `persistence` values using [configuration commands](#configuration).
|
||||||
|
|
||||||
|
#### Existing PersistentVolumeClaim
|
||||||
|
|
||||||
|
1. Create the PersistentVolume
|
||||||
|
2. Create the PersistentVolumeClaim
|
||||||
|
3. [Install](#install-chart) the chart, setting `persistence.existingClaim` to `PVC_NAME`
|
||||||
|
|
||||||
|
#### Long Volume Attach/Mount Times
|
||||||
|
|
||||||
|
Certain volume type and filesystem format combinations may experience long
|
||||||
|
attach/mount times, [10 or more minutes][K8S_VOLUME_TIMEOUT], when using
|
||||||
|
`fsGroup`. This issue may result in the following entries in the pod's event
|
||||||
|
history:
|
||||||
|
|
||||||
|
```console
|
||||||
|
Warning FailedMount 38m kubelet, aks-default-41587790-2 Unable to attach or mount volumes: unmounted volumes=[jenkins-home], unattached volumes=[plugins plugin-dir jenkins-token-rmq2g sc-config-volume tmp jenkins-home jenkins-config secrets-dir]: timed out waiting for the condition
|
||||||
|
```
|
||||||
|
|
||||||
|
In these cases, experiment with replacing `fsGroup` with
|
||||||
|
`supplementalGroups` in the pod's `securityContext`. This can be achieved by
|
||||||
|
setting the `controller.podSecurityContextOverride` Helm chart value to
|
||||||
|
something like:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
controller:
|
||||||
|
podSecurityContextOverride:
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: 1000
|
||||||
|
supplementalGroups: [1000]
|
||||||
|
```
|
||||||
|
|
||||||
|
This issue has been reported on [azureDisk with ext4][K8S_VOLUME_TIMEOUT] and
|
||||||
|
on [Alibaba cloud][K8S_VOLUME_TIMEOUT_ALIBABA].
|
||||||
|
|
||||||
|
[K8S_VOLUME_TIMEOUT]: https://github.com/kubernetes/kubernetes/issues/67014
|
||||||
|
[K8S_VOLUME_TIMEOUT_ALIBABA]: https://github.com/kubernetes/kubernetes/issues/67014#issuecomment-698770511
|
||||||
|
|
||||||
|
#### Storage Class
|
||||||
|
|
||||||
|
It is possible to define which storage class to use, by setting `persistence.storageClass` to `[customStorageClass]`.
|
||||||
|
If set to a dash (`-`), dynamic provisioning is disabled.
|
||||||
|
If the storage class is set to null or left undefined (`""`), the default provisioner is used (gp2 on AWS, standard on GKE, AWS & OpenStack).
|
||||||
|
|
||||||
|
### Additional Secrets
|
||||||
|
|
||||||
|
Additional secrets and Additional Existing Secrets,
|
||||||
|
can be mounted into the Jenkins controller through the chart or created using `controller.additionalSecrets` or `controller.additionalExistingSecrets`.
|
||||||
|
A common use case might be identity provider credentials if using an external LDAP or OIDC-based identity provider.
|
||||||
|
The secret may then be referenced in JCasC configuration (see [JCasC configuration](#configuration-as-code)).
|
||||||
|
|
||||||
|
`values.yaml` controller section, referencing mounted secrets:
|
||||||
|
```yaml
|
||||||
|
controller:
|
||||||
|
# the 'name' and 'keyName' are concatenated with a '-' in between, so for example:
|
||||||
|
# an existing secret "secret-credentials" and a key inside it named "github-password" should be used in Jcasc as ${secret-credentials-github-password}
|
||||||
|
# 'name' and 'keyName' must be lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-',
|
||||||
|
# and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc')
|
||||||
|
# existingSecret existing secret "secret-credentials" and a key inside it named "github-username" should be used in Jcasc as ${github-username}
|
||||||
|
# When using existingSecret no need to specify the keyName under additionalExistingSecrets.
|
||||||
|
existingSecret: secret-credentials
|
||||||
|
|
||||||
|
additionalExistingSecrets:
|
||||||
|
- name: secret-credentials
|
||||||
|
keyName: github-username
|
||||||
|
- name: secret-credentials
|
||||||
|
keyName: github-password
|
||||||
|
- name: secret-credentials
|
||||||
|
keyName: token
|
||||||
|
|
||||||
|
additionalSecrets:
|
||||||
|
- name: client_id
|
||||||
|
value: abc123
|
||||||
|
- name: client_secret
|
||||||
|
value: xyz999
|
||||||
|
JCasC:
|
||||||
|
securityRealm: |
|
||||||
|
oic:
|
||||||
|
clientId: ${client_id}
|
||||||
|
clientSecret: ${client_secret}
|
||||||
|
...
|
||||||
|
configScripts:
|
||||||
|
jenkins-casc-configs: |
|
||||||
|
credentials:
|
||||||
|
system:
|
||||||
|
domainCredentials:
|
||||||
|
- credentials:
|
||||||
|
- string:
|
||||||
|
description: "github access token"
|
||||||
|
id: "github_app_token"
|
||||||
|
scope: GLOBAL
|
||||||
|
secret: ${secret-credentials-token}
|
||||||
|
- usernamePassword:
|
||||||
|
description: "github access username password"
|
||||||
|
id: "github_username_pass"
|
||||||
|
password: ${secret-credentials-github-password}
|
||||||
|
scope: GLOBAL
|
||||||
|
username: ${secret-credentials-github-username}
|
||||||
|
```
|
||||||
|
|
||||||
|
For more information, see [JCasC documentation](https://github.com/jenkinsci/configuration-as-code-plugin/blob/master/docs/features/secrets.adoc#kubernetes-secrets).
|
||||||
|
|
||||||
|
### Secret Claims from HashiCorp Vault
|
||||||
|
|
||||||
|
It's possible for this chart to generate `SecretClaim` resources in order to automatically create and maintain Kubernetes `Secrets` from HashiCorp [Vault](https://www.vaultproject.io/) via [`kube-vault-controller`](https://github.com/roboll/kube-vault-controller)
|
||||||
|
|
||||||
|
These `Secrets` can then be referenced in the same manner as Additional Secrets above.
|
||||||
|
|
||||||
|
This can be achieved by defining required Secret Claims within `controller.secretClaims`, as follows:
|
||||||
|
```yaml
|
||||||
|
controller:
|
||||||
|
secretClaims:
|
||||||
|
- name: jenkins-secret
|
||||||
|
path: secret/path
|
||||||
|
- name: jenkins-short-ttl
|
||||||
|
path: secret/short-ttl-path
|
||||||
|
renew: 60
|
||||||
|
```
|
||||||
|
|
||||||
|
### RBAC
|
||||||
|
|
||||||
|
RBAC is enabled by default. If you want to disable it you will need to set `rbac.create` to `false`.
|
||||||
|
|
||||||
|
### Adding Custom Pod Templates
|
||||||
|
|
||||||
|
It is possible to add custom pod templates for the default configured kubernetes cloud.
|
||||||
|
Add a key under `agent.podTemplates` for each pod template. Each key (prior to `|` character) is just a label, and can be any value.
|
||||||
|
Keys are only used to give the pod template a meaningful name. The only restriction is they may only contain RFC 1123 \ DNS label characters: lowercase letters, numbers, and hyphens. Each pod template can contain multiple containers.
|
||||||
|
There's no need to add the _jnlp_ container since the kubernetes plugin will automatically inject it into the pod.
|
||||||
|
For this pod templates configuration to be loaded the following values must be set:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
controller.JCasC.defaultConfig: true
|
||||||
|
```
|
||||||
|
|
||||||
|
The example below creates a python pod template in the kubernetes cloud:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
agent:
|
||||||
|
podTemplates:
|
||||||
|
python: |
|
||||||
|
- name: python
|
||||||
|
label: jenkins-python
|
||||||
|
serviceAccount: jenkins
|
||||||
|
containers:
|
||||||
|
- name: python
|
||||||
|
image: python:3
|
||||||
|
command: "/bin/sh -c"
|
||||||
|
args: "cat"
|
||||||
|
ttyEnabled: true
|
||||||
|
privileged: true
|
||||||
|
resourceRequestCpu: "400m"
|
||||||
|
resourceRequestMemory: "512Mi"
|
||||||
|
resourceLimitCpu: "1"
|
||||||
|
resourceLimitMemory: "1024Mi"
|
||||||
|
```
|
||||||
|
|
||||||
|
Best reference is `https://<jenkins_url>/configuration-as-code/reference#Cloud-kubernetes`.
|
||||||
|
|
||||||
|
### Adding Pod Templates Using additionalAgents
|
||||||
|
|
||||||
|
`additionalAgents` may be used to configure additional kubernetes pod templates.
|
||||||
|
Each additional agent corresponds to `agent` in terms of the configurable values and inherits all values from `agent` so you only need to specify values which differ.
|
||||||
|
For example:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
agent:
|
||||||
|
podName: default
|
||||||
|
customJenkinsLabels: default
|
||||||
|
# set resources for additional agents to inherit
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: "1"
|
||||||
|
memory: "2048Mi"
|
||||||
|
|
||||||
|
additionalAgents:
|
||||||
|
maven:
|
||||||
|
podName: maven
|
||||||
|
customJenkinsLabels: maven
|
||||||
|
# An example of overriding the jnlp container
|
||||||
|
# sideContainerName: jnlp
|
||||||
|
image: jenkins/jnlp-agent-maven
|
||||||
|
tag: latest
|
||||||
|
python:
|
||||||
|
podName: python
|
||||||
|
customJenkinsLabels: python
|
||||||
|
sideContainerName: python
|
||||||
|
image: python
|
||||||
|
tag: "3"
|
||||||
|
command: "/bin/sh -c"
|
||||||
|
args: "cat"
|
||||||
|
TTYEnabled: true
|
||||||
|
```
|
||||||
|
|
||||||
|
### Ingress Configuration
|
||||||
|
|
||||||
|
This chart provides ingress resources configurable via the `controller.ingress` block.
|
||||||
|
|
||||||
|
The simplest configuration looks like the following:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
controller:
|
||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
paths: []
|
||||||
|
apiVersion: "extensions/v1beta1"
|
||||||
|
hostName: jenkins.example.com
|
||||||
|
```
|
||||||
|
|
||||||
|
This snippet configures an ingress rule for exposing jenkins at `jenkins.example.com`
|
||||||
|
|
||||||
|
You can define labels and annotations via `controller.ingress.labels` and `controller.ingress.annotations` respectively.
|
||||||
|
Additionally, you can configure the ingress tls via `controller.ingress.tls`.
|
||||||
|
By default, this ingress rule exposes all paths.
|
||||||
|
If needed this can be overwritten by specifying the wanted paths in `controller.ingress.paths`
|
||||||
|
|
||||||
|
If you want to configure a secondary ingress e.g. you don't want the jenkins instance exposed but still want to receive webhooks you can configure `controller.secondaryingress`.
|
||||||
|
The secondaryingress doesn't expose anything by default and has to be configured via `controller.secondaryingress.paths`:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
controller:
|
||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
apiVersion: "extensions/v1beta1"
|
||||||
|
hostName: "jenkins.internal.example.com"
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: "internal"
|
||||||
|
secondaryingress:
|
||||||
|
enabled: true
|
||||||
|
apiVersion: "extensions/v1beta1"
|
||||||
|
hostName: "jenkins-scm.example.com"
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: "public"
|
||||||
|
paths:
|
||||||
|
- /github-webhook
|
||||||
|
```
|
||||||
|
|
||||||
|
## Prometheus Metrics
|
||||||
|
|
||||||
|
If you want to expose Prometheus metrics you need to install the [Jenkins Prometheus Metrics Plugin](https://github.com/jenkinsci/prometheus-plugin).
|
||||||
|
It will expose an endpoint (default `/prometheus`) with metrics where a Prometheus Server can scrape.
|
||||||
|
|
||||||
|
If you have implemented [Prometheus Operator](https://github.com/prometheus-operator/prometheus-operator), you can set `controller.prometheus.enabled` to `true` to configure a `ServiceMonitor` and `PrometheusRule`.
|
||||||
|
If you want to further adjust alerting rules you can do so by configuring `controller.prometheus.alertingrules`
|
||||||
|
|
||||||
|
If you have implemented Prometheus without using the operator, you can leave `controller.prometheus.enabled` set to `false`.
|
||||||
|
|
||||||
|
### Running Behind a Forward Proxy
|
||||||
|
|
||||||
|
The controller pod uses an Init Container to install plugins etc. If you are behind a corporate proxy it may be useful to set `controller.initContainerEnv` to add environment variables such as `http_proxy`, so that these can be downloaded.
|
||||||
|
|
||||||
|
Additionally, you may want to add env vars for the init container, the Jenkins container, and the JVM (`controller.javaOpts`):
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
controller:
|
||||||
|
initContainerEnv:
|
||||||
|
- name: http_proxy
|
||||||
|
value: "http://192.168.64.1:3128"
|
||||||
|
- name: https_proxy
|
||||||
|
value: "http://192.168.64.1:3128"
|
||||||
|
- name: no_proxy
|
||||||
|
value: ""
|
||||||
|
- name: JAVA_OPTS
|
||||||
|
value: "-Dhttps.proxyHost=proxy_host_name_without_protocol -Dhttps.proxyPort=3128"
|
||||||
|
containerEnv:
|
||||||
|
- name: http_proxy
|
||||||
|
value: "http://192.168.64.1:3128"
|
||||||
|
- name: https_proxy
|
||||||
|
value: "http://192.168.64.1:3128"
|
||||||
|
javaOpts: >-
|
||||||
|
-Dhttp.proxyHost=192.168.64.1
|
||||||
|
-Dhttp.proxyPort=3128
|
||||||
|
-Dhttps.proxyHost=192.168.64.1
|
||||||
|
-Dhttps.proxyPort=3128
|
||||||
|
```
|
||||||
|
|
||||||
|
### HTTPS Keystore Configuration
|
||||||
|
|
||||||
|
[This configuration](https://wiki.jenkins.io/pages/viewpage.action?pageId=135468777) enables jenkins to use keystore in order to serve HTTPS.
|
||||||
|
Here is the [value file section](https://wiki.jenkins.io/pages/viewpage.action?pageId=135468777#RunningJenkinswithnativeSSL/HTTPS-ConfigureJenkinstouseHTTPSandtheJKSkeystore) related to keystore configuration.
|
||||||
|
Keystore itself should be placed in front of `jenkinsKeyStoreBase64Encoded` key and in base64 encoded format. To achieve that after having `keystore.jks` file simply do this: `cat keystore.jks | base64` and paste the output in front of `jenkinsKeyStoreBase64Encoded`.
|
||||||
|
After enabling `httpsKeyStore.enable` make sure that `httpPort` and `targetPort` are not the same, as `targetPort` will serve HTTPS.
|
||||||
|
Do not set `controller.httpsKeyStore.httpPort` to `-1` because it will cause readiness and liveliness prob to fail.
|
||||||
|
If you already have a kubernetes secret that has keystore and its password you can specify its' name in front of `jenkinsHttpsJksSecretName`, You need to remember that your secret should have proper data key names `jenkins-jks-file` (or override the key name using `jenkinsHttpsJksSecretKey`)
|
||||||
|
and `https-jks-password` (or override the key name using `jenkinsHttpsJksPasswordSecretKey`; additionally you can make it get the password from a different secret using `jenkinsHttpsJksPasswordSecretName`). Example:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
controller:
|
||||||
|
httpsKeyStore:
|
||||||
|
enable: true
|
||||||
|
jenkinsHttpsJksSecretName: ''
|
||||||
|
httpPort: 8081
|
||||||
|
path: "/var/jenkins_keystore"
|
||||||
|
fileName: "keystore.jks"
|
||||||
|
password: "changeit"
|
||||||
|
jenkinsKeyStoreBase64Encoded: ''
|
||||||
|
```
|
||||||
|
### AWS Security Group Policies
|
||||||
|
|
||||||
|
To create SecurityGroupPolicies set `awsSecurityGroupPolicies.enabled` to true and add your policies. Each policy requires a `name`, array of `securityGroupIds` and a `podSelector`. Example:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
awsSecurityGroupPolicies:
|
||||||
|
enabled: true
|
||||||
|
policies:
|
||||||
|
- name: "jenkins-controller"
|
||||||
|
securityGroupIds:
|
||||||
|
- sg-123456789
|
||||||
|
podSelector:
|
||||||
|
matchExpressions:
|
||||||
|
- key: app.kubernetes.io/component
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- jenkins-controller
|
||||||
|
```
|
||||||
|
|
||||||
|
### Agent Direct Connection
|
||||||
|
|
||||||
|
Set `directConnection` to `true` to allow agents to connect directly to a given TCP port without having to negotiate a HTTP(S) connection. This can allow you to have agent connections without an external HTTP(S) port. Example:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
agent:
|
||||||
|
jenkinsTunnel: "jenkinsci-agent:50000"
|
||||||
|
directConnection: true
|
||||||
|
```
|
||||||
|
|
||||||
|
## Migration Guide
|
||||||
|
|
||||||
|
### From stable repository
|
||||||
|
|
||||||
|
Upgrade an existing release from `stable/jenkins` to `jenkins/jenkins` seamlessly by ensuring you have the latest [repository info](#get-repository-info) and running the [upgrade commands](#upgrade-chart) specifying the `jenkins/jenkins` chart.
|
||||||
|
|
||||||
|
### Major Version Upgrades
|
||||||
|
|
||||||
|
Chart release versions follow [SemVer](../../CONTRIBUTING.md#versioning), where a MAJOR version change (example `1.0.0` -> `2.0.0`) indicates an incompatible breaking change needing manual actions.
|
||||||
|
|
||||||
|
See [UPGRADING.md](./UPGRADING.md) for a list of breaking changes
|
|
@ -0,0 +1,148 @@
|
||||||
|
# Upgrade Notes
|
||||||
|
|
||||||
|
## To 5.0.0
|
||||||
|
- `controller.image`, `controller.tag`, and `controller.tagLabel` have been removed. If you want to overwrite the image you now need to configure any or all of:
|
||||||
|
- `controller.image.registry`
|
||||||
|
- `controller.image.repository`
|
||||||
|
- `controller.image.tag`
|
||||||
|
- `controller.image.tagLabel`
|
||||||
|
- `controller.imagePullPolicy` has been removed. If you want to overwrite the pull policy you now need to configure `controller.image.pullPolicy`.
|
||||||
|
- `controller.sidecars.configAutoReload.image` has been removed. If you want to overwrite the configAutoReload image you now need to configure any or all of:
|
||||||
|
- `controller.sidecars.configAutoReload.image.registry`
|
||||||
|
- `controller.sidecars.configAutoReload.image.repository`
|
||||||
|
- `controller.sidecars.configAutoReload.image.tag`
|
||||||
|
- `controller.sidecars.other` has been renamed to `controller.sidecars.additionalSidecarContainers`.
|
||||||
|
- `agent.image` and `agent.tag` have been removed. If you want to overwrite the agent image you now need to configure any or all of:
|
||||||
|
- `agent.image.repository`
|
||||||
|
- `agent.image.tag`
|
||||||
|
- The registry can still be overwritten by `agent.jnlpregistry`
|
||||||
|
- `agent.additionalContainers[*].image` has been renamed to `agent.additionalContainers[*].image.repository`
|
||||||
|
- `agent.additionalContainers[*].tag` has been renamed to `agent.additionalContainers[*].image.tag`
|
||||||
|
- `additionalAgents.*.image` has been renamed to `additionalAgents.*.image.repository`
|
||||||
|
- `additionalAgents.*.tag` has been renamed to `additionalAgents.*.image.tag`
|
||||||
|
- `additionalClouds.*.additionalAgents.*.image` has been renamed to `additionalClouds.*.additionalAgents.*.image.repository`
|
||||||
|
- `additionalClouds.*.additionalAgents.*.tag` has been renamed to `additionalClouds.*.additionalAgents.*.image.tag`
|
||||||
|
- `helmtest.bats.image` has been split up to:
|
||||||
|
- `helmtest.bats.image.registry`
|
||||||
|
- `helmtest.bats.image.repository`
|
||||||
|
- `helmtest.bats.image.tag`
|
||||||
|
- `controller.adminUsername` and `controller.adminPassword` have been renamed to `controller.admin.username` and `controller.admin.password` respectively
|
||||||
|
- `controller.adminSecret` has been renamed to `controller.admin.createSecret`
|
||||||
|
- `backup.*` was unmaintained and has thus been removed. See the following page for alternatives: [Kubernetes Backup and Migrations](https://nubenetes.com/kubernetes-backup-migrations/).
|
||||||
|
|
||||||
|
## To 4.0.0
|
||||||
|
Removes automatic `remotingSecurity` setting when using a container tag older than `2.326` (introduced in [`3.11.7`](./CHANGELOG.md#3117)). If you're using a version older than `2.326`, you should explicitly set `.controller.legacyRemotingSecurityEnabled` to `true`.
|
||||||
|
|
||||||
|
## To 3.0.0
|
||||||
|
|
||||||
|
* Check `securityRealm` and `authorizationStrategy` and adjust it.
|
||||||
|
Otherwise, your configured users and permissions will be overridden.
|
||||||
|
* You need to use helm version 3 as the `Chart.yaml` uses `apiVersion: v2`.
|
||||||
|
* All XML configuration options have been removed.
|
||||||
|
In case those are still in use you need to migrate to configuration as code.
|
||||||
|
Upgrade guide to 2.0.0 contains pointers how to do that.
|
||||||
|
* Jenkins is now using a `StatefulSet` instead of a `Deployment`
|
||||||
|
* terminology has been adjusted that's also reflected in values.yaml
|
||||||
|
The following values from `values.yaml` have been renamed:
|
||||||
|
|
||||||
|
* `master` => `controller`
|
||||||
|
* `master.useSecurity` => `controller.adminSecret`
|
||||||
|
* `master.slaveListenerPort` => `controller.agentListenerPort`
|
||||||
|
* `master.slaveHostPort` => `controller.agentListenerHostPort`
|
||||||
|
* `master.slaveKubernetesNamespace` => `agent.namespace`
|
||||||
|
* `master.slaveDefaultsProviderTemplate` => `agent.defaultsProviderTemplate`
|
||||||
|
* `master.slaveJenkinsUrl` => `agent.jenkinsUrl`
|
||||||
|
* `master.slaveJenkinsTunnel` => `agent.jenkinsTunnel`
|
||||||
|
* `master.slaveConnectTimeout` => `agent.kubernetesConnectTimeout`
|
||||||
|
* `master.slaveReadTimeout` => `agent.kubernetesReadTimeout`
|
||||||
|
* `master.slaveListenerServiceAnnotations` => `controller.agentListenerServiceAnnotations`
|
||||||
|
* `master.slaveListenerServiceType` => `controller.agentListenerServiceType`
|
||||||
|
* `master.slaveListenerLoadBalancerIP` => `controller.agentListenerLoadBalancerIP`
|
||||||
|
* `agent.slaveConnectTimeout` => `agent.connectTimeout`
|
||||||
|
* Removed values:
|
||||||
|
|
||||||
|
* `master.imageTag`: use `controller.image` and `controller.tag` instead
|
||||||
|
* `slave.imageTag`: use `agent.image` and `agent.tag` instead
|
||||||
|
|
||||||
|
## To 2.0.0
|
||||||
|
|
||||||
|
Configuration as Code is now default + container does not run as root anymore.
|
||||||
|
|
||||||
|
### Configuration as Code new default
|
||||||
|
|
||||||
|
Configuration is done via [Jenkins Configuration as Code Plugin](https://github.com/jenkinsci/configuration-as-code-plugin) by default.
|
||||||
|
That means that changes in values which result in a configuration change are always applied.
|
||||||
|
In contrast, the XML configuration was only applied during the first start and never altered.
|
||||||
|
|
||||||
|
:exclamation::exclamation::exclamation:
|
||||||
|
Attention:
|
||||||
|
This also means if you manually altered configuration then this will most likely be reset to what was configured by default.
|
||||||
|
It also applies to `securityRealm` and `authorizationStrategy` as they are also configured using configuration as code.
|
||||||
|
:exclamation::exclamation::exclamation:
|
||||||
|
|
||||||
|
### Image does not run as root anymore
|
||||||
|
|
||||||
|
It's not recommended to run containers in Kubernetes as `root`.
|
||||||
|
|
||||||
|
❗Attention: If you had not configured a different user before then you need to ensure that your image supports the user and group ID configured and also manually change permissions of all files so that Jenkins is still able to use them.
|
||||||
|
|
||||||
|
### Summary of updated values
|
||||||
|
|
||||||
|
As version 2.0.0 only updates default values and nothing else it's still possible to migrate to this version and opt out of some or all new defaults.
|
||||||
|
All you have to do is ensure the old values are set in your installation.
|
||||||
|
|
||||||
|
Here we show which values have changed and the previous default values:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
controller:
|
||||||
|
runAsUser: 1000 # was unset before
|
||||||
|
fsGroup: 1000 # was unset before
|
||||||
|
JCasC:
|
||||||
|
enabled: true # was false
|
||||||
|
defaultConfig: true # was false
|
||||||
|
sidecars:
|
||||||
|
configAutoReload:
|
||||||
|
enabled: true # was false
|
||||||
|
```
|
||||||
|
|
||||||
|
### Migration steps
|
||||||
|
|
||||||
|
Migration instructions heavily depend on your current setup.
|
||||||
|
So think of the list below more as a general guideline of what should be done.
|
||||||
|
|
||||||
|
- Ensure that the Jenkins image you are using contains a user with ID 1000 and a group with the same ID.
|
||||||
|
That's the case for `jenkins/jenkins:lts` image, which the chart uses by default
|
||||||
|
- Make a backup of your existing installation especially the persistent volume
|
||||||
|
- Ensure that you have the configuration as code plugin installed
|
||||||
|
- Export your current settings via the plugin:
|
||||||
|
`Manage Jenkins` -> `Configuration as Code` -> `Download Configuration`
|
||||||
|
- prepare your values file for the update e.g. add additional configuration as code setting that you need.
|
||||||
|
The export taken from above might be a good starting point for this.
|
||||||
|
In addition, the [demos](https://github.com/jenkinsci/configuration-as-code-plugin/tree/master/demos) from the plugin itself are quite useful.
|
||||||
|
- Test drive those setting on a separate installation
|
||||||
|
- Put Jenkins to Quiet Down mode so that it does not accept new jobs
|
||||||
|
`<JENKINS_URL>/quietDown`
|
||||||
|
- Change permissions of all files and folders to the new user and group ID:
|
||||||
|
|
||||||
|
```console
|
||||||
|
kubectl exec -it <jenkins_pod> -c jenkins /bin/bash
|
||||||
|
chown -R 1000:1000 /var/jenkins_home
|
||||||
|
```
|
||||||
|
|
||||||
|
- Update Jenkins
|
||||||
|
|
||||||
|
## To 1.0.0
|
||||||
|
|
||||||
|
Breaking changes:
|
||||||
|
|
||||||
|
- Values have been renamed to follow [helm recommended naming conventions](https://helm.sh/docs/chart_best_practices/#naming-conventions) so that all variables start with a lowercase letter and words are separated with camelcase
|
||||||
|
- All resources are now using [helm recommended standard labels](https://helm.sh/docs/chart_best_practices/#standard-labels)
|
||||||
|
|
||||||
|
As a result of the label changes also the selectors of the deployment have been updated.
|
||||||
|
Those are immutable so trying an updated will cause an error like:
|
||||||
|
|
||||||
|
```console
|
||||||
|
Error: Deployment.apps "jenkins" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app.kubernetes.io/component":"jenkins-controller", "app.kubernetes.io/instance":"jenkins"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable
|
||||||
|
```
|
||||||
|
|
||||||
|
In order to upgrade, [uninstall](./README.md#uninstall-chart) the Jenkins Deployment before upgrading:
|
|
@ -0,0 +1,311 @@
|
||||||
|
# Jenkins
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
The following tables list the configurable parameters of the Jenkins chart and their default values.
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Key | Type | Description | Default |
|
||||||
|
|:----|:-----|:---------|:------------|
|
||||||
|
| [additionalAgents](./values.yaml#L1169) | object | Configure additional | `{}` |
|
||||||
|
| [additionalClouds](./values.yaml#L1194) | object | | `{}` |
|
||||||
|
| [agent.TTYEnabled](./values.yaml#L1087) | bool | Allocate pseudo tty to the side container | `false` |
|
||||||
|
| [agent.additionalContainers](./values.yaml#L1122) | list | Add additional containers to the agents | `[]` |
|
||||||
|
| [agent.alwaysPullImage](./values.yaml#L980) | bool | Always pull agent container image before build | `false` |
|
||||||
|
| [agent.annotations](./values.yaml#L1118) | object | Annotations to apply to the pod | `{}` |
|
||||||
|
| [agent.args](./values.yaml#L1081) | string | Arguments passed to command to execute | `"${computer.jnlpmac} ${computer.name}"` |
|
||||||
|
| [agent.command](./values.yaml#L1079) | string | Command to execute when side container starts | `nil` |
|
||||||
|
| [agent.componentName](./values.yaml#L948) | string | | `"jenkins-agent"` |
|
||||||
|
| [agent.connectTimeout](./values.yaml#L1116) | int | Timeout in seconds for an agent to be online | `100` |
|
||||||
|
| [agent.containerCap](./values.yaml#L1089) | int | Max number of agents to launch | `10` |
|
||||||
|
| [agent.customJenkinsLabels](./values.yaml#L945) | list | Append Jenkins labels to the agent | `[]` |
|
||||||
|
| [agent.defaultsProviderTemplate](./values.yaml#L907) | string | The name of the pod template to use for providing default values | `""` |
|
||||||
|
| [agent.directConnection](./values.yaml#L951) | bool | | `false` |
|
||||||
|
| [agent.disableDefaultAgent](./values.yaml#L1140) | bool | Disable the default Jenkins Agent configuration | `false` |
|
||||||
|
| [agent.enabled](./values.yaml#L905) | bool | Enable Kubernetes plugin jnlp-agent podTemplate | `true` |
|
||||||
|
| [agent.envVars](./values.yaml#L1062) | list | Environment variables for the agent Pod | `[]` |
|
||||||
|
| [agent.hostNetworking](./values.yaml#L959) | bool | Enables the agent to use the host network | `false` |
|
||||||
|
| [agent.idleMinutes](./values.yaml#L1094) | int | Allows the Pod to remain active for reuse until the configured number of minutes has passed since the last step was executed on it | `0` |
|
||||||
|
| [agent.image.repository](./values.yaml#L938) | string | Repository to pull the agent jnlp image from | `"jenkins/inbound-agent"` |
|
||||||
|
| [agent.image.tag](./values.yaml#L940) | string | Tag of the image to pull | `"3256.v88a_f6e922152-1"` |
|
||||||
|
| [agent.imagePullSecretName](./values.yaml#L947) | string | Name of the secret to be used to pull the image | `nil` |
|
||||||
|
| [agent.inheritYamlMergeStrategy](./values.yaml#L1114) | bool | Controls whether the defined yaml merge strategy will be inherited if another defined pod template is configured to inherit from the current one | `false` |
|
||||||
|
| [agent.jenkinsTunnel](./values.yaml#L915) | string | Overrides the Kubernetes Jenkins tunnel | `nil` |
|
||||||
|
| [agent.jenkinsUrl](./values.yaml#L911) | string | Overrides the Kubernetes Jenkins URL | `nil` |
|
||||||
|
| [agent.jnlpregistry](./values.yaml#L935) | string | Custom registry used to pull the agent jnlp image from | `nil` |
|
||||||
|
| [agent.kubernetesConnectTimeout](./values.yaml#L921) | int | The connection timeout in seconds for connections to Kubernetes API. The minimum value is 5 | `5` |
|
||||||
|
| [agent.kubernetesReadTimeout](./values.yaml#L923) | int | The read timeout in seconds for connections to Kubernetes API. The minimum value is 15 | `15` |
|
||||||
|
| [agent.livenessProbe](./values.yaml#L970) | object | | `{}` |
|
||||||
|
| [agent.maxRequestsPerHostStr](./values.yaml#L925) | string | The maximum concurrent connections to Kubernetes API | `"32"` |
|
||||||
|
| [agent.namespace](./values.yaml#L931) | string | Namespace in which the Kubernetes agents should be launched | `nil` |
|
||||||
|
| [agent.nodeSelector](./values.yaml#L1073) | object | Node labels for pod assignment | `{}` |
|
||||||
|
| [agent.nodeUsageMode](./values.yaml#L943) | string | | `"NORMAL"` |
|
||||||
|
| [agent.podLabels](./values.yaml#L933) | object | Custom Pod labels (an object with `label-key: label-value` pairs) | `{}` |
|
||||||
|
| [agent.podName](./values.yaml#L1091) | string | Agent Pod base name | `"default"` |
|
||||||
|
| [agent.podRetention](./values.yaml#L989) | string | | `"Never"` |
|
||||||
|
| [agent.podTemplates](./values.yaml#L1150) | object | Configures extra pod templates for the default kubernetes cloud | `{}` |
|
||||||
|
| [agent.privileged](./values.yaml#L953) | bool | Agent privileged container | `false` |
|
||||||
|
| [agent.resources](./values.yaml#L961) | object | Resources allocation (Requests and Limits) | `{"limits":{"cpu":"512m","memory":"512Mi"},"requests":{"cpu":"512m","memory":"512Mi"}}` |
|
||||||
|
| [agent.restrictedPssSecurityContext](./values.yaml#L986) | bool | Set a restricted securityContext on jnlp containers | `false` |
|
||||||
|
| [agent.retentionTimeout](./values.yaml#L927) | int | Time in minutes after which the Kubernetes cloud plugin will clean up an idle worker that has not already terminated | `5` |
|
||||||
|
| [agent.runAsGroup](./values.yaml#L957) | string | Configure container group | `nil` |
|
||||||
|
| [agent.runAsUser](./values.yaml#L955) | string | Configure container user | `nil` |
|
||||||
|
| [agent.secretEnvVars](./values.yaml#L1066) | list | Mount a secret as environment variable | `[]` |
|
||||||
|
| [agent.showRawYaml](./values.yaml#L993) | bool | | `true` |
|
||||||
|
| [agent.sideContainerName](./values.yaml#L1083) | string | Side container name | `"jnlp"` |
|
||||||
|
| [agent.skipTlsVerify](./values.yaml#L917) | bool | Disables the verification of the controller certificate on remote connection. This flag correspond to the "Disable https certificate check" flag in kubernetes plugin UI | `false` |
|
||||||
|
| [agent.usageRestricted](./values.yaml#L919) | bool | Enable the possibility to restrict the usage of this agent to specific folder. This flag correspond to the "Restrict pipeline support to authorized folders" flag in kubernetes plugin UI | `false` |
|
||||||
|
| [agent.volumes](./values.yaml#L1000) | list | Additional volumes | `[]` |
|
||||||
|
| [agent.waitForPodSec](./values.yaml#L929) | int | Seconds to wait for pod to be running | `600` |
|
||||||
|
| [agent.websocket](./values.yaml#L950) | bool | Enables agent communication via websockets | `false` |
|
||||||
|
| [agent.workingDir](./values.yaml#L942) | string | Configure working directory for default agent | `"/home/jenkins/agent"` |
|
||||||
|
| [agent.workspaceVolume](./values.yaml#L1035) | object | Workspace volume (defaults to EmptyDir) | `{}` |
|
||||||
|
| [agent.yamlMergeStrategy](./values.yaml#L1112) | string | Defines how the raw yaml field gets merged with yaml definitions from inherited pod templates. Possible values: "merge" or "override" | `"override"` |
|
||||||
|
| [agent.yamlTemplate](./values.yaml#L1101) | string | The raw yaml of a Pod API Object to merge into the agent spec | `""` |
|
||||||
|
| [awsSecurityGroupPolicies.enabled](./values.yaml#L1320) | bool | | `false` |
|
||||||
|
| [awsSecurityGroupPolicies.policies[0].name](./values.yaml#L1322) | string | | `""` |
|
||||||
|
| [awsSecurityGroupPolicies.policies[0].podSelector](./values.yaml#L1324) | object | | `{}` |
|
||||||
|
| [awsSecurityGroupPolicies.policies[0].securityGroupIds](./values.yaml#L1323) | list | | `[]` |
|
||||||
|
| [checkDeprecation](./values.yaml#L1317) | bool | Checks if any deprecated values are used | `true` |
|
||||||
|
| [clusterZone](./values.yaml#L21) | string | Override the cluster name for FQDN resolving | `"cluster.local"` |
|
||||||
|
| [controller.JCasC.authorizationStrategy](./values.yaml#L533) | string | Jenkins Config as Code Authorization Strategy-section | `"loggedInUsersCanDoAnything:\n allowAnonymousRead: false"` |
|
||||||
|
| [controller.JCasC.configMapAnnotations](./values.yaml#L538) | object | Annotations for the JCasC ConfigMap | `{}` |
|
||||||
|
| [controller.JCasC.configScripts](./values.yaml#L507) | object | List of Jenkins Config as Code scripts | `{}` |
|
||||||
|
| [controller.JCasC.configUrls](./values.yaml#L504) | list | Remote URLs for configuration files. | `[]` |
|
||||||
|
| [controller.JCasC.defaultConfig](./values.yaml#L498) | bool | Enables default Jenkins configuration via configuration as code plugin | `true` |
|
||||||
|
| [controller.JCasC.overwriteConfiguration](./values.yaml#L502) | bool | Whether Jenkins Config as Code should overwrite any existing configuration | `false` |
|
||||||
|
| [controller.JCasC.security](./values.yaml#L514) | object | Jenkins Config as Code security-section | `{"apiToken":{"creationOfLegacyTokenEnabled":false,"tokenGenerationOnCreationEnabled":false,"usageStatisticsEnabled":true}}` |
|
||||||
|
| [controller.JCasC.securityRealm](./values.yaml#L522) | string | Jenkins Config as Code Security Realm-section | `"local:\n allowsSignup: false\n enableCaptcha: false\n users:\n - id: \"${chart-admin-username}\"\n name: \"Jenkins Admin\"\n password: \"${chart-admin-password}\""` |
|
||||||
|
| [controller.additionalExistingSecrets](./values.yaml#L459) | list | List of additional existing secrets to mount | `[]` |
|
||||||
|
| [controller.additionalPlugins](./values.yaml#L409) | list | List of plugins to install in addition to those listed in controller.installPlugins | `[]` |
|
||||||
|
| [controller.additionalSecrets](./values.yaml#L468) | list | List of additional secrets to create and mount | `[]` |
|
||||||
|
| [controller.admin.createSecret](./values.yaml#L91) | bool | Create secret for admin user | `true` |
|
||||||
|
| [controller.admin.existingSecret](./values.yaml#L94) | string | The name of an existing secret containing the admin credentials | `""` |
|
||||||
|
| [controller.admin.password](./values.yaml#L81) | string | Admin password created as a secret if `controller.admin.createSecret` is true | `<random password>` |
|
||||||
|
| [controller.admin.passwordKey](./values.yaml#L86) | string | The key in the existing admin secret containing the password | `"jenkins-admin-password"` |
|
||||||
|
| [controller.admin.userKey](./values.yaml#L84) | string | The key in the existing admin secret containing the username | `"jenkins-admin-user"` |
|
||||||
|
| [controller.admin.username](./values.yaml#L78) | string | Admin username created as a secret if `controller.admin.createSecret` is true | `"admin"` |
|
||||||
|
| [controller.affinity](./values.yaml#L660) | object | Affinity settings | `{}` |
|
||||||
|
| [controller.agentListenerEnabled](./values.yaml#L318) | bool | Create Agent listener service | `true` |
|
||||||
|
| [controller.agentListenerExternalTrafficPolicy](./values.yaml#L328) | string | Traffic Policy of for the agentListener service | `nil` |
|
||||||
|
| [controller.agentListenerHostPort](./values.yaml#L322) | string | Host port to listen for agents | `nil` |
|
||||||
|
| [controller.agentListenerLoadBalancerIP](./values.yaml#L358) | string | Static IP for the agentListener LoadBalancer | `nil` |
|
||||||
|
| [controller.agentListenerLoadBalancerSourceRanges](./values.yaml#L330) | list | Allowed inbound IP for the agentListener service | `["0.0.0.0/0"]` |
|
||||||
|
| [controller.agentListenerNodePort](./values.yaml#L324) | string | Node port to listen for agents | `nil` |
|
||||||
|
| [controller.agentListenerPort](./values.yaml#L320) | int | Listening port for agents | `50000` |
|
||||||
|
| [controller.agentListenerServiceAnnotations](./values.yaml#L353) | object | Annotations for the agentListener service | `{}` |
|
||||||
|
| [controller.agentListenerServiceType](./values.yaml#L350) | string | Defines how to expose the agentListener service | `"ClusterIP"` |
|
||||||
|
| [controller.backendconfig.annotations](./values.yaml#L763) | object | backendconfig annotations | `{}` |
|
||||||
|
| [controller.backendconfig.apiVersion](./values.yaml#L757) | string | backendconfig API version | `"extensions/v1beta1"` |
|
||||||
|
| [controller.backendconfig.enabled](./values.yaml#L755) | bool | Enables backendconfig | `false` |
|
||||||
|
| [controller.backendconfig.labels](./values.yaml#L761) | object | backendconfig labels | `{}` |
|
||||||
|
| [controller.backendconfig.name](./values.yaml#L759) | string | backendconfig name | `nil` |
|
||||||
|
| [controller.backendconfig.spec](./values.yaml#L765) | object | backendconfig spec | `{}` |
|
||||||
|
| [controller.cloudName](./values.yaml#L487) | string | Name of default cloud configuration. | `"kubernetes"` |
|
||||||
|
| [controller.clusterIp](./values.yaml#L217) | string | k8s service clusterIP. Only used if serviceType is ClusterIP | `nil` |
|
||||||
|
| [controller.componentName](./values.yaml#L34) | string | Used for label app.kubernetes.io/component | `"jenkins-controller"` |
|
||||||
|
| [controller.containerEnv](./values.yaml#L150) | list | Environment variables for Jenkins Container | `[]` |
|
||||||
|
| [controller.containerEnvFrom](./values.yaml#L147) | list | Environment variable sources for Jenkins Container | `[]` |
|
||||||
|
| [controller.containerSecurityContext](./values.yaml#L205) | object | Allow controlling the securityContext for the jenkins container | `{"allowPrivilegeEscalation":false,"readOnlyRootFilesystem":true,"runAsGroup":1000,"runAsUser":1000}` |
|
||||||
|
| [controller.csrf.defaultCrumbIssuer.enabled](./values.yaml#L339) | bool | Enable the default CSRF Crumb issuer | `true` |
|
||||||
|
| [controller.csrf.defaultCrumbIssuer.proxyCompatability](./values.yaml#L341) | bool | Enable proxy compatibility | `true` |
|
||||||
|
| [controller.customInitContainers](./values.yaml#L541) | list | Custom init-container specification in raw-yaml format | `[]` |
|
||||||
|
| [controller.customJenkinsLabels](./values.yaml#L68) | list | Append Jenkins labels to the controller | `[]` |
|
||||||
|
| [controller.disableRememberMe](./values.yaml#L59) | bool | Disable use of remember me | `false` |
|
||||||
|
| [controller.disabledAgentProtocols](./values.yaml#L333) | list | Disabled agent protocols | `["JNLP-connect","JNLP2-connect"]` |
|
||||||
|
| [controller.enableRawHtmlMarkupFormatter](./values.yaml#L429) | bool | Enable HTML parsing using OWASP Markup Formatter Plugin (antisamy-markup-formatter) | `false` |
|
||||||
|
| [controller.executorMode](./values.yaml#L65) | string | Sets the executor mode of the Jenkins node. Possible values are "NORMAL" or "EXCLUSIVE" | `"NORMAL"` |
|
||||||
|
| [controller.existingSecret](./values.yaml#L456) | string | | `nil` |
|
||||||
|
| [controller.extraPorts](./values.yaml#L388) | list | Optionally configure other ports to expose in the controller container | `[]` |
|
||||||
|
| [controller.fsGroup](./values.yaml#L186) | int | Deprecated in favor of `controller.podSecurityContextOverride`. uid that will be used for persistent volume. | `1000` |
|
||||||
|
| [controller.googlePodMonitor.enabled](./values.yaml#L826) | bool | | `false` |
|
||||||
|
| [controller.googlePodMonitor.scrapeEndpoint](./values.yaml#L831) | string | | `"/prometheus"` |
|
||||||
|
| [controller.googlePodMonitor.scrapeInterval](./values.yaml#L829) | string | | `"60s"` |
|
||||||
|
| [controller.healthProbes](./values.yaml#L248) | bool | Enable Kubernetes Probes configuration configured in `controller.probes` | `true` |
|
||||||
|
| [controller.hostAliases](./values.yaml#L779) | list | Allows for adding entries to Pod /etc/hosts | `[]` |
|
||||||
|
| [controller.hostNetworking](./values.yaml#L70) | bool | | `false` |
|
||||||
|
| [controller.httpsKeyStore.disableSecretMount](./values.yaml#L847) | bool | | `false` |
|
||||||
|
| [controller.httpsKeyStore.enable](./values.yaml#L838) | bool | Enables HTTPS keystore on jenkins controller | `false` |
|
||||||
|
| [controller.httpsKeyStore.fileName](./values.yaml#L855) | string | Jenkins keystore filename which will appear under controller.httpsKeyStore.path | `"keystore.jks"` |
|
||||||
|
| [controller.httpsKeyStore.httpPort](./values.yaml#L851) | int | HTTP Port that Jenkins should listen to along with HTTPS, it also serves as the liveness and readiness probes port. | `8081` |
|
||||||
|
| [controller.httpsKeyStore.jenkinsHttpsJksPasswordSecretKey](./values.yaml#L846) | string | Name of the key in the secret that contains the JKS password | `"https-jks-password"` |
|
||||||
|
| [controller.httpsKeyStore.jenkinsHttpsJksPasswordSecretName](./values.yaml#L844) | string | Name of the secret that contains the JKS password, if it is not in the same secret as the JKS file | `""` |
|
||||||
|
| [controller.httpsKeyStore.jenkinsHttpsJksSecretKey](./values.yaml#L842) | string | Name of the key in the secret that already has ssl keystore | `"jenkins-jks-file"` |
|
||||||
|
| [controller.httpsKeyStore.jenkinsHttpsJksSecretName](./values.yaml#L840) | string | Name of the secret that already has ssl keystore | `""` |
|
||||||
|
| [controller.httpsKeyStore.jenkinsKeyStoreBase64Encoded](./values.yaml#L860) | string | Base64 encoded Keystore content. Keystore must be converted to base64 then being pasted here | `nil` |
|
||||||
|
| [controller.httpsKeyStore.password](./values.yaml#L857) | string | Jenkins keystore password | `"password"` |
|
||||||
|
| [controller.httpsKeyStore.path](./values.yaml#L853) | string | Path of HTTPS keystore file | `"/var/jenkins_keystore"` |
|
||||||
|
| [controller.image.pullPolicy](./values.yaml#L47) | string | Controller image pull policy | `"Always"` |
|
||||||
|
| [controller.image.registry](./values.yaml#L37) | string | Controller image registry | `"docker.io"` |
|
||||||
|
| [controller.image.repository](./values.yaml#L39) | string | Controller image repository | `"jenkins/jenkins"` |
|
||||||
|
| [controller.image.tag](./values.yaml#L42) | string | Controller image tag override; i.e., tag: "2.440.1-jdk17" | `nil` |
|
||||||
|
| [controller.image.tagLabel](./values.yaml#L45) | string | Controller image tag label | `"jdk17"` |
|
||||||
|
| [controller.imagePullSecretName](./values.yaml#L49) | string | Controller image pull secret | `nil` |
|
||||||
|
| [controller.ingress.annotations](./values.yaml#L702) | object | Ingress annotations | `{}` |
|
||||||
|
| [controller.ingress.apiVersion](./values.yaml#L698) | string | Ingress API version | `"extensions/v1beta1"` |
|
||||||
|
| [controller.ingress.enabled](./values.yaml#L681) | bool | Enables ingress | `false` |
|
||||||
|
| [controller.ingress.hostName](./values.yaml#L715) | string | Ingress hostname | `nil` |
|
||||||
|
| [controller.ingress.labels](./values.yaml#L700) | object | Ingress labels | `{}` |
|
||||||
|
| [controller.ingress.path](./values.yaml#L711) | string | Ingress path | `nil` |
|
||||||
|
| [controller.ingress.paths](./values.yaml#L685) | list | Override for the default Ingress paths | `[]` |
|
||||||
|
| [controller.ingress.resourceRootUrl](./values.yaml#L717) | string | Hostname to serve assets from | `nil` |
|
||||||
|
| [controller.ingress.tls](./values.yaml#L719) | list | Ingress TLS configuration | `[]` |
|
||||||
|
| [controller.initConfigMap](./values.yaml#L446) | string | Name of the existing ConfigMap that contains init scripts | `nil` |
|
||||||
|
| [controller.initContainerEnv](./values.yaml#L141) | list | Environment variables for Init Container | `[]` |
|
||||||
|
| [controller.initContainerEnvFrom](./values.yaml#L137) | list | Environment variable sources for Init Container | `[]` |
|
||||||
|
| [controller.initContainerResources](./values.yaml#L128) | object | Resources allocation (Requests and Limits) for Init Container | `{}` |
|
||||||
|
| [controller.initScripts](./values.yaml#L442) | object | Map of groovy init scripts to be executed during Jenkins controller start | `{}` |
|
||||||
|
| [controller.initializeOnce](./values.yaml#L414) | bool | Initialize only on first installation. Ensures plugins do not get updated inadvertently. Requires `persistence.enabled` to be set to `true` | `false` |
|
||||||
|
| [controller.installLatestPlugins](./values.yaml#L403) | bool | Download the minimum required version or latest version of all dependencies | `true` |
|
||||||
|
| [controller.installLatestSpecifiedPlugins](./values.yaml#L406) | bool | Set to true to download the latest version of any plugin that is requested to have the latest version | `false` |
|
||||||
|
| [controller.installPlugins](./values.yaml#L395) | list | List of Jenkins plugins to install. If you don't want to install plugins, set it to `false` | `["kubernetes:4280.vd919fa_528c7e","workflow-aggregator:600.vb_57cdd26fdd7","git:5.3.0","configuration-as-code:1836.vccda_4a_122a_a_e"]` |
|
||||||
|
| [controller.javaOpts](./values.yaml#L156) | string | Append to `JAVA_OPTS` env var | `nil` |
|
||||||
|
| [controller.jenkinsAdminEmail](./values.yaml#L96) | string | Email address for the administrator of the Jenkins instance | `nil` |
|
||||||
|
| [controller.jenkinsHome](./values.yaml#L101) | string | Custom Jenkins home path | `"/var/jenkins_home"` |
|
||||||
|
| [controller.jenkinsOpts](./values.yaml#L158) | string | Append to `JENKINS_OPTS` env var | `nil` |
|
||||||
|
| [controller.jenkinsRef](./values.yaml#L106) | string | Custom Jenkins reference path | `"/usr/share/jenkins/ref"` |
|
||||||
|
| [controller.jenkinsUriPrefix](./values.yaml#L173) | string | Root URI Jenkins will be served on | `nil` |
|
||||||
|
| [controller.jenkinsUrl](./values.yaml#L168) | string | Set Jenkins URL if you are not using the ingress definitions provided by the chart | `nil` |
|
||||||
|
| [controller.jenkinsUrlProtocol](./values.yaml#L165) | string | Set protocol for Jenkins URL; `https` if `controller.ingress.tls`, `http` otherwise | `nil` |
|
||||||
|
| [controller.jenkinsWar](./values.yaml#L109) | string | | `"/usr/share/jenkins/jenkins.war"` |
|
||||||
|
| [controller.jmxPort](./values.yaml#L385) | string | Open a port, for JMX stats | `nil` |
|
||||||
|
| [controller.legacyRemotingSecurityEnabled](./values.yaml#L361) | bool | Whether legacy remoting security should be enabled | `false` |
|
||||||
|
| [controller.lifecycle](./values.yaml#L51) | object | Lifecycle specification for controller-container | `{}` |
|
||||||
|
| [controller.loadBalancerIP](./values.yaml#L376) | string | Optionally assign a known public LB IP | `nil` |
|
||||||
|
| [controller.loadBalancerSourceRanges](./values.yaml#L372) | list | Allowed inbound IP addresses | `["0.0.0.0/0"]` |
|
||||||
|
| [controller.markupFormatter](./values.yaml#L433) | string | Yaml of the markup formatter to use | `"plainText"` |
|
||||||
|
| [controller.nodePort](./values.yaml#L223) | string | k8s node port. Only used if serviceType is NodePort | `nil` |
|
||||||
|
| [controller.nodeSelector](./values.yaml#L647) | object | Node labels for pod assignment | `{}` |
|
||||||
|
| [controller.numExecutors](./values.yaml#L62) | int | Set Number of executors | `0` |
|
||||||
|
| [controller.overwritePlugins](./values.yaml#L418) | bool | Overwrite installed plugins on start | `false` |
|
||||||
|
| [controller.overwritePluginsFromImage](./values.yaml#L422) | bool | Overwrite plugins that are already installed in the controller image | `true` |
|
||||||
|
| [controller.podAnnotations](./values.yaml#L668) | object | Annotations for controller pod | `{}` |
|
||||||
|
| [controller.podDisruptionBudget.annotations](./values.yaml#L312) | object | | `{}` |
|
||||||
|
| [controller.podDisruptionBudget.apiVersion](./values.yaml#L310) | string | Policy API version | `"policy/v1beta1"` |
|
||||||
|
| [controller.podDisruptionBudget.enabled](./values.yaml#L305) | bool | Enable Kubernetes Pod Disruption Budget configuration | `false` |
|
||||||
|
| [controller.podDisruptionBudget.labels](./values.yaml#L313) | object | | `{}` |
|
||||||
|
| [controller.podDisruptionBudget.maxUnavailable](./values.yaml#L315) | string | Number of pods that can be unavailable. Either an absolute number or a percentage | `"0"` |
|
||||||
|
| [controller.podLabels](./values.yaml#L241) | object | Custom Pod labels (an object with `label-key: label-value` pairs) | `{}` |
|
||||||
|
| [controller.podSecurityContextOverride](./values.yaml#L202) | string | Completely overwrites the contents of the pod security context, ignoring the values provided for `runAsUser`, `fsGroup`, and `securityContextCapabilities` | `nil` |
|
||||||
|
| [controller.priorityClassName](./values.yaml#L665) | string | The name of a `priorityClass` to apply to the controller pod | `nil` |
|
||||||
|
| [controller.probes.livenessProbe.failureThreshold](./values.yaml#L266) | int | Set the failure threshold for the liveness probe | `5` |
|
||||||
|
| [controller.probes.livenessProbe.httpGet.path](./values.yaml#L269) | string | Set the Pod's HTTP path for the liveness probe | `"{{ default \"\" .Values.controller.jenkinsUriPrefix }}/login"` |
|
||||||
|
| [controller.probes.livenessProbe.httpGet.port](./values.yaml#L271) | string | Set the Pod's HTTP port to use for the liveness probe | `"http"` |
|
||||||
|
| [controller.probes.livenessProbe.initialDelaySeconds](./values.yaml#L280) | string | Set the initial delay for the liveness probe in seconds | `nil` |
|
||||||
|
| [controller.probes.livenessProbe.periodSeconds](./values.yaml#L273) | int | Set the time interval between two liveness probes executions in seconds | `10` |
|
||||||
|
| [controller.probes.livenessProbe.timeoutSeconds](./values.yaml#L275) | int | Set the timeout for the liveness probe in seconds | `5` |
|
||||||
|
| [controller.probes.readinessProbe.failureThreshold](./values.yaml#L284) | int | Set the failure threshold for the readiness probe | `3` |
|
||||||
|
| [controller.probes.readinessProbe.httpGet.path](./values.yaml#L287) | string | Set the Pod's HTTP path for the liveness probe | `"{{ default \"\" .Values.controller.jenkinsUriPrefix }}/login"` |
|
||||||
|
| [controller.probes.readinessProbe.httpGet.port](./values.yaml#L289) | string | Set the Pod's HTTP port to use for the readiness probe | `"http"` |
|
||||||
|
| [controller.probes.readinessProbe.initialDelaySeconds](./values.yaml#L298) | string | Set the initial delay for the readiness probe in seconds | `nil` |
|
||||||
|
| [controller.probes.readinessProbe.periodSeconds](./values.yaml#L291) | int | Set the time interval between two readiness probes executions in seconds | `10` |
|
||||||
|
| [controller.probes.readinessProbe.timeoutSeconds](./values.yaml#L293) | int | Set the timeout for the readiness probe in seconds | `5` |
|
||||||
|
| [controller.probes.startupProbe.failureThreshold](./values.yaml#L253) | int | Set the failure threshold for the startup probe | `12` |
|
||||||
|
| [controller.probes.startupProbe.httpGet.path](./values.yaml#L256) | string | Set the Pod's HTTP path for the startup probe | `"{{ default \"\" .Values.controller.jenkinsUriPrefix }}/login"` |
|
||||||
|
| [controller.probes.startupProbe.httpGet.port](./values.yaml#L258) | string | Set the Pod's HTTP port to use for the startup probe | `"http"` |
|
||||||
|
| [controller.probes.startupProbe.periodSeconds](./values.yaml#L260) | int | Set the time interval between two startup probes executions in seconds | `10` |
|
||||||
|
| [controller.probes.startupProbe.timeoutSeconds](./values.yaml#L262) | int | Set the timeout for the startup probe in seconds | `5` |
|
||||||
|
| [controller.projectNamingStrategy](./values.yaml#L425) | string | | `"standard"` |
|
||||||
|
| [controller.prometheus.alertingRulesAdditionalLabels](./values.yaml#L812) | object | Additional labels to add to the PrometheusRule object | `{}` |
|
||||||
|
| [controller.prometheus.alertingrules](./values.yaml#L810) | list | Array of prometheus alerting rules | `[]` |
|
||||||
|
| [controller.prometheus.enabled](./values.yaml#L795) | bool | Enables prometheus service monitor | `false` |
|
||||||
|
| [controller.prometheus.metricRelabelings](./values.yaml#L822) | list | | `[]` |
|
||||||
|
| [controller.prometheus.prometheusRuleNamespace](./values.yaml#L814) | string | Set a custom namespace where to deploy PrometheusRule resource | `""` |
|
||||||
|
| [controller.prometheus.relabelings](./values.yaml#L820) | list | | `[]` |
|
||||||
|
| [controller.prometheus.scrapeEndpoint](./values.yaml#L805) | string | The endpoint prometheus should get metrics from | `"/prometheus"` |
|
||||||
|
| [controller.prometheus.scrapeInterval](./values.yaml#L801) | string | How often prometheus should scrape metrics | `"60s"` |
|
||||||
|
| [controller.prometheus.serviceMonitorAdditionalLabels](./values.yaml#L797) | object | Additional labels to add to the service monitor object | `{}` |
|
||||||
|
| [controller.prometheus.serviceMonitorNamespace](./values.yaml#L799) | string | Set a custom namespace where to deploy ServiceMonitor resource | `nil` |
|
||||||
|
| [controller.resources](./values.yaml#L115) | object | Resource allocation (Requests and Limits) | `{"limits":{"cpu":"2000m","memory":"4096Mi"},"requests":{"cpu":"50m","memory":"256Mi"}}` |
|
||||||
|
| [controller.route.annotations](./values.yaml#L774) | object | Route annotations | `{}` |
|
||||||
|
| [controller.route.enabled](./values.yaml#L770) | bool | Enables openshift route | `false` |
|
||||||
|
| [controller.route.labels](./values.yaml#L772) | object | Route labels | `{}` |
|
||||||
|
| [controller.route.path](./values.yaml#L776) | string | Route path | `nil` |
|
||||||
|
| [controller.runAsUser](./values.yaml#L183) | int | Deprecated in favor of `controller.podSecurityContextOverride`. uid that jenkins runs with. | `1000` |
|
||||||
|
| [controller.schedulerName](./values.yaml#L643) | string | Name of the Kubernetes scheduler to use | `""` |
|
||||||
|
| [controller.scriptApproval](./values.yaml#L437) | list | List of groovy functions to approve | `[]` |
|
||||||
|
| [controller.secondaryingress.annotations](./values.yaml#L737) | object | | `{}` |
|
||||||
|
| [controller.secondaryingress.apiVersion](./values.yaml#L735) | string | | `"extensions/v1beta1"` |
|
||||||
|
| [controller.secondaryingress.enabled](./values.yaml#L729) | bool | | `false` |
|
||||||
|
| [controller.secondaryingress.hostName](./values.yaml#L744) | string | | `nil` |
|
||||||
|
| [controller.secondaryingress.labels](./values.yaml#L736) | object | | `{}` |
|
||||||
|
| [controller.secondaryingress.paths](./values.yaml#L732) | list | | `[]` |
|
||||||
|
| [controller.secondaryingress.tls](./values.yaml#L745) | string | | `nil` |
|
||||||
|
| [controller.secretClaims](./values.yaml#L480) | list | List of `SecretClaim` resources to create | `[]` |
|
||||||
|
| [controller.securityContextCapabilities](./values.yaml#L192) | object | | `{}` |
|
||||||
|
| [controller.serviceAnnotations](./values.yaml#L230) | object | Jenkins controller service annotations | `{}` |
|
||||||
|
| [controller.serviceExternalTrafficPolicy](./values.yaml#L227) | string | | `nil` |
|
||||||
|
| [controller.serviceLabels](./values.yaml#L236) | object | Labels for the Jenkins controller-service | `{}` |
|
||||||
|
| [controller.servicePort](./values.yaml#L219) | int | k8s service port | `8080` |
|
||||||
|
| [controller.serviceType](./values.yaml#L214) | string | k8s service type | `"ClusterIP"` |
|
||||||
|
| [controller.shareProcessNamespace](./values.yaml#L124) | bool | | `false` |
|
||||||
|
| [controller.sidecars.additionalSidecarContainers](./values.yaml#L625) | list | Configures additional sidecar container(s) for the Jenkins controller | `[]` |
|
||||||
|
| [controller.sidecars.configAutoReload.additionalVolumeMounts](./values.yaml#L571) | list | Enables additional volume mounts for the config auto-reload container | `[]` |
|
||||||
|
| [controller.sidecars.configAutoReload.containerSecurityContext](./values.yaml#L620) | object | Enable container security context | `{"allowPrivilegeEscalation":false,"readOnlyRootFilesystem":true}` |
|
||||||
|
| [controller.sidecars.configAutoReload.enabled](./values.yaml#L554) | bool | Enables Jenkins Config as Code auto-reload | `true` |
|
||||||
|
| [controller.sidecars.configAutoReload.env](./values.yaml#L602) | object | Environment variables for the Jenkins Config as Code auto-reload container | `{}` |
|
||||||
|
| [controller.sidecars.configAutoReload.envFrom](./values.yaml#L600) | list | Environment variable sources for the Jenkins Config as Code auto-reload container | `[]` |
|
||||||
|
| [controller.sidecars.configAutoReload.folder](./values.yaml#L613) | string | | `"/var/jenkins_home/casc_configs"` |
|
||||||
|
| [controller.sidecars.configAutoReload.image.registry](./values.yaml#L557) | string | Registry for the image that triggers the reload | `"docker.io"` |
|
||||||
|
| [controller.sidecars.configAutoReload.image.repository](./values.yaml#L559) | string | Repository of the image that triggers the reload | `"kiwigrid/k8s-sidecar"` |
|
||||||
|
| [controller.sidecars.configAutoReload.image.tag](./values.yaml#L561) | string | Tag for the image that triggers the reload | `"1.27.5"` |
|
||||||
|
| [controller.sidecars.configAutoReload.imagePullPolicy](./values.yaml#L562) | string | | `"IfNotPresent"` |
|
||||||
|
| [controller.sidecars.configAutoReload.logging](./values.yaml#L577) | object | Config auto-reload logging settings | `{"configuration":{"backupCount":3,"formatter":"JSON","logLevel":"INFO","logToConsole":true,"logToFile":false,"maxBytes":1024,"override":false}}` |
|
||||||
|
| [controller.sidecars.configAutoReload.logging.configuration.override](./values.yaml#L581) | bool | Enables custom log config utilizing using the settings below. | `false` |
|
||||||
|
| [controller.sidecars.configAutoReload.reqRetryConnect](./values.yaml#L595) | int | How many connection-related errors to retry on | `10` |
|
||||||
|
| [controller.sidecars.configAutoReload.resources](./values.yaml#L563) | object | | `{}` |
|
||||||
|
| [controller.sidecars.configAutoReload.scheme](./values.yaml#L590) | string | The scheme to use when connecting to the Jenkins configuration as code endpoint | `"http"` |
|
||||||
|
| [controller.sidecars.configAutoReload.skipTlsVerify](./values.yaml#L592) | bool | Skip TLS verification when connecting to the Jenkins configuration as code endpoint | `false` |
|
||||||
|
| [controller.sidecars.configAutoReload.sleepTime](./values.yaml#L597) | string | How many seconds to wait before updating config-maps/secrets (sets METHOD=SLEEP on the sidecar) | `nil` |
|
||||||
|
| [controller.sidecars.configAutoReload.sshTcpPort](./values.yaml#L611) | int | | `1044` |
|
||||||
|
| [controller.statefulSetAnnotations](./values.yaml#L670) | object | Annotations for controller StatefulSet | `{}` |
|
||||||
|
| [controller.statefulSetLabels](./values.yaml#L232) | object | Jenkins controller custom labels for the StatefulSet | `{}` |
|
||||||
|
| [controller.targetPort](./values.yaml#L221) | int | k8s target port | `8080` |
|
||||||
|
| [controller.terminationGracePeriodSeconds](./values.yaml#L653) | string | Set TerminationGracePeriodSeconds | `nil` |
|
||||||
|
| [controller.terminationMessagePath](./values.yaml#L655) | string | Set the termination message path | `nil` |
|
||||||
|
| [controller.terminationMessagePolicy](./values.yaml#L657) | string | Set the termination message policy | `nil` |
|
||||||
|
| [controller.testEnabled](./values.yaml#L834) | bool | Can be used to disable rendering controller test resources when using helm template | `true` |
|
||||||
|
| [controller.tolerations](./values.yaml#L651) | list | Toleration labels for pod assignment | `[]` |
|
||||||
|
| [controller.topologySpreadConstraints](./values.yaml#L677) | object | Topology spread constraints | `{}` |
|
||||||
|
| [controller.updateStrategy](./values.yaml#L674) | object | Update strategy for StatefulSet | `{}` |
|
||||||
|
| [controller.usePodSecurityContext](./values.yaml#L176) | bool | Enable pod security context (must be `true` if podSecurityContextOverride, runAsUser or fsGroup are set) | `true` |
|
||||||
|
| [credentialsId](./values.yaml#L27) | string | The Jenkins credentials to access the Kubernetes API server. For the default cluster it is not needed. | `nil` |
|
||||||
|
| [fullnameOverride](./values.yaml#L13) | string | Override the full resource names | `jenkins-(release-name)` or `jenkins` if the release-name is `jenkins` |
|
||||||
|
| [helmtest.bats.image.registry](./values.yaml#L1333) | string | Registry of the image used to test the framework | `"docker.io"` |
|
||||||
|
| [helmtest.bats.image.repository](./values.yaml#L1335) | string | Repository of the image used to test the framework | `"bats/bats"` |
|
||||||
|
| [helmtest.bats.image.tag](./values.yaml#L1337) | string | Tag of the image to test the framework | `"1.11.0"` |
|
||||||
|
| [kubernetesURL](./values.yaml#L24) | string | The URL of the Kubernetes API server | `"https://kubernetes.default"` |
|
||||||
|
| [nameOverride](./values.yaml#L10) | string | Override the resource name prefix | `Chart.Name` |
|
||||||
|
| [namespaceOverride](./values.yaml#L16) | string | Override the deployment namespace | `Release.Namespace` |
|
||||||
|
| [networkPolicy.apiVersion](./values.yaml#L1263) | string | NetworkPolicy ApiVersion | `"networking.k8s.io/v1"` |
|
||||||
|
| [networkPolicy.enabled](./values.yaml#L1258) | bool | Enable the creation of NetworkPolicy resources | `false` |
|
||||||
|
| [networkPolicy.externalAgents.except](./values.yaml#L1277) | list | A list of IP sub-ranges to be excluded from the allowlisted IP range | `[]` |
|
||||||
|
| [networkPolicy.externalAgents.ipCIDR](./values.yaml#L1275) | string | The IP range from which external agents are allowed to connect to controller, i.e., 172.17.0.0/16 | `nil` |
|
||||||
|
| [networkPolicy.internalAgents.allowed](./values.yaml#L1267) | bool | Allow internal agents (from the same cluster) to connect to controller. Agent pods will be filtered based on PodLabels | `true` |
|
||||||
|
| [networkPolicy.internalAgents.namespaceLabels](./values.yaml#L1271) | object | A map of labels (keys/values) that agents namespaces must have to be able to connect to controller | `{}` |
|
||||||
|
| [networkPolicy.internalAgents.podLabels](./values.yaml#L1269) | object | A map of labels (keys/values) that agent pods must have to be able to connect to controller | `{}` |
|
||||||
|
| [persistence.accessMode](./values.yaml#L1233) | string | The PVC access mode | `"ReadWriteOnce"` |
|
||||||
|
| [persistence.annotations](./values.yaml#L1229) | object | Annotations for the PVC | `{}` |
|
||||||
|
| [persistence.dataSource](./values.yaml#L1239) | object | Existing data source to clone PVC from | `{}` |
|
||||||
|
| [persistence.enabled](./values.yaml#L1213) | bool | Enable the use of a Jenkins PVC | `true` |
|
||||||
|
| [persistence.existingClaim](./values.yaml#L1219) | string | Provide the name of a PVC | `nil` |
|
||||||
|
| [persistence.labels](./values.yaml#L1231) | object | Labels for the PVC | `{}` |
|
||||||
|
| [persistence.mounts](./values.yaml#L1251) | list | Additional mounts | `[]` |
|
||||||
|
| [persistence.size](./values.yaml#L1235) | string | The size of the PVC | `"8Gi"` |
|
||||||
|
| [persistence.storageClass](./values.yaml#L1227) | string | Storage class for the PVC | `nil` |
|
||||||
|
| [persistence.subPath](./values.yaml#L1244) | string | SubPath for jenkins-home mount | `nil` |
|
||||||
|
| [persistence.volumes](./values.yaml#L1246) | list | Additional volumes | `[]` |
|
||||||
|
| [rbac.create](./values.yaml#L1283) | bool | Whether RBAC resources are created | `true` |
|
||||||
|
| [rbac.readSecrets](./values.yaml#L1285) | bool | Whether the Jenkins service account should be able to read Kubernetes secrets | `false` |
|
||||||
|
| [renderHelmLabels](./values.yaml#L30) | bool | Enables rendering of the helm.sh/chart label to the annotations | `true` |
|
||||||
|
| [serviceAccount.annotations](./values.yaml#L1295) | object | Configures annotations for the ServiceAccount | `{}` |
|
||||||
|
| [serviceAccount.create](./values.yaml#L1289) | bool | Configures if a ServiceAccount with this name should be created | `true` |
|
||||||
|
| [serviceAccount.extraLabels](./values.yaml#L1297) | object | Configures extra labels for the ServiceAccount | `{}` |
|
||||||
|
| [serviceAccount.imagePullSecretName](./values.yaml#L1299) | string | Controller ServiceAccount image pull secret | `nil` |
|
||||||
|
| [serviceAccount.name](./values.yaml#L1293) | string | | `nil` |
|
||||||
|
| [serviceAccountAgent.annotations](./values.yaml#L1310) | object | Configures annotations for the agent ServiceAccount | `{}` |
|
||||||
|
| [serviceAccountAgent.create](./values.yaml#L1304) | bool | Configures if an agent ServiceAccount should be created | `false` |
|
||||||
|
| [serviceAccountAgent.extraLabels](./values.yaml#L1312) | object | Configures extra labels for the agent ServiceAccount | `{}` |
|
||||||
|
| [serviceAccountAgent.imagePullSecretName](./values.yaml#L1314) | string | Agent ServiceAccount image pull secret | `nil` |
|
||||||
|
| [serviceAccountAgent.name](./values.yaml#L1308) | string | The name of the agent ServiceAccount to be used by access-controlled resources | `nil` |
|
|
@ -0,0 +1,28 @@
|
||||||
|
# Jenkins
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
The following tables list the configurable parameters of the Jenkins chart and their default values.
|
||||||
|
|
||||||
|
{{- define "chart.valueDefaultColumnRender" -}}
|
||||||
|
{{- $defaultValue := (trimAll "`" (default .Default .AutoDefault) | replace "\n" "") -}}
|
||||||
|
`{{- $defaultValue | replace "\n" "" -}}`
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "chart.typeColumnRender" -}}
|
||||||
|
{{- .Type -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "chart.valueDescription" -}}
|
||||||
|
{{- default .Description .AutoDescription }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "chart.valuesTable" -}}
|
||||||
|
| Key | Type | Description | Default |
|
||||||
|
|:----|:-----|:---------|:------------|
|
||||||
|
{{- range .Values }}
|
||||||
|
| [{{ .Key }}](./values.yaml#L{{ .LineNumber }}) | {{ template "chart.typeColumnRender" . }} | {{ template "chart.valueDescription" . }} | {{ template "chart.valueDefaultColumnRender" . }} |
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{ template "chart.valuesSection" . }}
|
|
@ -0,0 +1,68 @@
|
||||||
|
{{- $prefix := .Values.controller.jenkinsUriPrefix | default "" -}}
|
||||||
|
{{- $url := "" -}}
|
||||||
|
1. Get your '{{ .Values.controller.admin.username }}' user password by running:
|
||||||
|
kubectl exec --namespace {{ template "jenkins.namespace" . }} -it svc/{{ template "jenkins.fullname" . }} -c jenkins -- /bin/cat /run/secrets/additional/chart-admin-password && echo
|
||||||
|
{{- if .Values.controller.ingress.hostName -}}
|
||||||
|
{{- if .Values.controller.ingress.tls -}}
|
||||||
|
{{- $url = print "https://" .Values.controller.ingress.hostName $prefix -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $url = print "http://" .Values.controller.ingress.hostName $prefix -}}
|
||||||
|
{{- end }}
|
||||||
|
2. Visit {{ $url }}
|
||||||
|
{{- else }}
|
||||||
|
2. Get the Jenkins URL to visit by running these commands in the same shell:
|
||||||
|
{{- if contains "NodePort" .Values.controller.serviceType }}
|
||||||
|
export NODE_PORT=$(kubectl get --namespace {{ template "jenkins.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "jenkins.fullname" . }})
|
||||||
|
export NODE_IP=$(kubectl get nodes --namespace {{ template "jenkins.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||||
|
{{- if .Values.controller.httpsKeyStore.enable -}}
|
||||||
|
{{- $url = print "https://$NODE_IP:$NODE_PORT" $prefix -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $url = print "http://$NODE_IP:$NODE_PORT" $prefix -}}
|
||||||
|
{{- end }}
|
||||||
|
echo {{ $url }}
|
||||||
|
|
||||||
|
{{- else if contains "LoadBalancer" .Values.controller.serviceType }}
|
||||||
|
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||||
|
You can watch the status of by running 'kubectl get svc --namespace {{ template "jenkins.namespace" . }} -w {{ template "jenkins.fullname" . }}'
|
||||||
|
export SERVICE_IP=$(kubectl get svc --namespace {{ template "jenkins.namespace" . }} {{ template "jenkins.fullname" . }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}")
|
||||||
|
{{- if .Values.controller.httpsKeyStore.enable -}}
|
||||||
|
{{- $url = print "https://$SERVICE_IP:" .Values.controller.servicePort $prefix -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $url = print "http://$SERVICE_IP:" .Values.controller.servicePort $prefix -}}
|
||||||
|
{{- end }}
|
||||||
|
echo {{ $url }}
|
||||||
|
|
||||||
|
{{- else if contains "ClusterIP" .Values.controller.serviceType -}}
|
||||||
|
{{- if .Values.controller.httpsKeyStore.enable -}}
|
||||||
|
{{- $url = print "https://127.0.0.1:" .Values.controller.servicePort $prefix -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $url = print "http://127.0.0.1:" .Values.controller.servicePort $prefix -}}
|
||||||
|
{{- end }}
|
||||||
|
echo {{ $url }}
|
||||||
|
kubectl --namespace {{ template "jenkins.namespace" . }} port-forward svc/{{template "jenkins.fullname" . }} {{ .Values.controller.servicePort }}:{{ .Values.controller.servicePort }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
3. Login with the password from step 1 and the username: {{ .Values.controller.admin.username }}
|
||||||
|
4. Configure security realm and authorization strategy
|
||||||
|
5. Use Jenkins Configuration as Code by specifying configScripts in your values.yaml file, see documentation: {{ $url }}/configuration-as-code and examples: https://github.com/jenkinsci/configuration-as-code-plugin/tree/master/demos
|
||||||
|
|
||||||
|
For more information on running Jenkins on Kubernetes, visit:
|
||||||
|
https://cloud.google.com/solutions/jenkins-on-container-engine
|
||||||
|
|
||||||
|
For more information about Jenkins Configuration as Code, visit:
|
||||||
|
https://jenkins.io/projects/jcasc/
|
||||||
|
|
||||||
|
{{ if and (eq .Values.controller.image.repository "jenkins/jenkins") (eq .Values.controller.image.registry "docker.io") }}
|
||||||
|
NOTE: Consider using a custom image with pre-installed plugins
|
||||||
|
{{- else if .Values.controller.installPlugins }}
|
||||||
|
NOTE: Consider disabling `installPlugins` if your image already contains plugins.
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.persistence.enabled }}
|
||||||
|
{{- else }}
|
||||||
|
#################################################################################
|
||||||
|
###### WARNING: Persistence is disabled!!! You will lose your data when #####
|
||||||
|
###### the Jenkins pod is terminated. #####
|
||||||
|
#################################################################################
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,673 @@
|
||||||
|
{{/* vim: set filetype=mustache: */}}
|
||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "jenkins.name" -}}
|
||||||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Expand the label of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "jenkins.label" -}}
|
||||||
|
{{- printf "%s-%s" (include "jenkins.name" .) .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Allow the release namespace to be overridden for multi-namespace deployments in combined charts.
|
||||||
|
*/}}
|
||||||
|
{{- define "jenkins.namespace" -}}
|
||||||
|
{{- if .Values.namespaceOverride -}}
|
||||||
|
{{- .Values.namespaceOverride -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- .Release.Namespace -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "jenkins.agent.namespace" -}}
|
||||||
|
{{- if .Values.agent.namespace -}}
|
||||||
|
{{- tpl .Values.agent.namespace . -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- if .Values.namespaceOverride -}}
|
||||||
|
{{- .Values.namespaceOverride -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- .Release.Namespace -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
If release name contains chart name it will be used as a full name.
|
||||||
|
*/}}
|
||||||
|
{{- define "jenkins.fullname" -}}
|
||||||
|
{{- if .Values.fullnameOverride -}}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||||
|
{{- if contains $name .Release.Name -}}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Returns the admin password
|
||||||
|
https://github.com/helm/charts/issues/5167#issuecomment-619137759
|
||||||
|
*/}}
|
||||||
|
{{- define "jenkins.password" -}}
|
||||||
|
{{- if .Values.controller.admin.password -}}
|
||||||
|
{{- .Values.controller.admin.password | b64enc | quote }}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $secret := (lookup "v1" "Secret" .Release.Namespace (include "jenkins.fullname" .)).data -}}
|
||||||
|
{{- if $secret -}}
|
||||||
|
{{/*
|
||||||
|
Reusing current password since secret exists
|
||||||
|
*/}}
|
||||||
|
{{- index $secret ( .Values.controller.admin.passwordKey | default "jenkins-admin-password" ) -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{/*
|
||||||
|
Generate new password
|
||||||
|
*/}}
|
||||||
|
{{- randAlphaNum 22 | b64enc | quote }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Returns the Jenkins URL
|
||||||
|
*/}}
|
||||||
|
{{- define "jenkins.url" -}}
|
||||||
|
{{- if .Values.controller.jenkinsUrl }}
|
||||||
|
{{- .Values.controller.jenkinsUrl }}
|
||||||
|
{{- else }}
|
||||||
|
{{- if .Values.controller.ingress.hostName }}
|
||||||
|
{{- if .Values.controller.ingress.tls }}
|
||||||
|
{{- default "https" .Values.controller.jenkinsUrlProtocol }}://{{ tpl .Values.controller.ingress.hostName $ }}{{ default "" .Values.controller.jenkinsUriPrefix }}
|
||||||
|
{{- else }}
|
||||||
|
{{- default "http" .Values.controller.jenkinsUrlProtocol }}://{{ tpl .Values.controller.ingress.hostName $ }}{{ default "" .Values.controller.jenkinsUriPrefix }}
|
||||||
|
{{- end }}
|
||||||
|
{{- else }}
|
||||||
|
{{- default "http" .Values.controller.jenkinsUrlProtocol }}://{{ template "jenkins.fullname" . }}:{{.Values.controller.servicePort}}{{ default "" .Values.controller.jenkinsUriPrefix }}
|
||||||
|
{{- end}}
|
||||||
|
{{- end}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Returns configuration as code default config
|
||||||
|
*/}}
|
||||||
|
{{- define "jenkins.casc.defaults" -}}
|
||||||
|
jenkins:
|
||||||
|
{{- $configScripts := toYaml .Values.controller.JCasC.configScripts }}
|
||||||
|
{{- if and (.Values.controller.JCasC.authorizationStrategy) (not (contains "authorizationStrategy:" $configScripts)) }}
|
||||||
|
authorizationStrategy:
|
||||||
|
{{- tpl .Values.controller.JCasC.authorizationStrategy . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if and (.Values.controller.JCasC.securityRealm) (not (contains "securityRealm:" $configScripts)) }}
|
||||||
|
securityRealm:
|
||||||
|
{{- tpl .Values.controller.JCasC.securityRealm . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
disableRememberMe: {{ .Values.controller.disableRememberMe }}
|
||||||
|
{{- if .Values.controller.legacyRemotingSecurityEnabled }}
|
||||||
|
remotingSecurity:
|
||||||
|
enabled: true
|
||||||
|
{{- end }}
|
||||||
|
mode: {{ .Values.controller.executorMode }}
|
||||||
|
numExecutors: {{ .Values.controller.numExecutors }}
|
||||||
|
{{- if not (kindIs "invalid" .Values.controller.customJenkinsLabels) }}
|
||||||
|
labelString: "{{ join " " .Values.controller.customJenkinsLabels }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.projectNamingStrategy }}
|
||||||
|
{{- if kindIs "string" .Values.controller.projectNamingStrategy }}
|
||||||
|
projectNamingStrategy: "{{ .Values.controller.projectNamingStrategy }}"
|
||||||
|
{{- else }}
|
||||||
|
projectNamingStrategy:
|
||||||
|
{{- toYaml .Values.controller.projectNamingStrategy | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
markupFormatter:
|
||||||
|
{{- if .Values.controller.enableRawHtmlMarkupFormatter }}
|
||||||
|
rawHtml:
|
||||||
|
disableSyntaxHighlighting: true
|
||||||
|
{{- else }}
|
||||||
|
{{- toYaml .Values.controller.markupFormatter | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
clouds:
|
||||||
|
- kubernetes:
|
||||||
|
containerCapStr: "{{ .Values.agent.containerCap }}"
|
||||||
|
{{- if .Values.agent.jnlpregistry }}
|
||||||
|
jnlpregistry: "{{ .Values.agent.jnlpregistry }}"
|
||||||
|
{{- end }}
|
||||||
|
defaultsProviderTemplate: "{{ .Values.agent.defaultsProviderTemplate }}"
|
||||||
|
connectTimeout: "{{ .Values.agent.kubernetesConnectTimeout }}"
|
||||||
|
readTimeout: "{{ .Values.agent.kubernetesReadTimeout }}"
|
||||||
|
{{- if .Values.agent.directConnection }}
|
||||||
|
directConnection: true
|
||||||
|
{{- else }}
|
||||||
|
{{- if .Values.agent.jenkinsUrl }}
|
||||||
|
jenkinsUrl: "{{ tpl .Values.agent.jenkinsUrl . }}"
|
||||||
|
{{- else }}
|
||||||
|
jenkinsUrl: "http://{{ template "jenkins.fullname" . }}.{{ template "jenkins.namespace" . }}.svc.{{.Values.clusterZone}}:{{.Values.controller.servicePort}}{{ default "" .Values.controller.jenkinsUriPrefix }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- if not .Values.agent.websocket }}
|
||||||
|
{{- if .Values.agent.jenkinsTunnel }}
|
||||||
|
jenkinsTunnel: "{{ tpl .Values.agent.jenkinsTunnel . }}"
|
||||||
|
{{- else }}
|
||||||
|
jenkinsTunnel: "{{ template "jenkins.fullname" . }}-agent.{{ template "jenkins.namespace" . }}.svc.{{.Values.clusterZone}}:{{ .Values.controller.agentListenerPort }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- else }}
|
||||||
|
webSocket: true
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
skipTlsVerify: {{ .Values.agent.skipTlsVerify | default false}}
|
||||||
|
usageRestricted: {{ .Values.agent.usageRestricted | default false}}
|
||||||
|
maxRequestsPerHostStr: {{ .Values.agent.maxRequestsPerHostStr | quote }}
|
||||||
|
retentionTimeout: {{ .Values.agent.retentionTimeout | quote }}
|
||||||
|
waitForPodSec: {{ .Values.agent.waitForPodSec | quote }}
|
||||||
|
name: "{{ .Values.controller.cloudName }}"
|
||||||
|
namespace: "{{ template "jenkins.agent.namespace" . }}"
|
||||||
|
restrictedPssSecurityContext: {{ .Values.agent.restrictedPssSecurityContext }}
|
||||||
|
serverUrl: "{{ .Values.kubernetesURL }}"
|
||||||
|
credentialsId: "{{ .Values.credentialsId }}"
|
||||||
|
{{- if .Values.agent.enabled }}
|
||||||
|
podLabels:
|
||||||
|
- key: "jenkins/{{ .Release.Name }}-{{ .Values.agent.componentName }}"
|
||||||
|
value: "true"
|
||||||
|
{{- range $key, $val := .Values.agent.podLabels }}
|
||||||
|
- key: {{ $key | quote }}
|
||||||
|
value: {{ $val | quote }}
|
||||||
|
{{- end }}
|
||||||
|
templates:
|
||||||
|
{{- if not .Values.agent.disableDefaultAgent }}
|
||||||
|
{{- include "jenkins.casc.podTemplate" . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.additionalAgents }}
|
||||||
|
{{- /* save .Values.agent */}}
|
||||||
|
{{- $agent := .Values.agent }}
|
||||||
|
{{- range $name, $additionalAgent := .Values.additionalAgents }}
|
||||||
|
{{- $additionalContainersEmpty := and (hasKey $additionalAgent "additionalContainers") (empty $additionalAgent.additionalContainers) }}
|
||||||
|
{{- /* merge original .Values.agent into additional agent to ensure it at least has the default values */}}
|
||||||
|
{{- $additionalAgent := merge $additionalAgent $agent }}
|
||||||
|
{{- /* clear list of additional containers in case it is configured empty for this agent (merge might have overwritten that) */}}
|
||||||
|
{{- if $additionalContainersEmpty }}
|
||||||
|
{{- $_ := set $additionalAgent "additionalContainers" list }}
|
||||||
|
{{- end }}
|
||||||
|
{{- /* set .Values.agent to $additionalAgent */}}
|
||||||
|
{{- $_ := set $.Values "agent" $additionalAgent }}
|
||||||
|
{{- include "jenkins.casc.podTemplate" $ | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- /* restore .Values.agent */}}
|
||||||
|
{{- $_ := set .Values "agent" $agent }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.agent.podTemplates }}
|
||||||
|
{{- range $key, $val := .Values.agent.podTemplates }}
|
||||||
|
{{- tpl $val $ | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.additionalClouds }}
|
||||||
|
{{- /* save root */}}
|
||||||
|
{{- $oldRoot := deepCopy $ }}
|
||||||
|
{{- range $name, $additionalCloud := .Values.additionalClouds }}
|
||||||
|
{{- $newRoot := deepCopy $ }}
|
||||||
|
{{- /* clear additionalAgents from the copy if override set to `true` */}}
|
||||||
|
{{- if .additionalAgentsOverride }}
|
||||||
|
{{- $_ := set $newRoot.Values "additionalAgents" list}}
|
||||||
|
{{- end}}
|
||||||
|
{{- $newValues := merge $additionalCloud $newRoot.Values }}
|
||||||
|
{{- $_ := set $newRoot "Values" $newValues }}
|
||||||
|
{{- /* clear additionalClouds from the copy */}}
|
||||||
|
{{- $_ := set $newRoot.Values "additionalClouds" list }}
|
||||||
|
{{- with $newRoot}}
|
||||||
|
- kubernetes:
|
||||||
|
containerCapStr: "{{ .Values.agent.containerCap }}"
|
||||||
|
{{- if .Values.agent.jnlpregistry }}
|
||||||
|
jnlpregistry: "{{ .Values.agent.jnlpregistry }}"
|
||||||
|
{{- end }}
|
||||||
|
defaultsProviderTemplate: "{{ .Values.agent.defaultsProviderTemplate }}"
|
||||||
|
connectTimeout: "{{ .Values.agent.kubernetesConnectTimeout }}"
|
||||||
|
readTimeout: "{{ .Values.agent.kubernetesReadTimeout }}"
|
||||||
|
{{- if .Values.agent.directConnection }}
|
||||||
|
directConnection: true
|
||||||
|
{{- else }}
|
||||||
|
{{- if .Values.agent.jenkinsUrl }}
|
||||||
|
jenkinsUrl: "{{ tpl .Values.agent.jenkinsUrl . }}"
|
||||||
|
{{- else }}
|
||||||
|
jenkinsUrl: "http://{{ template "jenkins.fullname" . }}.{{ template "jenkins.namespace" . }}.svc.{{.Values.clusterZone}}:{{.Values.controller.servicePort}}{{ default "" .Values.controller.jenkinsUriPrefix }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- if not .Values.agent.websocket }}
|
||||||
|
{{- if .Values.agent.jenkinsTunnel }}
|
||||||
|
jenkinsTunnel: "{{ tpl .Values.agent.jenkinsTunnel . }}"
|
||||||
|
{{- else }}
|
||||||
|
jenkinsTunnel: "{{ template "jenkins.fullname" . }}-agent.{{ template "jenkins.namespace" . }}.svc.{{.Values.clusterZone}}:{{ .Values.controller.agentListenerPort }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- else }}
|
||||||
|
webSocket: true
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
skipTlsVerify: {{ .Values.agent.skipTlsVerify | default false}}
|
||||||
|
usageRestricted: {{ .Values.agent.usageRestricted | default false}}
|
||||||
|
maxRequestsPerHostStr: {{ .Values.agent.maxRequestsPerHostStr | quote }}
|
||||||
|
retentionTimeout: {{ .Values.agent.retentionTimeout | quote }}
|
||||||
|
waitForPodSec: {{ .Values.agent.waitForPodSec | quote }}
|
||||||
|
name: {{ $name | quote }}
|
||||||
|
namespace: "{{ template "jenkins.agent.namespace" . }}"
|
||||||
|
restrictedPssSecurityContext: {{ .Values.agent.restrictedPssSecurityContext }}
|
||||||
|
serverUrl: "{{ .Values.kubernetesURL }}"
|
||||||
|
credentialsId: "{{ .Values.credentialsId }}"
|
||||||
|
{{- if .Values.agent.enabled }}
|
||||||
|
podLabels:
|
||||||
|
- key: "jenkins/{{ .Release.Name }}-{{ .Values.agent.componentName }}"
|
||||||
|
value: "true"
|
||||||
|
{{- range $key, $val := .Values.agent.podLabels }}
|
||||||
|
- key: {{ $key | quote }}
|
||||||
|
value: {{ $val | quote }}
|
||||||
|
{{- end }}
|
||||||
|
templates:
|
||||||
|
{{- if not .Values.agent.disableDefaultAgent }}
|
||||||
|
{{- include "jenkins.casc.podTemplate" . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.additionalAgents }}
|
||||||
|
{{- /* save .Values.agent */}}
|
||||||
|
{{- $agent := .Values.agent }}
|
||||||
|
{{- range $name, $additionalAgent := .Values.additionalAgents }}
|
||||||
|
{{- $additionalContainersEmpty := and (hasKey $additionalAgent "additionalContainers") (empty $additionalAgent.additionalContainers) }}
|
||||||
|
{{- /* merge original .Values.agent into additional agent to ensure it at least has the default values */}}
|
||||||
|
{{- $additionalAgent := merge $additionalAgent $agent }}
|
||||||
|
{{- /* clear list of additional containers in case it is configured empty for this agent (merge might have overwritten that) */}}
|
||||||
|
{{- if $additionalContainersEmpty }}
|
||||||
|
{{- $_ := set $additionalAgent "additionalContainers" list }}
|
||||||
|
{{- end }}
|
||||||
|
{{- /* set .Values.agent to $additionalAgent */}}
|
||||||
|
{{- $_ := set $.Values "agent" $additionalAgent }}
|
||||||
|
{{- include "jenkins.casc.podTemplate" $ | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- /* restore .Values.agent */}}
|
||||||
|
{{- $_ := set .Values "agent" $agent }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.agent.podTemplates }}
|
||||||
|
{{- range $key, $val := . }}
|
||||||
|
{{- tpl $val $ | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- /* restore root */}}
|
||||||
|
{{- $_ := set $ "Values" $oldRoot.Values }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.csrf.defaultCrumbIssuer.enabled }}
|
||||||
|
crumbIssuer:
|
||||||
|
standard:
|
||||||
|
excludeClientIPFromCrumb: {{ if .Values.controller.csrf.defaultCrumbIssuer.proxyCompatability }}true{{ else }}false{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- include "jenkins.casc.security" . }}
|
||||||
|
{{- with .Values.controller.scriptApproval }}
|
||||||
|
scriptApproval:
|
||||||
|
approvedSignatures:
|
||||||
|
{{- range $key, $val := . }}
|
||||||
|
- "{{ $val }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
unclassified:
|
||||||
|
location:
|
||||||
|
{{- with .Values.controller.jenkinsAdminEmail }}
|
||||||
|
adminAddress: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
url: {{ template "jenkins.url" . }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Returns a name template to be used for jcasc configmaps, using
|
||||||
|
suffix passed in at call as index 0
|
||||||
|
*/}}
|
||||||
|
{{- define "jenkins.casc.configName" -}}
|
||||||
|
{{- $name := index . 0 -}}
|
||||||
|
{{- $root := index . 1 -}}
|
||||||
|
"{{- include "jenkins.fullname" $root -}}-jenkins-{{ $name }}"
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Returns kubernetes pod template configuration as code
|
||||||
|
*/}}
|
||||||
|
{{- define "jenkins.casc.podTemplate" -}}
|
||||||
|
- name: "{{ .Values.agent.podName }}"
|
||||||
|
namespace: "{{ template "jenkins.agent.namespace" . }}"
|
||||||
|
{{- if .Values.agent.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- range $key, $value := .Values.agent.annotations }}
|
||||||
|
- key: {{ $key }}
|
||||||
|
value: {{ $value | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
id: {{ sha256sum (toYaml .Values.agent) }}
|
||||||
|
containers:
|
||||||
|
- name: "{{ .Values.agent.sideContainerName }}"
|
||||||
|
alwaysPullImage: {{ .Values.agent.alwaysPullImage }}
|
||||||
|
args: "{{ .Values.agent.args | replace "$" "^$" }}"
|
||||||
|
{{- with .Values.agent.command }}
|
||||||
|
command: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
envVars:
|
||||||
|
- envVar:
|
||||||
|
{{- if .Values.agent.directConnection }}
|
||||||
|
key: "JENKINS_DIRECT_CONNECTION"
|
||||||
|
{{- if .Values.agent.jenkinsTunnel }}
|
||||||
|
value: "{{ tpl .Values.agent.jenkinsTunnel . }}"
|
||||||
|
{{- else }}
|
||||||
|
value: "{{ template "jenkins.fullname" . }}-agent.{{ template "jenkins.namespace" . }}.svc.{{.Values.clusterZone}}:{{ .Values.controller.agentListenerPort }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- else }}
|
||||||
|
key: "JENKINS_URL"
|
||||||
|
{{- if .Values.agent.jenkinsUrl }}
|
||||||
|
value: {{ tpl .Values.agent.jenkinsUrl . }}
|
||||||
|
{{- else }}
|
||||||
|
value: "http://{{ template "jenkins.fullname" . }}.{{ template "jenkins.namespace" . }}.svc.{{.Values.clusterZone}}:{{.Values.controller.servicePort}}{{ default "/" .Values.controller.jenkinsUriPrefix }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
image: "{{ .Values.agent.image.repository }}:{{ .Values.agent.image.tag }}"
|
||||||
|
{{- if .Values.agent.livenessProbe }}
|
||||||
|
livenessProbe:
|
||||||
|
execArgs: {{.Values.agent.livenessProbe.execArgs | quote}}
|
||||||
|
failureThreshold: {{.Values.agent.livenessProbe.failureThreshold}}
|
||||||
|
initialDelaySeconds: {{.Values.agent.livenessProbe.initialDelaySeconds}}
|
||||||
|
periodSeconds: {{.Values.agent.livenessProbe.periodSeconds}}
|
||||||
|
successThreshold: {{.Values.agent.livenessProbe.successThreshold}}
|
||||||
|
timeoutSeconds: {{.Values.agent.livenessProbe.timeoutSeconds}}
|
||||||
|
{{- end }}
|
||||||
|
privileged: "{{- if .Values.agent.privileged }}true{{- else }}false{{- end }}"
|
||||||
|
resourceLimitCpu: {{.Values.agent.resources.limits.cpu}}
|
||||||
|
resourceLimitMemory: {{.Values.agent.resources.limits.memory}}
|
||||||
|
{{- with .Values.agent.resources.limits.ephemeralStorage }}
|
||||||
|
resourceLimitEphemeralStorage: {{.}}
|
||||||
|
{{- end }}
|
||||||
|
resourceRequestCpu: {{.Values.agent.resources.requests.cpu}}
|
||||||
|
resourceRequestMemory: {{.Values.agent.resources.requests.memory}}
|
||||||
|
{{- with .Values.agent.resources.requests.ephemeralStorage }}
|
||||||
|
resourceRequestEphemeralStorage: {{.}}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.agent.runAsUser }}
|
||||||
|
runAsUser: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.agent.runAsGroup }}
|
||||||
|
runAsGroup: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
ttyEnabled: {{ .Values.agent.TTYEnabled }}
|
||||||
|
workingDir: {{ .Values.agent.workingDir }}
|
||||||
|
{{- range $additionalContainers := .Values.agent.additionalContainers }}
|
||||||
|
- name: "{{ $additionalContainers.sideContainerName }}"
|
||||||
|
alwaysPullImage: {{ $additionalContainers.alwaysPullImage | default $.Values.agent.alwaysPullImage }}
|
||||||
|
args: "{{ $additionalContainers.args | replace "$" "^$" }}"
|
||||||
|
{{- with $additionalContainers.command }}
|
||||||
|
command: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
envVars:
|
||||||
|
- envVar:
|
||||||
|
key: "JENKINS_URL"
|
||||||
|
{{- if $additionalContainers.jenkinsUrl }}
|
||||||
|
value: {{ tpl ($additionalContainers.jenkinsUrl) . }}
|
||||||
|
{{- else }}
|
||||||
|
value: "http://{{ template "jenkins.fullname" $ }}.{{ template "jenkins.namespace" $ }}.svc.{{ $.Values.clusterZone }}:{{ $.Values.controller.servicePort }}{{ default "/" $.Values.controller.jenkinsUriPrefix }}"
|
||||||
|
{{- end }}
|
||||||
|
image: "{{ $additionalContainers.image.repository }}:{{ $additionalContainers.image.tag }}"
|
||||||
|
{{- if $additionalContainers.livenessProbe }}
|
||||||
|
livenessProbe:
|
||||||
|
execArgs: {{$additionalContainers.livenessProbe.execArgs | quote}}
|
||||||
|
failureThreshold: {{$additionalContainers.livenessProbe.failureThreshold}}
|
||||||
|
initialDelaySeconds: {{$additionalContainers.livenessProbe.initialDelaySeconds}}
|
||||||
|
periodSeconds: {{$additionalContainers.livenessProbe.periodSeconds}}
|
||||||
|
successThreshold: {{$additionalContainers.livenessProbe.successThreshold}}
|
||||||
|
timeoutSeconds: {{$additionalContainers.livenessProbe.timeoutSeconds}}
|
||||||
|
{{- end }}
|
||||||
|
privileged: "{{- if $additionalContainers.privileged }}true{{- else }}false{{- end }}"
|
||||||
|
resourceLimitCpu: {{ if $additionalContainers.resources }}{{ $additionalContainers.resources.limits.cpu }}{{ else }}{{ $.Values.agent.resources.limits.cpu }}{{ end }}
|
||||||
|
resourceLimitMemory: {{ if $additionalContainers.resources }}{{ $additionalContainers.resources.limits.memory }}{{ else }}{{ $.Values.agent.resources.limits.memory }}{{ end }}
|
||||||
|
resourceRequestCpu: {{ if $additionalContainers.resources }}{{ $additionalContainers.resources.requests.cpu }}{{ else }}{{ $.Values.agent.resources.requests.cpu }}{{ end }}
|
||||||
|
resourceRequestMemory: {{ if $additionalContainers.resources }}{{ $additionalContainers.resources.requests.memory }}{{ else }}{{ $.Values.agent.resources.requests.memory }}{{ end }}
|
||||||
|
{{- if or $additionalContainers.runAsUser $.Values.agent.runAsUser }}
|
||||||
|
runAsUser: {{ $additionalContainers.runAsUser | default $.Values.agent.runAsUser }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if or $additionalContainers.runAsGroup $.Values.agent.runAsGroup }}
|
||||||
|
runAsGroup: {{ $additionalContainers.runAsGroup | default $.Values.agent.runAsGroup }}
|
||||||
|
{{- end }}
|
||||||
|
ttyEnabled: {{ $additionalContainers.TTYEnabled | default $.Values.agent.TTYEnabled }}
|
||||||
|
workingDir: {{ $additionalContainers.workingDir | default $.Values.agent.workingDir }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if or .Values.agent.envVars .Values.agent.secretEnvVars }}
|
||||||
|
envVars:
|
||||||
|
{{- range $index, $var := .Values.agent.envVars }}
|
||||||
|
- envVar:
|
||||||
|
key: {{ $var.name }}
|
||||||
|
value: {{ tpl $var.value $ }}
|
||||||
|
{{- end }}
|
||||||
|
{{- range $index, $var := .Values.agent.secretEnvVars }}
|
||||||
|
- secretEnvVar:
|
||||||
|
key: {{ $var.key }}
|
||||||
|
secretName: {{ $var.secretName }}
|
||||||
|
secretKey: {{ $var.secretKey }}
|
||||||
|
optional: {{ $var.optional | default false }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
idleMinutes: {{ .Values.agent.idleMinutes }}
|
||||||
|
instanceCap: 2147483647
|
||||||
|
{{- if .Values.agent.hostNetworking }}
|
||||||
|
hostNetwork: {{ .Values.agent.hostNetworking }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.agent.imagePullSecretName }}
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: {{ .Values.agent.imagePullSecretName }}
|
||||||
|
{{- end }}
|
||||||
|
label: "{{ .Release.Name }}-{{ .Values.agent.componentName }} {{ .Values.agent.customJenkinsLabels | join " " }}"
|
||||||
|
{{- if .Values.agent.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{- $local := dict "first" true }}
|
||||||
|
{{- range $key, $value := .Values.agent.nodeSelector }}
|
||||||
|
{{- if $local.first }} {{ else }},{{ end }}
|
||||||
|
{{- $key }}={{ tpl $value $ }}
|
||||||
|
{{- $_ := set $local "first" false }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
nodeUsageMode: {{ quote .Values.agent.nodeUsageMode }}
|
||||||
|
podRetention: {{ .Values.agent.podRetention }}
|
||||||
|
showRawYaml: {{ .Values.agent.showRawYaml }}
|
||||||
|
serviceAccount: "{{ include "jenkins.serviceAccountAgentName" . }}"
|
||||||
|
slaveConnectTimeoutStr: "{{ .Values.agent.connectTimeout }}"
|
||||||
|
{{- if .Values.agent.volumes }}
|
||||||
|
volumes:
|
||||||
|
{{- range $index, $volume := .Values.agent.volumes }}
|
||||||
|
-{{- if (eq $volume.type "ConfigMap") }} configMapVolume:
|
||||||
|
{{- else if (eq $volume.type "EmptyDir") }} emptyDirVolume:
|
||||||
|
{{- else if (eq $volume.type "EphemeralVolume") }} genericEphemeralVolume:
|
||||||
|
{{- else if (eq $volume.type "HostPath") }} hostPathVolume:
|
||||||
|
{{- else if (eq $volume.type "Nfs") }} nfsVolume:
|
||||||
|
{{- else if (eq $volume.type "PVC") }} persistentVolumeClaim:
|
||||||
|
{{- else if (eq $volume.type "Secret") }} secretVolume:
|
||||||
|
{{- else }} {{ $volume.type }}:
|
||||||
|
{{- end }}
|
||||||
|
{{- range $key, $value := $volume }}
|
||||||
|
{{- if not (eq $key "type") }}
|
||||||
|
{{ $key }}: {{ if kindIs "string" $value }}{{ tpl $value $ | quote }}{{ else }}{{ $value }}{{ end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.agent.workspaceVolume }}
|
||||||
|
workspaceVolume:
|
||||||
|
{{- if (eq .Values.agent.workspaceVolume.type "DynamicPVC") }}
|
||||||
|
dynamicPVC:
|
||||||
|
{{- else if (eq .Values.agent.workspaceVolume.type "EmptyDir") }}
|
||||||
|
emptyDirWorkspaceVolume:
|
||||||
|
{{- else if (eq .Values.agent.workspaceVolume.type "EphemeralVolume") }}
|
||||||
|
genericEphemeralVolume:
|
||||||
|
{{- else if (eq .Values.agent.workspaceVolume.type "HostPath") }}
|
||||||
|
hostPathWorkspaceVolume:
|
||||||
|
{{- else if (eq .Values.agent.workspaceVolume.type "Nfs") }}
|
||||||
|
nfsWorkspaceVolume:
|
||||||
|
{{- else if (eq .Values.agent.workspaceVolume.type "PVC") }}
|
||||||
|
persistentVolumeClaimWorkspaceVolume:
|
||||||
|
{{- else }}
|
||||||
|
{{ .Values.agent.workspaceVolume.type }}:
|
||||||
|
{{- end }}
|
||||||
|
{{- range $key, $value := .Values.agent.workspaceVolume }}
|
||||||
|
{{- if not (eq $key "type") }}
|
||||||
|
{{ $key }}: {{ if kindIs "string" $value }}{{ tpl $value $ | quote }}{{ else }}{{ $value }}{{ end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.agent.yamlTemplate }}
|
||||||
|
yaml: |-
|
||||||
|
{{- tpl (trim .Values.agent.yamlTemplate) . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
yamlMergeStrategy: {{ .Values.agent.yamlMergeStrategy }}
|
||||||
|
inheritYamlMergeStrategy: {{ .Values.agent.inheritYamlMergeStrategy }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "jenkins.kubernetes-version" -}}
|
||||||
|
{{- if .Values.controller.installPlugins -}}
|
||||||
|
{{- range .Values.controller.installPlugins -}}
|
||||||
|
{{- if hasPrefix "kubernetes:" . }}
|
||||||
|
{{- $split := splitList ":" . }}
|
||||||
|
{{- printf "%s" (index $split 1 ) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "jenkins.casc.security" }}
|
||||||
|
security:
|
||||||
|
{{- with .Values.controller.JCasC }}
|
||||||
|
{{- if .security }}
|
||||||
|
{{- .security | toYaml | nindent 2 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service account to use
|
||||||
|
*/}}
|
||||||
|
{{- define "jenkins.serviceAccountName" -}}
|
||||||
|
{{- if .Values.serviceAccount.create -}}
|
||||||
|
{{ default (include "jenkins.fullname" .) .Values.serviceAccount.name }}
|
||||||
|
{{- else -}}
|
||||||
|
{{ default "default" .Values.serviceAccount.name }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service account for Jenkins agents to use
|
||||||
|
*/}}
|
||||||
|
{{- define "jenkins.serviceAccountAgentName" -}}
|
||||||
|
{{- if .Values.serviceAccountAgent.create -}}
|
||||||
|
{{ default (printf "%s-%s" (include "jenkins.fullname" .) "agent") .Values.serviceAccountAgent.name }}
|
||||||
|
{{- else -}}
|
||||||
|
{{ default "default" .Values.serviceAccountAgent.name }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a full tag name for controller image
|
||||||
|
*/}}
|
||||||
|
{{- define "controller.image.tag" -}}
|
||||||
|
{{- if .Values.controller.image.tagLabel -}}
|
||||||
|
{{- default (printf "%s-%s" .Chart.AppVersion .Values.controller.image.tagLabel) .Values.controller.image.tag -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- default .Chart.AppVersion .Values.controller.image.tag -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the HTTP port for interacting with the controller
|
||||||
|
*/}}
|
||||||
|
{{- define "controller.httpPort" -}}
|
||||||
|
{{- if .Values.controller.httpsKeyStore.enable -}}
|
||||||
|
{{- .Values.controller.httpsKeyStore.httpPort -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- .Values.controller.targetPort -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "jenkins.configReloadContainer" -}}
|
||||||
|
{{- $root := index . 0 -}}
|
||||||
|
{{- $containerName := index . 1 -}}
|
||||||
|
{{- $containerType := index . 2 -}}
|
||||||
|
- name: {{ $containerName }}
|
||||||
|
image: "{{ $root.Values.controller.sidecars.configAutoReload.image.registry }}/{{ $root.Values.controller.sidecars.configAutoReload.image.repository }}:{{ $root.Values.controller.sidecars.configAutoReload.image.tag }}"
|
||||||
|
imagePullPolicy: {{ $root.Values.controller.sidecars.configAutoReload.imagePullPolicy }}
|
||||||
|
{{- if $root.Values.controller.sidecars.configAutoReload.containerSecurityContext }}
|
||||||
|
securityContext: {{- toYaml $root.Values.controller.sidecars.configAutoReload.containerSecurityContext | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if $root.Values.controller.sidecars.configAutoReload.envFrom }}
|
||||||
|
envFrom:
|
||||||
|
{{ (tpl (toYaml $root.Values.controller.sidecars.configAutoReload.envFrom) $root) | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
env:
|
||||||
|
- name: POD_NAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.name
|
||||||
|
- name: LABEL
|
||||||
|
value: "{{ template "jenkins.fullname" $root }}-jenkins-config"
|
||||||
|
- name: FOLDER
|
||||||
|
value: "{{ $root.Values.controller.sidecars.configAutoReload.folder }}"
|
||||||
|
- name: NAMESPACE
|
||||||
|
value: '{{ $root.Values.controller.sidecars.configAutoReload.searchNamespace | default (include "jenkins.namespace" $root) }}'
|
||||||
|
{{- if eq $containerType "init" }}
|
||||||
|
- name: METHOD
|
||||||
|
value: "LIST"
|
||||||
|
{{- else if $root.Values.controller.sidecars.configAutoReload.sleepTime }}
|
||||||
|
- name: METHOD
|
||||||
|
value: "SLEEP"
|
||||||
|
- name: SLEEP_TIME
|
||||||
|
value: "{{ $root.Values.controller.sidecars.configAutoReload.sleepTime }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq $containerType "sidecar" }}
|
||||||
|
- name: REQ_URL
|
||||||
|
value: "{{- default "http" $root.Values.controller.sidecars.configAutoReload.scheme }}://localhost:{{- include "controller.httpPort" $root -}}{{- $root.Values.controller.jenkinsUriPrefix -}}/reload-configuration-as-code/?casc-reload-token=$(POD_NAME)"
|
||||||
|
- name: REQ_METHOD
|
||||||
|
value: "POST"
|
||||||
|
- name: REQ_RETRY_CONNECT
|
||||||
|
value: "{{ $root.Values.controller.sidecars.configAutoReload.reqRetryConnect }}"
|
||||||
|
{{- if $root.Values.controller.sidecars.configAutoReload.skipTlsVerify }}
|
||||||
|
- name: REQ_SKIP_TLS_VERIFY
|
||||||
|
value: "true"
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if $root.Values.controller.sidecars.configAutoReload.env }}
|
||||||
|
{{- range $envVarItem := $root.Values.controller.sidecars.configAutoReload.env -}}
|
||||||
|
{{- if or (ne $containerType "init") (ne .name "METHOD") }}
|
||||||
|
{{- (tpl (toYaml (list $envVarItem)) $root) | nindent 4 }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end }}
|
||||||
|
{{- if $root.Values.controller.sidecars.configAutoReload.logging.configuration.override }}
|
||||||
|
- name: LOG_CONFIG
|
||||||
|
value: "{{ $root.Values.controller.jenkinsHome }}/auto-reload/auto-reload-config.yaml"
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
resources:
|
||||||
|
{{ toYaml $root.Values.controller.sidecars.configAutoReload.resources | indent 4 }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: sc-config-volume
|
||||||
|
mountPath: {{ $root.Values.controller.sidecars.configAutoReload.folder | quote }}
|
||||||
|
- name: jenkins-home
|
||||||
|
mountPath: {{ $root.Values.controller.jenkinsHome }}
|
||||||
|
{{- if $root.Values.persistence.subPath }}
|
||||||
|
subPath: {{ $root.Values.persistence.subPath }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if $root.Values.controller.sidecars.configAutoReload.logging.configuration.override }}
|
||||||
|
- name: auto-reload-config
|
||||||
|
mountPath: {{ $root.Values.controller.jenkinsHome }}/auto-reload
|
||||||
|
- name: auto-reload-config-logs
|
||||||
|
mountPath: {{ $root.Values.controller.jenkinsHome }}/auto-reload-logs
|
||||||
|
{{- end }}
|
||||||
|
{{- if $root.Values.controller.sidecars.configAutoReload.additionalVolumeMounts }}
|
||||||
|
{{ (tpl (toYaml $root.Values.controller.sidecars.configAutoReload.additionalVolumeMounts) $root) | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- end -}}
|
|
@ -0,0 +1,60 @@
|
||||||
|
{{- if .Values.controller.sidecars.configAutoReload.logging.configuration.override }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ template "jenkins.fullname" . }}-auto-reload-config
|
||||||
|
namespace: {{ template "jenkins.namespace" . }}
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": {{ template "jenkins.name" . }}
|
||||||
|
{{- if .Values.renderHelmLabels }}
|
||||||
|
"helm.sh/chart": "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||||
|
{{- end }}
|
||||||
|
"app.kubernetes.io/managed-by": "{{ $.Release.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ $.Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ $.Values.controller.componentName }}"
|
||||||
|
data:
|
||||||
|
auto-reload-config.yaml: |-
|
||||||
|
version: 1
|
||||||
|
disable_existing_loggers: false
|
||||||
|
root:
|
||||||
|
level: {{ .Values.controller.sidecars.configAutoReload.logging.configuration.logLevel }}
|
||||||
|
handlers:
|
||||||
|
{{- if .Values.controller.sidecars.configAutoReload.logging.configuration.logToConsole}}
|
||||||
|
- console
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.sidecars.configAutoReload.logging.configuration.logToFile }}
|
||||||
|
- file
|
||||||
|
{{- end }}
|
||||||
|
handlers:
|
||||||
|
{{- if .Values.controller.sidecars.configAutoReload.logging.configuration.logToConsole}}
|
||||||
|
console:
|
||||||
|
class: logging.StreamHandler
|
||||||
|
level: {{ .Values.controller.sidecars.configAutoReload.logging.configuration.logLevel }}
|
||||||
|
formatter: {{ .Values.controller.sidecars.configAutoReload.logging.configuration.formatter }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.sidecars.configAutoReload.logging.configuration.logToFile }}
|
||||||
|
file:
|
||||||
|
class : logging.handlers.RotatingFileHandler
|
||||||
|
formatter: {{ .Values.controller.sidecars.configAutoReload.logging.configuration.formatter }}
|
||||||
|
filename: {{ .Values.controller.jenkinsHome }}/auto-reload-logs/file.log
|
||||||
|
maxBytes: {{ .Values.controller.sidecars.configAutoReload.logging.configuration.maxBytes }}
|
||||||
|
backupCount: {{ .Values.controller.sidecars.configAutoReload.logging.configuration.backupCount }}
|
||||||
|
{{- end }}
|
||||||
|
formatters:
|
||||||
|
JSON:
|
||||||
|
"()": logger.JsonFormatter
|
||||||
|
format: "%(levelname)s %(message)s"
|
||||||
|
rename_fields:
|
||||||
|
message: msg
|
||||||
|
levelname: level
|
||||||
|
LOGFMT:
|
||||||
|
"()": logger.LogfmtFormatter
|
||||||
|
keys:
|
||||||
|
- time
|
||||||
|
- level
|
||||||
|
- msg
|
||||||
|
mapping:
|
||||||
|
time: asctime
|
||||||
|
level: levelname
|
||||||
|
msg: message
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,18 @@
|
||||||
|
{{- if .Values.controller.initScripts -}}
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ template "jenkins.fullname" . }}-init-scripts
|
||||||
|
namespace: {{ template "jenkins.namespace" . }}
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
|
||||||
|
"app.kubernetes.io/managed-by": "{{ .Release.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
data:
|
||||||
|
{{- range $key, $val := .Values.controller.initScripts }}
|
||||||
|
init{{ $key }}.groovy: |-
|
||||||
|
{{ tpl $val $ | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,92 @@
|
||||||
|
{{- $jenkinsHome := .Values.controller.jenkinsHome -}}
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ template "jenkins.fullname" . }}
|
||||||
|
namespace: {{ template "jenkins.namespace" . }}
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
|
||||||
|
"app.kubernetes.io/managed-by": "{{ .Release.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
data:
|
||||||
|
apply_config.sh: |-
|
||||||
|
set -e
|
||||||
|
{{- if .Values.controller.initializeOnce }}
|
||||||
|
if [ -f {{ .Values.controller.jenkinsHome }}/initialization-completed ]; then
|
||||||
|
echo "controller was previously initialized, refusing to re-initialize"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
{{- end }}
|
||||||
|
echo "disable Setup Wizard"
|
||||||
|
# Prevent Setup Wizard when JCasC is enabled
|
||||||
|
echo $JENKINS_VERSION > {{ .Values.controller.jenkinsHome }}/jenkins.install.UpgradeWizard.state
|
||||||
|
echo $JENKINS_VERSION > {{ .Values.controller.jenkinsHome }}/jenkins.install.InstallUtil.lastExecVersion
|
||||||
|
{{- if .Values.controller.overwritePlugins }}
|
||||||
|
echo "remove all plugins from shared volume"
|
||||||
|
# remove all plugins from shared volume
|
||||||
|
rm -rf {{ .Values.controller.jenkinsHome }}/plugins/*
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.JCasC.overwriteConfiguration }}
|
||||||
|
echo "deleting all XML config files"
|
||||||
|
rm -f {{ .Values.controller.jenkinsHome }}/config.xml
|
||||||
|
rm -f {{ .Values.controller.jenkinsHome }}/*plugins*.xml
|
||||||
|
find {{ .Values.controller.jenkinsHome }} -maxdepth 1 -type f -iname '*configuration*.xml' -exec rm -f {} \;
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.installPlugins }}
|
||||||
|
echo "download plugins"
|
||||||
|
# Install missing plugins
|
||||||
|
cp /var/jenkins_config/plugins.txt {{ .Values.controller.jenkinsHome }};
|
||||||
|
rm -rf {{ .Values.controller.jenkinsRef }}/plugins/*.lock
|
||||||
|
version () { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; }
|
||||||
|
if [ -f "{{ .Values.controller.jenkinsWar }}" ] && [ -n "$(command -v jenkins-plugin-cli)" 2>/dev/null ] && [ $(version $(jenkins-plugin-cli --version)) -ge $(version "2.1.1") ]; then
|
||||||
|
jenkins-plugin-cli --verbose --war "{{ .Values.controller.jenkinsWar }}" --plugin-file "{{ .Values.controller.jenkinsHome }}/plugins.txt" --latest {{ .Values.controller.installLatestPlugins }}{{- if .Values.controller.installLatestSpecifiedPlugins }} --latest-specified{{- end }};
|
||||||
|
else
|
||||||
|
/usr/local/bin/install-plugins.sh `echo $(cat {{ .Values.controller.jenkinsHome }}/plugins.txt)`;
|
||||||
|
fi
|
||||||
|
echo "copy plugins to shared volume"
|
||||||
|
# Copy plugins to shared volume
|
||||||
|
yes n | cp -i {{ .Values.controller.jenkinsRef }}/plugins/* /var/jenkins_plugins/;
|
||||||
|
{{- end }}
|
||||||
|
{{- if not .Values.controller.sidecars.configAutoReload.enabled }}
|
||||||
|
echo "copy configuration as code files"
|
||||||
|
mkdir -p {{ .Values.controller.jenkinsHome }}/casc_configs;
|
||||||
|
rm -rf {{ .Values.controller.jenkinsHome }}/casc_configs/*
|
||||||
|
{{- if or .Values.controller.JCasC.defaultConfig .Values.controller.JCasC.configScripts }}
|
||||||
|
cp -v /var/jenkins_config/*.yaml {{ .Values.controller.jenkinsHome }}/casc_configs
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
echo "finished initialization"
|
||||||
|
{{- if .Values.controller.initializeOnce }}
|
||||||
|
touch {{ .Values.controller.jenkinsHome }}/initialization-completed
|
||||||
|
{{- end }}
|
||||||
|
{{- if not .Values.controller.sidecars.configAutoReload.enabled }}
|
||||||
|
# Only add config to this script if we aren't auto-reloading otherwise the pod will restart upon each config change:
|
||||||
|
{{- if .Values.controller.JCasC.defaultConfig }}
|
||||||
|
jcasc-default-config.yaml: |-
|
||||||
|
{{- include "jenkins.casc.defaults" . |nindent 4}}
|
||||||
|
{{- end }}
|
||||||
|
{{- range $key, $val := .Values.controller.JCasC.configScripts }}
|
||||||
|
{{ $key }}.yaml: |-
|
||||||
|
{{ tpl $val $| indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
plugins.txt: |-
|
||||||
|
{{- if .Values.controller.installPlugins }}
|
||||||
|
{{- range $installPlugin := .Values.controller.installPlugins }}
|
||||||
|
{{- $installPlugin | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- range $addlPlugin := .Values.controller.additionalPlugins }}
|
||||||
|
{{- /* duplicate plugin check */}}
|
||||||
|
{{- range $installPlugin := $.Values.controller.installPlugins }}
|
||||||
|
{{- if eq (splitList ":" $addlPlugin | first) (splitList ":" $installPlugin | first) }}
|
||||||
|
{{- $message := print "[PLUGIN CONFLICT] controller.additionalPlugins contains '" $addlPlugin "'" }}
|
||||||
|
{{- $message := print $message " but controller.installPlugins already contains '" $installPlugin "'." }}
|
||||||
|
{{- $message := print $message " Override controller.installPlugins to use '" $addlPlugin "' plugin." }}
|
||||||
|
{{- fail $message }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- $addlPlugin | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,151 @@
|
||||||
|
{{- if .Values.checkDeprecation }}
|
||||||
|
{{- if .Values.master }}
|
||||||
|
{{ fail "`master` does no longer exist. It has been renamed to `controller`" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.controller.imageTag }}
|
||||||
|
{{ fail "`controller.imageTag` does no longer exist. Please use `controller.image.tag` instead" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.controller.slaveListenerPort }}
|
||||||
|
{{ fail "`controller.slaveListenerPort` does no longer exist. It has been renamed to `controller.agentListenerPort`" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.controller.slaveHostPort }}
|
||||||
|
{{ fail "`controller.slaveHostPort` does no longer exist. It has been renamed to `controller.agentListenerHostPort`" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.controller.slaveKubernetesNamespace }}
|
||||||
|
{{ fail "`controller.slaveKubernetesNamespace` does no longer exist. It has been renamed to `agent.namespace`" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.controller.slaveDefaultsProviderTemplate }}
|
||||||
|
{{ fail "`controller.slaveDefaultsProviderTemplate` does no longer exist. It has been renamed to `agent.defaultsProviderTemplate`" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.controller.useSecurity }}
|
||||||
|
{{ fail "`controller.useSecurity` does no longer exist. It has been renamed to `controller.adminSecret`" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.controller.slaveJenkinsUrl }}
|
||||||
|
{{ fail "`controller.slaveJenkinsUrl` does no longer exist. It has been renamed to `agent.jenkinsUrl`" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.controller.slaveJenkinsTunnel }}
|
||||||
|
{{ fail "`controller.slaveJenkinsTunnel` does no longer exist. It has been renamed to `agent.jenkinsTunnel`" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.controller.slaveConnectTimeout }}
|
||||||
|
{{ fail "`controller.slaveConnectTimeout` does no longer exist. It has been renamed to `agent.kubernetesConnectTimeout`" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.controller.slaveReadTimeout }}
|
||||||
|
{{ fail "`controller.slaveReadTimeout` does no longer exist. It has been renamed to `agent.kubernetesReadTimeout`" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.controller.slaveListenerServiceType }}
|
||||||
|
{{ fail "`controller.slaveListenerServiceType` does no longer exist. It has been renamed to `controller.agentListenerServiceType`" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.controller.slaveListenerLoadBalancerIP }}
|
||||||
|
{{ fail "`controller.slaveListenerLoadBalancerIP` does no longer exist. It has been renamed to `controller.agentListenerLoadBalancerIP`" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.controller.slaveListenerServiceAnnotations }}
|
||||||
|
{{ fail "`controller.slaveListenerServiceAnnotations` does no longer exist. It has been renamed to `controller.agentListenerServiceAnnotations`" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.agent.slaveConnectTimeout }}
|
||||||
|
{{ fail "`agent.slaveConnectTimeout` does no longer exist. It has been renamed to `agent.connectTimeout`" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.NetworkPolicy }}
|
||||||
|
|
||||||
|
{{- if .Values.NetworkPolicy.Enabled }}
|
||||||
|
{{ fail "`NetworkPolicy.Enabled` does no longer exist. It has been renamed to `networkPolicy.enabled`" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.NetworkPolicy.ApiVersion }}
|
||||||
|
{{ fail "`NetworkPolicy.ApiVersion` does no longer exist. It has been renamed to `networkPolicy.apiVersion`" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{ fail "NetworkPolicy.* values have been renamed, please check the documentation" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
|
||||||
|
{{- if .Values.rbac.install }}
|
||||||
|
{{ fail "`rbac.install` does no longer exist. It has been renamed to `rbac.create` and is enabled by default!" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.rbac.serviceAccountName }}
|
||||||
|
{{ fail "`rbac.serviceAccountName` does no longer exist. It has been renamed to `serviceAccount.name`" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.rbac.serviceAccountAnnotations }}
|
||||||
|
{{ fail "`rbac.serviceAccountAnnotations` does no longer exist. It has been renamed to `serviceAccount.annotations`" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.rbac.roleRef }}
|
||||||
|
{{ fail "`rbac.roleRef` does no longer exist. RBAC roles are now generated, please check the documentation" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.rbac.roleKind }}
|
||||||
|
{{ fail "`rbac.roleKind` does no longer exist. RBAC roles are now generated, please check the documentation" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.rbac.roleBindingKind }}
|
||||||
|
{{ fail "`rbac.roleBindingKind` does no longer exist. RBAC roles are now generated, please check the documentation" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.controller.JCasC.pluginVersion }}
|
||||||
|
{{ fail "controller.JCasC.pluginVersion has been deprecated, please use controller.installPlugins instead" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.controller.deploymentLabels }}
|
||||||
|
{{ fail "`controller.deploymentLabels` does no longer exist. It has been renamed to `controller.statefulSetLabels`" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.controller.deploymentAnnotations }}
|
||||||
|
{{ fail "`controller.deploymentAnnotations` does no longer exist. It has been renamed to `controller.statefulSetAnnotations`" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.controller.rollingUpdate }}
|
||||||
|
{{ fail "`controller.rollingUpdate` does no longer exist. It is no longer relevant, since a StatefulSet is used for the Jenkins controller" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.controller.tag }}
|
||||||
|
{{ fail "`controller.tag` no longer exists. It has been renamed to `controller.image.tag'" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.controller.tagLabel }}
|
||||||
|
{{ fail "`controller.tagLabel` no longer exists. It has been renamed to `controller.image.tagLabel`" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.controller.adminSecret }}
|
||||||
|
{{ fail "`controller.adminSecret` no longer exists. It has been renamed to `controller.admin.createSecret`" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.controller.adminUser }}
|
||||||
|
{{ fail "`controller.adminUser` no longer exists. It has been renamed to `controller.admin.username`" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.controller.adminPassword }}
|
||||||
|
{{ fail "`controller.adminPassword` no longer exists. It has been renamed to `controller.admin.password`" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.controller.sidecars.other }}
|
||||||
|
{{ fail "`controller.sidecars.other` no longer exists. It has been renamed to `controller.sidecars.additionalSidecarContainers`" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.agent.tag }}
|
||||||
|
{{ fail "`controller.agent.tag` no longer exists. It has been renamed to `controller.agent.image.tag`" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.backup }}
|
||||||
|
{{ fail "`controller.backup` no longer exists." }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.helmtest.bats.tag }}
|
||||||
|
{{ fail "`helmtest.bats.tag` no longer exists. It has been renamed to `helmtest.bats.image.tag`" }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,41 @@
|
||||||
|
{{- if not (contains "jenkins-home" (quote .Values.persistence.volumes)) }}
|
||||||
|
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
{{- if .Values.persistence.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{ toYaml .Values.persistence.annotations | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
name: {{ template "jenkins.fullname" . }}
|
||||||
|
namespace: {{ template "jenkins.namespace" . }}
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
|
||||||
|
{{- if .Values.renderHelmLabels }}
|
||||||
|
"helm.sh/chart": "{{ template "jenkins.label" .}}"
|
||||||
|
{{- end }}
|
||||||
|
"app.kubernetes.io/managed-by": "{{ .Release.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
{{- if .Values.persistence.labels }}
|
||||||
|
{{ toYaml .Values.persistence.labels | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- if .Values.persistence.dataSource }}
|
||||||
|
dataSource:
|
||||||
|
{{ toYaml .Values.persistence.dataSource | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
accessModes:
|
||||||
|
- {{ .Values.persistence.accessMode | quote }}
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .Values.persistence.size | quote }}
|
||||||
|
{{- if .Values.persistence.storageClass }}
|
||||||
|
{{- if (eq "-" .Values.persistence.storageClass) }}
|
||||||
|
storageClassName: ""
|
||||||
|
{{- else }}
|
||||||
|
storageClassName: "{{ .Values.persistence.storageClass }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,53 @@
|
||||||
|
{{- $root := . }}
|
||||||
|
{{- if .Values.controller.sidecars.configAutoReload.enabled }}
|
||||||
|
{{- range $key, $val := .Values.controller.JCasC.configScripts }}
|
||||||
|
{{- if $val }}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ template "jenkins.casc.configName" (list (printf "config-%s" $key) $ )}}
|
||||||
|
namespace: {{ template "jenkins.namespace" $root }}
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": {{ template "jenkins.name" $root}}
|
||||||
|
{{- if $root.Values.renderHelmLabels }}
|
||||||
|
"helm.sh/chart": "{{ $root.Chart.Name }}-{{ $root.Chart.Version }}"
|
||||||
|
{{- end }}
|
||||||
|
"app.kubernetes.io/managed-by": "{{ $.Release.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ $.Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ $.Values.controller.componentName }}"
|
||||||
|
{{ template "jenkins.fullname" $root }}-jenkins-config: "true"
|
||||||
|
{{- if $root.Values.controller.JCasC.configMapAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{ toYaml $root.Values.controller.JCasC.configMapAnnotations | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
data:
|
||||||
|
{{ $key }}.yaml: |-
|
||||||
|
{{ tpl $val $| indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.JCasC.defaultConfig }}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ template "jenkins.casc.configName" (list "jcasc-config" $ )}}
|
||||||
|
namespace: {{ template "jenkins.namespace" $root }}
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": {{ template "jenkins.name" $root}}
|
||||||
|
{{- if .Values.renderHelmLabels }}
|
||||||
|
"helm.sh/chart": "{{ $root.Chart.Name }}-{{ $root.Chart.Version }}"
|
||||||
|
{{- end }}
|
||||||
|
"app.kubernetes.io/managed-by": "{{ $.Release.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ $.Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ $.Values.controller.componentName }}"
|
||||||
|
{{ template "jenkins.fullname" $root }}-jenkins-config: "true"
|
||||||
|
{{- if $root.Values.controller.JCasC.configMapAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{ toYaml $root.Values.controller.JCasC.configMapAnnotations | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
data:
|
||||||
|
jcasc-default-config.yaml: |-
|
||||||
|
{{- include "jenkins.casc.defaults" . | nindent 4 }}
|
||||||
|
{{- end}}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,43 @@
|
||||||
|
{{- if .Values.controller.agentListenerEnabled }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ template "jenkins.fullname" . }}-agent
|
||||||
|
namespace: {{ template "jenkins.namespace" . }}
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
|
||||||
|
{{- if .Values.renderHelmLabels }}
|
||||||
|
"helm.sh/chart": "{{ template "jenkins.label" .}}"
|
||||||
|
{{- end }}
|
||||||
|
"app.kubernetes.io/managed-by": "{{ .Release.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
{{- if .Values.controller.agentListenerServiceAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml .Values.controller.agentListenerServiceAnnotations | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- if .Values.controller.agentListenerExternalTrafficPolicy }}
|
||||||
|
externalTrafficPolicy: {{.Values.controller.agentListenerExternalTrafficPolicy}}
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
- port: {{ .Values.controller.agentListenerPort }}
|
||||||
|
targetPort: {{ .Values.controller.agentListenerPort }}
|
||||||
|
{{- if (and (eq .Values.controller.agentListenerServiceType "NodePort") (not (empty .Values.controller.agentListenerNodePort))) }}
|
||||||
|
nodePort: {{ .Values.controller.agentListenerNodePort }}
|
||||||
|
{{- end }}
|
||||||
|
name: agent-listener
|
||||||
|
selector:
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
type: {{ .Values.controller.agentListenerServiceType }}
|
||||||
|
{{if eq .Values.controller.agentListenerServiceType "LoadBalancer"}}
|
||||||
|
{{- if .Values.controller.agentListenerLoadBalancerSourceRanges }}
|
||||||
|
loadBalancerSourceRanges:
|
||||||
|
{{ toYaml .Values.controller.agentListenerLoadBalancerSourceRanges | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if and (eq .Values.controller.agentListenerServiceType "LoadBalancer") (.Values.controller.agentListenerLoadBalancerIP) }}
|
||||||
|
loadBalancerIP: {{ .Values.controller.agentListenerLoadBalancerIP }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,16 @@
|
||||||
|
{{- if .Values.awsSecurityGroupPolicies.enabled -}}
|
||||||
|
{{- range .Values.awsSecurityGroupPolicies.policies -}}
|
||||||
|
apiVersion: vpcresources.k8s.aws/v1beta1
|
||||||
|
kind: SecurityGroupPolicy
|
||||||
|
metadata:
|
||||||
|
name: {{ .name }}
|
||||||
|
namespace: {{ template "jenkins.namespace" $ }}
|
||||||
|
spec:
|
||||||
|
podSelector:
|
||||||
|
{{- toYaml .podSelector | nindent 6}}
|
||||||
|
securityGroups:
|
||||||
|
groupIds:
|
||||||
|
{{- toYaml .securityGroupIds | nindent 6}}
|
||||||
|
---
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
|
@ -0,0 +1,26 @@
|
||||||
|
{{- if and .Values.controller.prometheus.enabled .Values.controller.prometheus.alertingrules }}
|
||||||
|
---
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: PrometheusRule
|
||||||
|
metadata:
|
||||||
|
name: {{ template "jenkins.fullname" . }}
|
||||||
|
{{- if .Values.controller.prometheus.prometheusRuleNamespace }}
|
||||||
|
namespace: {{ .Values.controller.prometheus.prometheusRuleNamespace }}
|
||||||
|
{{- else }}
|
||||||
|
namespace: {{ template "jenkins.namespace" . }}
|
||||||
|
{{- end }}
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
|
||||||
|
{{- if .Values.renderHelmLabels }}
|
||||||
|
"helm.sh/chart": "{{ template "jenkins.label" .}}"
|
||||||
|
{{- end }}
|
||||||
|
"app.kubernetes.io/managed-by": "{{ .Release.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
{{- range $key, $val := .Values.controller.prometheus.alertingRulesAdditionalLabels }}
|
||||||
|
{{ $key }}: {{ $val | quote }}
|
||||||
|
{{- end}}
|
||||||
|
spec:
|
||||||
|
groups:
|
||||||
|
{{ toYaml .Values.controller.prometheus.alertingrules | indent 2 }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,24 @@
|
||||||
|
{{- if .Values.controller.backendconfig.enabled }}
|
||||||
|
apiVersion: {{ .Values.controller.backendconfig.apiVersion }}
|
||||||
|
kind: BackendConfig
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.controller.backendconfig.name }}
|
||||||
|
namespace: {{ template "jenkins.namespace" . }}
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
|
||||||
|
{{- if .Values.renderHelmLabels }}
|
||||||
|
"helm.sh/chart": "{{ template "jenkins.label" .}}"
|
||||||
|
{{- end }}
|
||||||
|
"app.kubernetes.io/managed-by": "{{ .Release.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
{{- if .Values.controller.backendconfig.labels }}
|
||||||
|
{{ toYaml .Values.controller.backendconfig.labels | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.backendconfig.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{ toYaml .Values.controller.backendconfig.annotations | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{ toYaml .Values.controller.backendconfig.spec | indent 2 }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,77 @@
|
||||||
|
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
|
||||||
|
{{- if .Values.controller.ingress.enabled }}
|
||||||
|
{{- if semverCompare ">=1.19-0" $kubeTargetVersion -}}
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
{{- else if semverCompare ">=1.14-0" $kubeTargetVersion -}}
|
||||||
|
apiVersion: networking.k8s.io/v1beta1
|
||||||
|
{{- else -}}
|
||||||
|
apiVersion: {{ .Values.controller.ingress.apiVersion }}
|
||||||
|
{{- end }}
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
namespace: {{ template "jenkins.namespace" . }}
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
|
||||||
|
{{- if .Values.renderHelmLabels }}
|
||||||
|
"helm.sh/chart": "{{ template "jenkins.label" .}}"
|
||||||
|
{{- end }}
|
||||||
|
"app.kubernetes.io/managed-by": "{{ .Release.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
{{- if .Values.controller.ingress.labels }}
|
||||||
|
{{ toYaml .Values.controller.ingress.labels | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.ingress.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{ toYaml .Values.controller.ingress.annotations | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
name: {{ template "jenkins.fullname" . }}
|
||||||
|
spec:
|
||||||
|
{{- if .Values.controller.ingress.ingressClassName }}
|
||||||
|
ingressClassName: {{ .Values.controller.ingress.ingressClassName | quote }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
- http:
|
||||||
|
paths:
|
||||||
|
{{- if empty (.Values.controller.ingress.paths) }}
|
||||||
|
- backend:
|
||||||
|
{{- if semverCompare ">=1.19-0" $kubeTargetVersion }}
|
||||||
|
service:
|
||||||
|
name: {{ template "jenkins.fullname" . }}
|
||||||
|
port:
|
||||||
|
number: {{ .Values.controller.servicePort }}
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
{{- else }}
|
||||||
|
serviceName: {{ template "jenkins.fullname" . }}
|
||||||
|
servicePort: {{ .Values.controller.servicePort }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.ingress.path }}
|
||||||
|
path: {{ .Values.controller.ingress.path }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- else }}
|
||||||
|
{{ tpl (toYaml .Values.controller.ingress.paths | indent 6) . }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if .Values.controller.ingress.hostName }}
|
||||||
|
host: {{ tpl .Values.controller.ingress.hostName . | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.ingress.resourceRootUrl }}
|
||||||
|
- http:
|
||||||
|
paths:
|
||||||
|
- backend:
|
||||||
|
{{- if semverCompare ">=1.19-0" $kubeTargetVersion }}
|
||||||
|
service:
|
||||||
|
name: {{ template "jenkins.fullname" . }}
|
||||||
|
port:
|
||||||
|
number: {{ .Values.controller.servicePort }}
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
{{- else }}
|
||||||
|
serviceName: {{ template "jenkins.fullname" . }}
|
||||||
|
servicePort: {{ .Values.controller.servicePort }}
|
||||||
|
{{- end }}
|
||||||
|
host: {{ tpl .Values.controller.ingress.resourceRootUrl . | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.ingress.tls }}
|
||||||
|
tls:
|
||||||
|
{{ tpl (toYaml .Values.controller.ingress.tls ) . | indent 4 }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,76 @@
|
||||||
|
{{- if .Values.networkPolicy.enabled }}
|
||||||
|
kind: NetworkPolicy
|
||||||
|
apiVersion: {{ .Values.networkPolicy.apiVersion }}
|
||||||
|
metadata:
|
||||||
|
name: "{{ .Release.Name }}-{{ .Values.controller.componentName }}"
|
||||||
|
namespace: {{ template "jenkins.namespace" . }}
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
|
||||||
|
{{- if .Values.renderHelmLabels }}
|
||||||
|
"helm.sh/chart": "{{ template "jenkins.label" .}}"
|
||||||
|
{{- end }}
|
||||||
|
"app.kubernetes.io/managed-by": "{{ .Release.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
spec:
|
||||||
|
podSelector:
|
||||||
|
matchLabels:
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
ingress:
|
||||||
|
# Allow web access to the UI
|
||||||
|
- ports:
|
||||||
|
- port: {{ .Values.controller.targetPort }}
|
||||||
|
{{- if .Values.controller.agentListenerEnabled }}
|
||||||
|
# Allow inbound connections from agents
|
||||||
|
- from:
|
||||||
|
{{- if .Values.networkPolicy.internalAgents.allowed }}
|
||||||
|
- podSelector:
|
||||||
|
matchLabels:
|
||||||
|
"jenkins/{{ .Release.Name }}-{{ .Values.agent.componentName }}": "true"
|
||||||
|
{{- range $k,$v:= .Values.networkPolicy.internalAgents.podLabels }}
|
||||||
|
{{ $k }}: {{ $v }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.networkPolicy.internalAgents.namespaceLabels }}
|
||||||
|
namespaceSelector:
|
||||||
|
matchLabels:
|
||||||
|
{{- range $k,$v:= .Values.networkPolicy.internalAgents.namespaceLabels }}
|
||||||
|
{{ $k }}: {{ $v }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if or .Values.networkPolicy.externalAgents.ipCIDR .Values.networkPolicy.externalAgents.except }}
|
||||||
|
- ipBlock:
|
||||||
|
cidr: {{ required "ipCIDR is required if you wish to allow external agents to connect to Jenkins Controller." .Values.networkPolicy.externalAgents.ipCIDR }}
|
||||||
|
{{- if .Values.networkPolicy.externalAgents.except }}
|
||||||
|
except:
|
||||||
|
{{- range .Values.networkPolicy.externalAgents.except }}
|
||||||
|
- {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
- port: {{ .Values.controller.agentListenerPort }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.agent.enabled }}
|
||||||
|
---
|
||||||
|
kind: NetworkPolicy
|
||||||
|
apiVersion: {{ .Values.networkPolicy.apiVersion }}
|
||||||
|
metadata:
|
||||||
|
name: "{{ .Release.Name }}-{{ .Values.agent.componentName }}"
|
||||||
|
namespace: {{ template "jenkins.namespace" . }}
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
|
||||||
|
{{- if .Values.renderHelmLabels }}
|
||||||
|
"helm.sh/chart": "{{ template "jenkins.label" .}}"
|
||||||
|
{{- end }}
|
||||||
|
"app.kubernetes.io/managed-by": "{{ .Release.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
spec:
|
||||||
|
podSelector:
|
||||||
|
matchLabels:
|
||||||
|
# DefaultDeny
|
||||||
|
"jenkins/{{ .Release.Name }}-{{ .Values.agent.componentName }}": "true"
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,34 @@
|
||||||
|
{{- if .Values.controller.podDisruptionBudget.enabled }}
|
||||||
|
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
|
||||||
|
{{- if semverCompare ">=1.21-0" $kubeTargetVersion -}}
|
||||||
|
apiVersion: policy/v1
|
||||||
|
{{- else if semverCompare ">=1.5-0" $kubeTargetVersion -}}
|
||||||
|
apiVersion: policy/v1beta1
|
||||||
|
{{- else -}}
|
||||||
|
apiVersion: {{ .Values.controller.podDisruptionBudget.apiVersion }}
|
||||||
|
{{- end }}
|
||||||
|
kind: PodDisruptionBudget
|
||||||
|
metadata:
|
||||||
|
name: {{ template "jenkins.fullname" . }}-pdb
|
||||||
|
namespace: {{ template "jenkins.namespace" . }}
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
|
||||||
|
{{- if .Values.renderHelmLabels }}
|
||||||
|
"helm.sh/chart": "{{ template "jenkins.label" .}}"
|
||||||
|
{{- end }}
|
||||||
|
"app.kubernetes.io/managed-by": "{{ .Release.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
{{- if .Values.controller.podDisruptionBudget.labels -}}
|
||||||
|
{{ toYaml .Values.controller.podDisruptionBudget.labels | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.podDisruptionBudget.annotations }}
|
||||||
|
annotations: {{ toYaml .Values.controller.podDisruptionBudget.annotations | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
maxUnavailable: {{ .Values.controller.podDisruptionBudget.maxUnavailable }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
"app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,30 @@
|
||||||
|
{{- if .Values.controller.googlePodMonitor.enabled }}
|
||||||
|
apiVersion: monitoring.googleapis.com/v1
|
||||||
|
kind: PodMonitoring
|
||||||
|
|
||||||
|
metadata:
|
||||||
|
name: {{ template "jenkins.fullname" . }}
|
||||||
|
{{- if .Values.controller.googlePodMonitor.serviceMonitorNamespace }}
|
||||||
|
namespace: {{ .Values.controller.googlePodMonitor.serviceMonitorNamespace }}
|
||||||
|
{{- else }}
|
||||||
|
namespace: {{ template "jenkins.namespace" . }}
|
||||||
|
{{- end }}
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
|
||||||
|
{{- if .Values.renderHelmLabels }}
|
||||||
|
"helm.sh/chart": "{{ template "jenkins.label" .}}"
|
||||||
|
{{- end }}
|
||||||
|
"app.kubernetes.io/managed-by": "{{ .Release.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
|
||||||
|
spec:
|
||||||
|
endpoints:
|
||||||
|
- interval: {{ .Values.controller.googlePodMonitor.scrapeInterval }}
|
||||||
|
port: http
|
||||||
|
path: {{ .Values.controller.jenkinsUriPrefix }}{{ .Values.controller.googlePodMonitor.scrapeEndpoint }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,34 @@
|
||||||
|
{{- if .Values.controller.route.enabled }}
|
||||||
|
apiVersion: route.openshift.io/v1
|
||||||
|
kind: Route
|
||||||
|
metadata:
|
||||||
|
namespace: {{ template "jenkins.namespace" . }}
|
||||||
|
labels:
|
||||||
|
app: {{ template "jenkins.fullname" . }}
|
||||||
|
{{- if .Values.renderHelmLabels }}
|
||||||
|
"helm.sh/chart": "{{ template "jenkins.label" .}}"
|
||||||
|
{{- end }}
|
||||||
|
release: "{{ .Release.Name }}"
|
||||||
|
heritage: "{{ .Release.Service }}"
|
||||||
|
component: "{{ .Release.Name }}-{{ .Values.controller.componentName }}"
|
||||||
|
{{- if .Values.controller.route.labels }}
|
||||||
|
{{ toYaml .Values.controller.route.labels | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.route.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{ toYaml .Values.controller.route.annotations | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
name: {{ template "jenkins.fullname" . }}
|
||||||
|
spec:
|
||||||
|
host: {{ .Values.controller.route.path }}
|
||||||
|
port:
|
||||||
|
targetPort: http
|
||||||
|
tls:
|
||||||
|
insecureEdgeTerminationPolicy: Redirect
|
||||||
|
termination: edge
|
||||||
|
to:
|
||||||
|
kind: Service
|
||||||
|
name: {{ template "jenkins.fullname" . }}
|
||||||
|
weight: 100
|
||||||
|
wildcardPolicy: None
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,56 @@
|
||||||
|
{{- if .Values.controller.secondaryingress.enabled }}
|
||||||
|
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
|
||||||
|
{{- $serviceName := include "jenkins.fullname" . -}}
|
||||||
|
{{- $servicePort := .Values.controller.servicePort -}}
|
||||||
|
{{- if semverCompare ">=1.19-0" $kubeTargetVersion -}}
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
{{- else if semverCompare ">=1.14-0" $kubeTargetVersion -}}
|
||||||
|
apiVersion: networking.k8s.io/v1beta1
|
||||||
|
{{- else -}}
|
||||||
|
apiVersion: {{ .Values.controller.secondaryingress.apiVersion }}
|
||||||
|
{{- end }}
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
namespace: {{ template "jenkins.namespace" . }}
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
|
||||||
|
{{- if .Values.renderHelmLabels }}
|
||||||
|
"helm.sh/chart": "{{ template "jenkins.label" .}}"
|
||||||
|
{{- end }}
|
||||||
|
"app.kubernetes.io/managed-by": "{{ .Release.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
{{- if .Values.controller.secondaryingress.labels -}}
|
||||||
|
{{ toYaml .Values.controller.secondaryingress.labels | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.secondaryingress.annotations }}
|
||||||
|
annotations: {{ toYaml .Values.controller.secondaryingress.annotations | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
name: {{ template "jenkins.fullname" . }}-secondary
|
||||||
|
spec:
|
||||||
|
{{- if .Values.controller.secondaryingress.ingressClassName }}
|
||||||
|
ingressClassName: {{ .Values.controller.secondaryingress.ingressClassName | quote }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
- host: {{ .Values.controller.secondaryingress.hostName }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
{{- range .Values.controller.secondaryingress.paths }}
|
||||||
|
- path: {{ . | quote }}
|
||||||
|
backend:
|
||||||
|
{{ if semverCompare ">=1.19-0" $kubeTargetVersion }}
|
||||||
|
service:
|
||||||
|
name: {{ $serviceName }}
|
||||||
|
port:
|
||||||
|
number: {{ $servicePort }}
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
{{ else }}
|
||||||
|
serviceName: {{ $serviceName }}
|
||||||
|
servicePort: {{ $servicePort }}
|
||||||
|
{{ end }}
|
||||||
|
{{- end}}
|
||||||
|
{{- if .Values.controller.secondaryingress.tls }}
|
||||||
|
tls:
|
||||||
|
{{ toYaml .Values.controller.secondaryingress.tls | indent 4 }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,45 @@
|
||||||
|
{{- if and .Values.controller.prometheus.enabled }}
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: ServiceMonitor
|
||||||
|
|
||||||
|
metadata:
|
||||||
|
name: {{ template "jenkins.fullname" . }}
|
||||||
|
{{- if .Values.controller.prometheus.serviceMonitorNamespace }}
|
||||||
|
namespace: {{ .Values.controller.prometheus.serviceMonitorNamespace }}
|
||||||
|
{{- else }}
|
||||||
|
namespace: {{ template "jenkins.namespace" . }}
|
||||||
|
{{- end }}
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
|
||||||
|
{{- if .Values.renderHelmLabels }}
|
||||||
|
"helm.sh/chart": "{{ template "jenkins.label" .}}"
|
||||||
|
{{- end }}
|
||||||
|
"app.kubernetes.io/managed-by": "{{ .Release.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
{{- range $key, $val := .Values.controller.prometheus.serviceMonitorAdditionalLabels }}
|
||||||
|
{{ $key }}: {{ $val | quote }}
|
||||||
|
{{- end}}
|
||||||
|
|
||||||
|
spec:
|
||||||
|
endpoints:
|
||||||
|
- interval: {{ .Values.controller.prometheus.scrapeInterval }}
|
||||||
|
port: http
|
||||||
|
path: {{ .Values.controller.jenkinsUriPrefix }}{{ .Values.controller.prometheus.scrapeEndpoint }}
|
||||||
|
{{- with .Values.controller.prometheus.relabelings }}
|
||||||
|
relabelings:
|
||||||
|
{{- toYaml . | nindent 6 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.controller.prometheus.metricRelabelings }}
|
||||||
|
metricRelabelings:
|
||||||
|
{{- toYaml . | nindent 6 }}
|
||||||
|
{{- end }}
|
||||||
|
jobLabel: {{ template "jenkins.fullname" . }}
|
||||||
|
namespaceSelector:
|
||||||
|
matchNames:
|
||||||
|
- "{{ template "jenkins.namespace" $ }}"
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,424 @@
|
||||||
|
{{- if .Capabilities.APIVersions.Has "apps/v1" }}
|
||||||
|
apiVersion: apps/v1
|
||||||
|
{{- else }}
|
||||||
|
apiVersion: apps/v1beta1
|
||||||
|
{{- end }}
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: {{ template "jenkins.fullname" . }}
|
||||||
|
namespace: {{ template "jenkins.namespace" . }}
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
|
||||||
|
{{- if .Values.renderHelmLabels }}
|
||||||
|
"helm.sh/chart": "{{ template "jenkins.label" .}}"
|
||||||
|
{{- end }}
|
||||||
|
"app.kubernetes.io/managed-by": "{{ .Release.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
{{- range $key, $val := .Values.controller.statefulSetLabels }}
|
||||||
|
{{ $key }}: {{ $val | quote }}
|
||||||
|
{{- end}}
|
||||||
|
{{- if .Values.controller.statefulSetAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{ toYaml .Values.controller.statefulSetAnnotations | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
serviceName: {{ template "jenkins.fullname" . }}
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
{{- if .Values.controller.updateStrategy }}
|
||||||
|
updateStrategy:
|
||||||
|
{{ toYaml .Values.controller.updateStrategy | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
|
||||||
|
"app.kubernetes.io/managed-by": "{{ .Release.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
{{- range $key, $val := .Values.controller.podLabels }}
|
||||||
|
{{ $key }}: {{ $val | quote }}
|
||||||
|
{{- end}}
|
||||||
|
annotations:
|
||||||
|
checksum/config: {{ include (print $.Template.BasePath "/config.yaml") . | sha256sum }}
|
||||||
|
{{- if .Values.controller.initScripts }}
|
||||||
|
checksum/config-init-scripts: {{ include (print $.Template.BasePath "/config-init-scripts.yaml") . | sha256sum }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.podAnnotations }}
|
||||||
|
{{ tpl (toYaml .Values.controller.podAnnotations | indent 8) . }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- if .Values.controller.schedulerName }}
|
||||||
|
schedulerName: {{ .Values.controller.schedulerName }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{ toYaml .Values.controller.nodeSelector | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{ toYaml .Values.controller.tolerations | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{ toYaml .Values.controller.affinity | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.topologySpreadConstraints }}
|
||||||
|
topologySpreadConstraints:
|
||||||
|
{{ toYaml .Values.controller.topologySpreadConstraints | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if quote .Values.controller.terminationGracePeriodSeconds }}
|
||||||
|
terminationGracePeriodSeconds: {{ .Values.controller.terminationGracePeriodSeconds }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.priorityClassName }}
|
||||||
|
priorityClassName: {{ .Values.controller.priorityClassName }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.shareProcessNamespace }}
|
||||||
|
shareProcessNamespace: true
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.usePodSecurityContext }}
|
||||||
|
securityContext:
|
||||||
|
{{- if kindIs "map" .Values.controller.podSecurityContextOverride }}
|
||||||
|
{{- tpl (toYaml .Values.controller.podSecurityContextOverride | nindent 8) . -}}
|
||||||
|
{{- else }}
|
||||||
|
{{/* The rest of this section should be replaced with the contents of this comment one the runAsUser, fsGroup, and securityContextCapabilities Helm chart values have been removed:
|
||||||
|
runAsUser: 1000
|
||||||
|
fsGroup: 1000
|
||||||
|
runAsNonRoot: true
|
||||||
|
*/}}
|
||||||
|
runAsUser: {{ default 0 .Values.controller.runAsUser }}
|
||||||
|
{{- if and (.Values.controller.runAsUser) (.Values.controller.fsGroup) }}
|
||||||
|
{{- if not (eq (int .Values.controller.runAsUser) 0) }}
|
||||||
|
fsGroup: {{ .Values.controller.fsGroup }}
|
||||||
|
runAsNonRoot: true
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.securityContextCapabilities }}
|
||||||
|
capabilities:
|
||||||
|
{{- toYaml .Values.controller.securityContextCapabilities | nindent 10 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
serviceAccountName: "{{ template "jenkins.serviceAccountName" . }}"
|
||||||
|
{{- if .Values.controller.hostNetworking }}
|
||||||
|
hostNetwork: true
|
||||||
|
dnsPolicy: ClusterFirstWithHostNet
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.hostAliases }}
|
||||||
|
hostAliases:
|
||||||
|
{{- toYaml .Values.controller.hostAliases | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
initContainers:
|
||||||
|
{{- if .Values.controller.customInitContainers }}
|
||||||
|
{{ tpl (toYaml .Values.controller.customInitContainers) . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.controller.sidecars.configAutoReload.enabled }}
|
||||||
|
{{- include "jenkins.configReloadContainer" (list $ "config-reload-init" "init") | nindent 8 }}
|
||||||
|
{{- end}}
|
||||||
|
|
||||||
|
- name: "init"
|
||||||
|
image: "{{ .Values.controller.image.registry }}/{{ .Values.controller.image.repository }}:{{- include "controller.image.tag" . -}}"
|
||||||
|
imagePullPolicy: "{{ .Values.controller.image.pullPolicy }}"
|
||||||
|
{{- if .Values.controller.containerSecurityContext }}
|
||||||
|
securityContext: {{- toYaml .Values.controller.containerSecurityContext | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
command: [ "sh", "/var/jenkins_config/apply_config.sh" ]
|
||||||
|
{{- if .Values.controller.initContainerEnvFrom }}
|
||||||
|
envFrom:
|
||||||
|
{{ (tpl (toYaml .Values.controller.initContainerEnvFrom) .) | indent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.initContainerEnv }}
|
||||||
|
env:
|
||||||
|
{{ (tpl (toYaml .Values.controller.initContainerEnv) .) | indent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
resources:
|
||||||
|
{{- if .Values.controller.initContainerResources }}
|
||||||
|
{{ toYaml .Values.controller.initContainerResources | indent 12 }}
|
||||||
|
{{- else }}
|
||||||
|
{{ toYaml .Values.controller.resources | indent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
volumeMounts:
|
||||||
|
{{- if .Values.persistence.mounts }}
|
||||||
|
{{ toYaml .Values.persistence.mounts | indent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
- mountPath: {{ .Values.controller.jenkinsHome }}
|
||||||
|
name: jenkins-home
|
||||||
|
{{- if .Values.persistence.subPath }}
|
||||||
|
subPath: {{ .Values.persistence.subPath }}
|
||||||
|
{{- end }}
|
||||||
|
- mountPath: /var/jenkins_config
|
||||||
|
name: jenkins-config
|
||||||
|
{{- if .Values.controller.installPlugins }}
|
||||||
|
{{- if .Values.controller.overwritePluginsFromImage }}
|
||||||
|
- mountPath: {{ .Values.controller.jenkinsRef }}/plugins
|
||||||
|
name: plugins
|
||||||
|
{{- end }}
|
||||||
|
- mountPath: /var/jenkins_plugins
|
||||||
|
name: plugin-dir
|
||||||
|
- mountPath: /tmp
|
||||||
|
name: tmp-volume
|
||||||
|
{{- end }}
|
||||||
|
{{- if or .Values.controller.initScripts .Values.controller.initConfigMap }}
|
||||||
|
- mountPath: {{ .Values.controller.jenkinsHome }}/init.groovy.d
|
||||||
|
name: init-scripts
|
||||||
|
{{- end }}
|
||||||
|
{{- if and .Values.controller.httpsKeyStore.enable (not .Values.controller.httpsKeyStore.disableSecretMount) }}
|
||||||
|
{{- $httpsJKSDirPath := printf "%s" .Values.controller.httpsKeyStore.path }}
|
||||||
|
- mountPath: {{ $httpsJKSDirPath }}
|
||||||
|
name: jenkins-https-keystore
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: jenkins
|
||||||
|
image: "{{ .Values.controller.image.registry }}/{{ .Values.controller.image.repository }}:{{- include "controller.image.tag" . -}}"
|
||||||
|
imagePullPolicy: "{{ .Values.controller.image.pullPolicy }}"
|
||||||
|
{{- if .Values.controller.containerSecurityContext }}
|
||||||
|
securityContext: {{- toYaml .Values.controller.containerSecurityContext | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.overrideArgs }}
|
||||||
|
args: [
|
||||||
|
{{- range $overrideArg := .Values.controller.overrideArgs }}
|
||||||
|
"{{- tpl $overrideArg $ }}",
|
||||||
|
{{- end }}
|
||||||
|
]
|
||||||
|
{{- else if .Values.controller.httpsKeyStore.enable }}
|
||||||
|
{{- $httpsJKSFilePath := printf "%s/%s" .Values.controller.httpsKeyStore.path .Values.controller.httpsKeyStore.fileName }}
|
||||||
|
args: [ "--httpPort={{.Values.controller.httpsKeyStore.httpPort}}", "--httpsPort={{.Values.controller.targetPort}}", '--httpsKeyStore={{ $httpsJKSFilePath }}', "--httpsKeyStorePassword=$(JENKINS_HTTPS_KEYSTORE_PASSWORD)" ]
|
||||||
|
{{- else }}
|
||||||
|
args: [ "--httpPort={{.Values.controller.targetPort}}"]
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.lifecycle }}
|
||||||
|
lifecycle:
|
||||||
|
{{ toYaml .Values.controller.lifecycle | indent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.terminationMessagePath }}
|
||||||
|
terminationMessagePath: {{ .Values.controller.terminationMessagePath }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.terminationMessagePolicy }}
|
||||||
|
terminationMessagePolicy: {{ .Values.controller.terminationMessagePolicy }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.containerEnvFrom }}
|
||||||
|
envFrom:
|
||||||
|
{{ (tpl ( toYaml .Values.controller.containerEnvFrom) .) | indent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
env:
|
||||||
|
{{- if .Values.controller.containerEnv }}
|
||||||
|
{{ (tpl ( toYaml .Values.controller.containerEnv) .) | indent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if or .Values.controller.additionalSecrets .Values.controller.existingSecret .Values.controller.additionalExistingSecrets .Values.controller.admin.createSecret }}
|
||||||
|
- name: SECRETS
|
||||||
|
value: /run/secrets/additional
|
||||||
|
{{- end }}
|
||||||
|
- name: POD_NAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.name
|
||||||
|
- name: JAVA_OPTS
|
||||||
|
value: >-
|
||||||
|
{{ if .Values.controller.sidecars.configAutoReload.enabled }} -Dcasc.reload.token=$(POD_NAME) {{ end }}{{ default "" .Values.controller.javaOpts }}
|
||||||
|
- name: JENKINS_OPTS
|
||||||
|
value: >-
|
||||||
|
{{ if .Values.controller.jenkinsUriPrefix }}--prefix={{ .Values.controller.jenkinsUriPrefix }} {{ end }} --webroot=/var/jenkins_cache/war {{ default "" .Values.controller.jenkinsOpts}}
|
||||||
|
- name: JENKINS_SLAVE_AGENT_PORT
|
||||||
|
value: "{{ .Values.controller.agentListenerPort }}"
|
||||||
|
{{- if .Values.controller.httpsKeyStore.enable }}
|
||||||
|
- name: JENKINS_HTTPS_KEYSTORE_PASSWORD
|
||||||
|
{{- if not .Values.controller.httpsKeyStore.disableSecretMount }}
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ if .Values.controller.httpsKeyStore.jenkinsHttpsJksPasswordSecretName }} {{ .Values.controller.httpsKeyStore.jenkinsHttpsJksPasswordSecretName }} {{ else if .Values.controller.httpsKeyStore.jenkinsHttpsJksSecretName }} {{ .Values.controller.httpsKeyStore.jenkinsHttpsJksSecretName }} {{ else }} {{ template "jenkins.fullname" . }}-https-jks {{ end }}
|
||||||
|
key: "{{ .Values.controller.httpsKeyStore.jenkinsHttpsJksPasswordSecretKey }}"
|
||||||
|
{{- else }}
|
||||||
|
value: {{ .Values.controller.httpsKeyStore.password }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
- name: CASC_JENKINS_CONFIG
|
||||||
|
value: {{ .Values.controller.sidecars.configAutoReload.folder | default (printf "%s/casc_configs" (.Values.controller.jenkinsRef)) }}{{- if .Values.controller.JCasC.configUrls }},{{ join "," .Values.controller.JCasC.configUrls }}{{- end }}
|
||||||
|
ports:
|
||||||
|
{{- if .Values.controller.httpsKeyStore.enable }}
|
||||||
|
- containerPort: {{.Values.controller.httpsKeyStore.httpPort}}
|
||||||
|
{{- else }}
|
||||||
|
- containerPort: {{.Values.controller.targetPort}}
|
||||||
|
{{- end }}
|
||||||
|
name: http
|
||||||
|
- containerPort: {{ .Values.controller.agentListenerPort }}
|
||||||
|
name: agent-listener
|
||||||
|
{{- if .Values.controller.agentListenerHostPort }}
|
||||||
|
hostPort: {{ .Values.controller.agentListenerHostPort }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.jmxPort }}
|
||||||
|
- containerPort: {{ .Values.controller.jmxPort }}
|
||||||
|
name: jmx
|
||||||
|
{{- end }}
|
||||||
|
{{- range $index, $port := .Values.controller.extraPorts }}
|
||||||
|
- containerPort: {{ $port.port }}
|
||||||
|
name: {{ $port.name }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if and .Values.controller.healthProbes .Values.controller.probes}}
|
||||||
|
{{- if semverCompare ">=1.16-0" .Capabilities.KubeVersion.GitVersion }}
|
||||||
|
startupProbe:
|
||||||
|
{{ tpl (toYaml .Values.controller.probes.startupProbe | indent 12) .}}
|
||||||
|
{{- end }}
|
||||||
|
livenessProbe:
|
||||||
|
{{ tpl (toYaml .Values.controller.probes.livenessProbe | indent 12) .}}
|
||||||
|
readinessProbe:
|
||||||
|
{{ tpl (toYaml .Values.controller.probes.readinessProbe | indent 12) .}}
|
||||||
|
{{- end }}
|
||||||
|
resources:
|
||||||
|
{{ toYaml .Values.controller.resources | indent 12 }}
|
||||||
|
volumeMounts:
|
||||||
|
{{- if .Values.persistence.mounts }}
|
||||||
|
{{ toYaml .Values.persistence.mounts | indent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if and .Values.controller.httpsKeyStore.enable (not .Values.controller.httpsKeyStore.disableSecretMount) }}
|
||||||
|
{{- $httpsJKSDirPath := printf "%s" .Values.controller.httpsKeyStore.path }}
|
||||||
|
- mountPath: {{ $httpsJKSDirPath }}
|
||||||
|
name: jenkins-https-keystore
|
||||||
|
{{- end }}
|
||||||
|
- mountPath: {{ .Values.controller.jenkinsHome }}
|
||||||
|
name: jenkins-home
|
||||||
|
readOnly: false
|
||||||
|
{{- if .Values.persistence.subPath }}
|
||||||
|
subPath: {{ .Values.persistence.subPath }}
|
||||||
|
{{- end }}
|
||||||
|
- mountPath: /var/jenkins_config
|
||||||
|
name: jenkins-config
|
||||||
|
readOnly: true
|
||||||
|
{{- if .Values.controller.installPlugins }}
|
||||||
|
- mountPath: {{ .Values.controller.jenkinsRef }}/plugins/
|
||||||
|
name: plugin-dir
|
||||||
|
readOnly: false
|
||||||
|
{{- end }}
|
||||||
|
{{- if or .Values.controller.initScripts .Values.controller.initConfigMap }}
|
||||||
|
- mountPath: {{ .Values.controller.jenkinsHome }}/init.groovy.d
|
||||||
|
name: init-scripts
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.sidecars.configAutoReload.enabled }}
|
||||||
|
- name: sc-config-volume
|
||||||
|
mountPath: {{ .Values.controller.sidecars.configAutoReload.folder | default (printf "%s/casc_configs" (.Values.controller.jenkinsRef)) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if or .Values.controller.additionalSecrets .Values.controller.existingSecret .Values.controller.additionalExistingSecrets .Values.controller.admin.createSecret }}
|
||||||
|
- name: jenkins-secrets
|
||||||
|
mountPath: /run/secrets/additional
|
||||||
|
readOnly: true
|
||||||
|
{{- end }}
|
||||||
|
- name: jenkins-cache
|
||||||
|
mountPath: /var/jenkins_cache
|
||||||
|
- mountPath: /tmp
|
||||||
|
name: tmp-volume
|
||||||
|
|
||||||
|
{{- if .Values.controller.sidecars.configAutoReload.enabled }}
|
||||||
|
{{- include "jenkins.configReloadContainer" (list $ "config-reload" "sidecar") | nindent 8 }}
|
||||||
|
{{- end}}
|
||||||
|
|
||||||
|
|
||||||
|
{{- if .Values.controller.sidecars.additionalSidecarContainers}}
|
||||||
|
{{ tpl (toYaml .Values.controller.sidecars.additionalSidecarContainers | indent 8) .}}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
{{- if .Values.persistence.volumes }}
|
||||||
|
{{ tpl (toYaml .Values.persistence.volumes | indent 6) . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.sidecars.configAutoReload.logging.configuration.override }}
|
||||||
|
- name: auto-reload-config
|
||||||
|
configMap:
|
||||||
|
name: {{ template "jenkins.fullname" . }}-auto-reload-config
|
||||||
|
- name: auto-reload-config-logs
|
||||||
|
emptyDir: {}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.installPlugins }}
|
||||||
|
{{- if .Values.controller.overwritePluginsFromImage }}
|
||||||
|
- name: plugins
|
||||||
|
emptyDir: {}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if and .Values.controller.initScripts .Values.controller.initConfigMap }}
|
||||||
|
- name: init-scripts
|
||||||
|
projected:
|
||||||
|
sources:
|
||||||
|
- configMap:
|
||||||
|
name: {{ template "jenkins.fullname" . }}-init-scripts
|
||||||
|
- configMap:
|
||||||
|
name: {{ .Values.controller.initConfigMap }}
|
||||||
|
{{- else if .Values.controller.initConfigMap }}
|
||||||
|
- name: init-scripts
|
||||||
|
configMap:
|
||||||
|
name: {{ .Values.controller.initConfigMap }}
|
||||||
|
{{- else if .Values.controller.initScripts }}
|
||||||
|
- name: init-scripts
|
||||||
|
configMap:
|
||||||
|
name: {{ template "jenkins.fullname" . }}-init-scripts
|
||||||
|
{{- end }}
|
||||||
|
- name: jenkins-config
|
||||||
|
configMap:
|
||||||
|
name: {{ template "jenkins.fullname" . }}
|
||||||
|
{{- if .Values.controller.installPlugins }}
|
||||||
|
- name: plugin-dir
|
||||||
|
emptyDir: {}
|
||||||
|
{{- end }}
|
||||||
|
{{- if or .Values.controller.additionalSecrets .Values.controller.existingSecret .Values.controller.additionalExistingSecrets .Values.controller.admin.createSecret }}
|
||||||
|
- name: jenkins-secrets
|
||||||
|
projected:
|
||||||
|
sources:
|
||||||
|
{{- if .Values.controller.additionalSecrets }}
|
||||||
|
- secret:
|
||||||
|
name: {{ template "jenkins.fullname" . }}-additional-secrets
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.additionalExistingSecrets }}
|
||||||
|
{{- range $key, $value := .Values.controller.additionalExistingSecrets }}
|
||||||
|
- secret:
|
||||||
|
name: {{ tpl $value.name $ }}
|
||||||
|
items:
|
||||||
|
- key: {{ tpl $value.keyName $ }}
|
||||||
|
path: {{ tpl $value.name $ }}-{{ tpl $value.keyName $ }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.admin.createSecret }}
|
||||||
|
- secret:
|
||||||
|
name: {{ .Values.controller.admin.existingSecret | default (include "jenkins.fullname" .) }}
|
||||||
|
items:
|
||||||
|
- key: {{ .Values.controller.admin.userKey | default "jenkins-admin-user" }}
|
||||||
|
path: chart-admin-username
|
||||||
|
- key: {{ .Values.controller.admin.passwordKey | default "jenkins-admin-password" }}
|
||||||
|
path: chart-admin-password
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.existingSecret }}
|
||||||
|
- secret:
|
||||||
|
name: {{ .Values.controller.existingSecret }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
- name: jenkins-cache
|
||||||
|
emptyDir: {}
|
||||||
|
{{- if not (contains "jenkins-home" (quote .Values.persistence.volumes)) }}
|
||||||
|
- name: jenkins-home
|
||||||
|
{{- if .Values.persistence.enabled }}
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: {{ .Values.persistence.existingClaim | default (include "jenkins.fullname" .) }}
|
||||||
|
{{- else }}
|
||||||
|
emptyDir: {}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end }}
|
||||||
|
- name: sc-config-volume
|
||||||
|
emptyDir: {}
|
||||||
|
- name: tmp-volume
|
||||||
|
emptyDir: {}
|
||||||
|
|
||||||
|
{{- if and .Values.controller.httpsKeyStore.enable (not .Values.controller.httpsKeyStore.disableSecretMount) }}
|
||||||
|
- name: jenkins-https-keystore
|
||||||
|
secret:
|
||||||
|
secretName: {{ if .Values.controller.httpsKeyStore.jenkinsHttpsJksSecretName }} {{ .Values.controller.httpsKeyStore.jenkinsHttpsJksSecretName }} {{ else }} {{ template "jenkins.fullname" . }}-https-jks {{ end }}
|
||||||
|
items:
|
||||||
|
- key: {{ .Values.controller.httpsKeyStore.jenkinsHttpsJksSecretKey }}
|
||||||
|
path: {{ .Values.controller.httpsKeyStore.fileName }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.controller.imagePullSecretName }}
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: {{ .Values.controller.imagePullSecretName }}
|
||||||
|
{{- end -}}
|
|
@ -0,0 +1,56 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{template "jenkins.fullname" . }}
|
||||||
|
namespace: {{ template "jenkins.namespace" . }}
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
|
||||||
|
{{- if .Values.renderHelmLabels }}
|
||||||
|
"helm.sh/chart": "{{ template "jenkins.label" .}}"
|
||||||
|
{{- end }}
|
||||||
|
"app.kubernetes.io/managed-by": "{{ .Release.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
{{- if .Values.controller.serviceLabels }}
|
||||||
|
{{ toYaml .Values.controller.serviceLabels | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.serviceAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{ toYaml .Values.controller.serviceAnnotations | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- if .Values.controller.serviceExternalTrafficPolicy }}
|
||||||
|
externalTrafficPolicy: {{.Values.controller.serviceExternalTrafficPolicy}}
|
||||||
|
{{- end }}
|
||||||
|
{{- if (and (eq .Values.controller.serviceType "ClusterIP") (not (empty .Values.controller.clusterIP))) }}
|
||||||
|
clusterIP: {{.Values.controller.clusterIP}}
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
- port: {{.Values.controller.servicePort}}
|
||||||
|
name: http
|
||||||
|
targetPort: {{ .Values.controller.targetPort }}
|
||||||
|
{{- if (and (eq .Values.controller.serviceType "NodePort") (not (empty .Values.controller.nodePort))) }}
|
||||||
|
nodePort: {{.Values.controller.nodePort}}
|
||||||
|
{{- end }}
|
||||||
|
{{- range $index, $port := .Values.controller.extraPorts }}
|
||||||
|
- port: {{ $port.port }}
|
||||||
|
name: {{ $port.name }}
|
||||||
|
{{- if $port.targetPort }}
|
||||||
|
targetPort: {{ $port.targetPort }}
|
||||||
|
{{- else }}
|
||||||
|
targetPort: {{ $port.port }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end }}
|
||||||
|
selector:
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
type: {{.Values.controller.serviceType}}
|
||||||
|
{{if eq .Values.controller.serviceType "LoadBalancer"}}
|
||||||
|
{{- if .Values.controller.loadBalancerSourceRanges }}
|
||||||
|
loadBalancerSourceRanges:
|
||||||
|
{{ toYaml .Values.controller.loadBalancerSourceRanges | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{if .Values.controller.loadBalancerIP}}
|
||||||
|
loadBalancerIP: {{.Values.controller.loadBalancerIP}}
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
|
@ -0,0 +1,149 @@
|
||||||
|
{{ if .Values.rbac.create }}
|
||||||
|
{{- $serviceName := include "jenkins.fullname" . -}}
|
||||||
|
|
||||||
|
# This role is used to allow Jenkins scheduling of agents via Kubernetes plugin.
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: {{ $serviceName }}-schedule-agents
|
||||||
|
namespace: {{ template "jenkins.agent.namespace" . }}
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
|
||||||
|
{{- if .Values.renderHelmLabels }}
|
||||||
|
"helm.sh/chart": "{{ template "jenkins.label" .}}"
|
||||||
|
{{- end }}
|
||||||
|
"app.kubernetes.io/managed-by": "{{ .Release.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
rules:
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods", "pods/exec", "pods/log", "persistentvolumeclaims", "events"]
|
||||||
|
verbs: ["get", "list", "watch"]
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods", "pods/exec", "persistentvolumeclaims"]
|
||||||
|
verbs: ["create", "delete", "deletecollection", "patch", "update"]
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# We bind the role to the Jenkins service account. The role binding is created in the namespace
|
||||||
|
# where the agents are supposed to run.
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: {{ $serviceName }}-schedule-agents
|
||||||
|
namespace: {{ template "jenkins.agent.namespace" . }}
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
|
||||||
|
{{- if .Values.renderHelmLabels }}
|
||||||
|
"helm.sh/chart": "{{ template "jenkins.label" .}}"
|
||||||
|
{{- end }}
|
||||||
|
"app.kubernetes.io/managed-by": "{{ .Release.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: {{ $serviceName }}-schedule-agents
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: {{ template "jenkins.serviceAccountName" .}}
|
||||||
|
namespace: {{ template "jenkins.namespace" . }}
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
{{- if .Values.rbac.readSecrets }}
|
||||||
|
# This is needed if you want to use https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/
|
||||||
|
# as it needs permissions to get/watch/list Secrets
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: {{ template "jenkins.fullname" . }}-read-secrets
|
||||||
|
namespace: {{ template "jenkins.namespace" . }}
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
|
||||||
|
{{- if .Values.renderHelmLabels }}
|
||||||
|
"helm.sh/chart": "{{ template "jenkins.label" .}}"
|
||||||
|
{{- end }}
|
||||||
|
"app.kubernetes.io/managed-by": "{{ .Release.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
rules:
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["secrets"]
|
||||||
|
verbs: ["get", "watch", "list"]
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: {{ $serviceName }}-read-secrets
|
||||||
|
namespace: {{ template "jenkins.namespace" . }}
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
|
||||||
|
{{- if .Values.renderHelmLabels }}
|
||||||
|
"helm.sh/chart": "{{ template "jenkins.label" .}}"
|
||||||
|
{{- end }}
|
||||||
|
"app.kubernetes.io/managed-by": "{{ .Release.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: {{ template "jenkins.fullname" . }}-read-secrets
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: {{ template "jenkins.serviceAccountName" . }}
|
||||||
|
namespace: {{ template "jenkins.namespace" . }}
|
||||||
|
|
||||||
|
---
|
||||||
|
{{- end}}
|
||||||
|
|
||||||
|
{{- if .Values.controller.sidecars.configAutoReload.enabled }}
|
||||||
|
# The sidecar container which is responsible for reloading configuration changes
|
||||||
|
# needs permissions to watch ConfigMaps
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: {{ template "jenkins.fullname" . }}-casc-reload
|
||||||
|
namespace: {{ template "jenkins.namespace" . }}
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
|
||||||
|
{{- if .Values.renderHelmLabels }}
|
||||||
|
"helm.sh/chart": "{{ template "jenkins.label" .}}"
|
||||||
|
{{- end }}
|
||||||
|
"app.kubernetes.io/managed-by": "{{ .Release.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
rules:
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["configmaps"]
|
||||||
|
verbs: ["get", "watch", "list"]
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: {{ $serviceName }}-watch-configmaps
|
||||||
|
namespace: {{ template "jenkins.namespace" . }}
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
|
||||||
|
{{- if .Values.renderHelmLabels }}
|
||||||
|
"helm.sh/chart": "{{ template "jenkins.label" .}}"
|
||||||
|
{{- end }}
|
||||||
|
"app.kubernetes.io/managed-by": "{{ .Release.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: {{ template "jenkins.fullname" . }}-casc-reload
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: {{ template "jenkins.serviceAccountName" . }}
|
||||||
|
namespace: {{ template "jenkins.namespace" . }}
|
||||||
|
|
||||||
|
{{- end}}
|
||||||
|
|
||||||
|
{{ end }}
|
|
@ -0,0 +1,21 @@
|
||||||
|
{{- if .Values.controller.additionalSecrets -}}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ template "jenkins.fullname" . }}-additional-secrets
|
||||||
|
namespace: {{ template "jenkins.namespace" . }}
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
|
||||||
|
{{- if .Values.renderHelmLabels }}
|
||||||
|
"helm.sh/chart": "{{ template "jenkins.label" .}}"
|
||||||
|
{{- end }}
|
||||||
|
"app.kubernetes.io/managed-by": "{{ .Release.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
{{- range .Values.controller.additionalSecrets }}
|
||||||
|
{{ .name }}: {{ .value | b64enc }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,29 @@
|
||||||
|
{{- if .Values.controller.secretClaims -}}
|
||||||
|
{{- $r := .Release -}}
|
||||||
|
{{- $v := .Values -}}
|
||||||
|
{{- $chart := printf "%s-%s" .Chart.Name .Chart.Version -}}
|
||||||
|
{{- $namespace := include "jenkins.namespace" . -}}
|
||||||
|
{{- $serviceName := include "jenkins.fullname" . -}}
|
||||||
|
{{ range .Values.controller.secretClaims }}
|
||||||
|
---
|
||||||
|
kind: SecretClaim
|
||||||
|
apiVersion: vaultproject.io/v1
|
||||||
|
metadata:
|
||||||
|
name: {{ $serviceName }}-{{ .name | default .path | lower }}
|
||||||
|
namespace: {{ $namespace }}
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": '{{ $serviceName }}'
|
||||||
|
{{- if $v.renderHelmLabels }}
|
||||||
|
"helm.sh/chart": "{{ $chart }}"
|
||||||
|
{{- end }}
|
||||||
|
"app.kubernetes.io/managed-by": "{{ $r.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ $r.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ $v.controller.componentName }}"
|
||||||
|
spec:
|
||||||
|
type: {{ .type | default "Opaque" }}
|
||||||
|
path: {{ .path }}
|
||||||
|
{{- if .renew }}
|
||||||
|
renew: {{ .renew }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,20 @@
|
||||||
|
{{- if and .Values.controller.httpsKeyStore.enable ( not .Values.controller.httpsKeyStore.jenkinsHttpsJksSecretName ) (not .Values.controller.httpsKeyStore.disableSecretMount) -}}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ template "jenkins.fullname" . }}-https-jks
|
||||||
|
namespace: {{ template "jenkins.namespace" . }}
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
|
||||||
|
{{- if .Values.renderHelmLabels }}
|
||||||
|
"helm.sh/chart": "{{ template "jenkins.label" .}}"
|
||||||
|
{{- end }}
|
||||||
|
"app.kubernetes.io/managed-by": "{{ .Release.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
jenkins-jks-file: |
|
||||||
|
{{ .Values.controller.httpsKeyStore.jenkinsKeyStoreBase64Encoded | indent 4 }}
|
||||||
|
https-jks-password: {{ .Values.controller.httpsKeyStore.password | b64enc }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,20 @@
|
||||||
|
{{- if and (not .Values.controller.admin.existingSecret) (.Values.controller.admin.createSecret) -}}
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ template "jenkins.fullname" . }}
|
||||||
|
namespace: {{ template "jenkins.namespace" . }}
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
|
||||||
|
{{- if .Values.renderHelmLabels }}
|
||||||
|
"helm.sh/chart": "{{ template "jenkins.label" .}}"
|
||||||
|
{{- end }}
|
||||||
|
"app.kubernetes.io/managed-by": "{{ .Release.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
jenkins-admin-password: {{ template "jenkins.password" . }}
|
||||||
|
jenkins-admin-user: {{ .Values.controller.admin.username | b64enc | quote }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,26 @@
|
||||||
|
{{ if .Values.serviceAccountAgent.create }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: {{ include "jenkins.serviceAccountAgentName" . }}
|
||||||
|
namespace: {{ template "jenkins.agent.namespace" . }}
|
||||||
|
{{- if .Values.serviceAccountAgent.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{ tpl (toYaml .Values.serviceAccountAgent.annotations) . | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
|
||||||
|
{{- if .Values.renderHelmLabels }}
|
||||||
|
"helm.sh/chart": "{{ template "jenkins.label" .}}"
|
||||||
|
{{- end }}
|
||||||
|
"app.kubernetes.io/managed-by": "{{ .Release.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
{{- if .Values.serviceAccountAgent.extraLabels }}
|
||||||
|
{{ tpl (toYaml .Values.serviceAccountAgent.extraLabels) . | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.serviceAccountAgent.imagePullSecretName }}
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: {{ .Values.serviceAccountAgent.imagePullSecretName }}
|
||||||
|
{{- end -}}
|
||||||
|
{{ end }}
|
|
@ -0,0 +1,26 @@
|
||||||
|
{{ if .Values.serviceAccount.create }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: {{ include "jenkins.serviceAccountName" . }}
|
||||||
|
namespace: {{ template "jenkins.namespace" . }}
|
||||||
|
{{- if .Values.serviceAccount.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{ tpl (toYaml .Values.serviceAccount.annotations) . | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
labels:
|
||||||
|
"app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
|
||||||
|
{{- if .Values.renderHelmLabels }}
|
||||||
|
"helm.sh/chart": "{{ template "jenkins.label" .}}"
|
||||||
|
{{- end }}
|
||||||
|
"app.kubernetes.io/managed-by": "{{ .Release.Service }}"
|
||||||
|
"app.kubernetes.io/instance": "{{ .Release.Name }}"
|
||||||
|
"app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
|
||||||
|
{{- if .Values.serviceAccount.extraLabels }}
|
||||||
|
{{ tpl (toYaml .Values.serviceAccount.extraLabels) . | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.serviceAccount.imagePullSecretName }}
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: {{ .Values.serviceAccount.imagePullSecretName }}
|
||||||
|
{{- end -}}
|
||||||
|
{{ end }}
|
|
@ -0,0 +1,49 @@
|
||||||
|
{{- if .Values.controller.testEnabled }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: "{{ .Release.Name }}-ui-test-{{ randAlphaNum 5 | lower }}"
|
||||||
|
namespace: {{ template "jenkins.namespace" . }}
|
||||||
|
annotations:
|
||||||
|
"helm.sh/hook": test-success
|
||||||
|
spec:
|
||||||
|
{{- if .Values.controller.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{ toYaml .Values.controller.nodeSelector | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{ toYaml .Values.controller.tolerations | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
initContainers:
|
||||||
|
- name: "test-framework"
|
||||||
|
image: "{{ .Values.helmtest.bats.image.registry }}/{{ .Values.helmtest.bats.image.repository }}:{{ .Values.helmtest.bats.image.tag }}"
|
||||||
|
command:
|
||||||
|
- "bash"
|
||||||
|
- "-c"
|
||||||
|
args:
|
||||||
|
- |
|
||||||
|
# copy bats to tools dir
|
||||||
|
set -ex
|
||||||
|
cp -R /opt/bats /tools/bats/
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /tools
|
||||||
|
name: tools
|
||||||
|
containers:
|
||||||
|
- name: {{ .Release.Name }}-ui-test
|
||||||
|
image: "{{ .Values.controller.image.registry }}/{{ .Values.controller.image.repository }}:{{- include "controller.image.tag" . -}}"
|
||||||
|
command: ["/tools/bats/bin/bats", "-t", "/tests/run.sh"]
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /tests
|
||||||
|
name: tests
|
||||||
|
readOnly: true
|
||||||
|
- mountPath: /tools
|
||||||
|
name: tools
|
||||||
|
volumes:
|
||||||
|
- name: tests
|
||||||
|
configMap:
|
||||||
|
name: {{ template "jenkins.fullname" . }}-tests
|
||||||
|
- name: tools
|
||||||
|
emptyDir: {}
|
||||||
|
restartPolicy: Never
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,14 @@
|
||||||
|
{{- if .Values.controller.testEnabled }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ template "jenkins.fullname" . }}-tests
|
||||||
|
namespace: {{ template "jenkins.namespace" . }}
|
||||||
|
annotations:
|
||||||
|
"helm.sh/hook": test
|
||||||
|
data:
|
||||||
|
run.sh: |-
|
||||||
|
@test "Testing Jenkins UI is accessible" {
|
||||||
|
curl --retry 48 --retry-delay 10 {{ template "jenkins.fullname" . }}:{{ .Values.controller.servicePort }}{{ default "" .Values.controller.jenkinsUriPrefix }}/login
|
||||||
|
}
|
||||||
|
{{- end }}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,22 @@
|
||||||
|
# Patterns to ignore when building packages.
|
||||||
|
# This supports shell glob matching, relative path matching, and
|
||||||
|
# negation (prefixed with !). Only one pattern per line.
|
||||||
|
.DS_Store
|
||||||
|
# Common VCS dirs
|
||||||
|
.git/
|
||||||
|
.gitignore
|
||||||
|
.bzr/
|
||||||
|
.bzrignore
|
||||||
|
.hg/
|
||||||
|
.hgignore
|
||||||
|
.svn/
|
||||||
|
# Common backup files
|
||||||
|
*.swp
|
||||||
|
*.bak
|
||||||
|
*.tmp
|
||||||
|
*~
|
||||||
|
# Various IDEs
|
||||||
|
.project
|
||||||
|
.idea/
|
||||||
|
*.tmproj
|
||||||
|
.vscode/
|
|
@ -0,0 +1,6 @@
|
||||||
|
dependencies:
|
||||||
|
- name: kubemq-crds
|
||||||
|
repository: https://kubemq-io.github.io/charts
|
||||||
|
version: 2.3.7
|
||||||
|
digest: sha256:8155ecf759142d1bed539edc68b2775fdd06fa8d3121e11d88fdecbd5f4a778a
|
||||||
|
generated: "2023-03-18T13:20:55.5463101+02:00"
|
|
@ -0,0 +1,17 @@
|
||||||
|
annotations:
|
||||||
|
catalog.cattle.io/certified: partner
|
||||||
|
catalog.cattle.io/display-name: KubeMQ Controller
|
||||||
|
catalog.cattle.io/kube-version: '>=1.21-0'
|
||||||
|
catalog.cattle.io/release-name: kubemq-controller
|
||||||
|
apiVersion: v2
|
||||||
|
appVersion: 1.12.0
|
||||||
|
description: A Helm chart for KubeMQ Controller
|
||||||
|
icon: file://assets/icons/kubemq-controller.svg
|
||||||
|
kubeVersion: '>=1.21-0'
|
||||||
|
maintainers:
|
||||||
|
- email: info@kubemq.io
|
||||||
|
name: KubeMQ
|
||||||
|
url: https://kubemq.io
|
||||||
|
name: kubemq-controller
|
||||||
|
type: application
|
||||||
|
version: 1.12.0
|
|
@ -0,0 +1,33 @@
|
||||||
|
# kubemq-controller
|
||||||
|
|
||||||
|
`kubemq-controller` is the Helm chart that installs the KubeMQ Operator and
|
||||||
|
required by the KubeMQ stack. It should be installed before installing
|
||||||
|
`kubemq-cluster` and `kubemq-connector` charts.
|
||||||
|
|
||||||
|
## Installing
|
||||||
|
|
||||||
|
For example:
|
||||||
|
```console
|
||||||
|
$ helm repo add kubemq-charts https://kubemq-io.github.io/charts
|
||||||
|
$ helm install -n kubemq kubemq-controller kubemq-charts/kubemq-controller
|
||||||
|
```
|
||||||
|
|
||||||
|
For a more comprehensive documentation about how to install the KubeMQ Cluster and KubeMQ Connector, check the `kubemq-cluster` and `kubemq-connector` charts documentation out.
|
||||||
|
|
||||||
|
## Upgrading the charts
|
||||||
|
|
||||||
|
Please refer to the release notes of each version of the helm charts.
|
||||||
|
These can be found [here](https://github.com/kubemq/helm-charts/releases).
|
||||||
|
|
||||||
|
## Uninstalling the charts
|
||||||
|
|
||||||
|
To uninstall/delete kubemq-controller use the following command:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ helm uninstall -n kubemq kubemq-controller
|
||||||
|
```
|
||||||
|
|
||||||
|
The commands remove all the Kubernetes components associated with the chart.
|
||||||
|
Keep in mind that the chart is required by the `kubemq-cluster` and `kubemq-connector` charts.
|
||||||
|
|
||||||
|
If you want to keep the history use `--keep-history` flag.
|
|
@ -0,0 +1,33 @@
|
||||||
|
# kubemq-controller
|
||||||
|
|
||||||
|
`kubemq-controller` is the Helm chart that installs the KubeMQ Operator and
|
||||||
|
required by the KubeMQ stack. It should be installed before installing
|
||||||
|
`kubemq-cluster` and `kubemq-connector` charts.
|
||||||
|
|
||||||
|
## Installing
|
||||||
|
|
||||||
|
For example:
|
||||||
|
```console
|
||||||
|
$ helm repo add kubemq-charts https://kubemq-io.github.io/charts
|
||||||
|
$ helm install -n kubemq kubemq-controller kubemq-charts/kubemq-controller
|
||||||
|
```
|
||||||
|
|
||||||
|
For a more comprehensive documentation about how to install the KubeMQ Cluster and KubeMQ Connector, check the `kubemq-cluster` and `kubemq-connector` charts documentation out.
|
||||||
|
|
||||||
|
## Upgrading the charts
|
||||||
|
|
||||||
|
Please refer to the release notes of each version of the helm charts.
|
||||||
|
These can be found [here](https://github.com/kubemq/helm-charts/releases).
|
||||||
|
|
||||||
|
## Uninstalling the charts
|
||||||
|
|
||||||
|
To uninstall/delete kubemq-controller use the following command:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ helm uninstall -n kubemq kubemq-controller
|
||||||
|
```
|
||||||
|
|
||||||
|
The commands remove all the Kubernetes components associated with the chart.
|
||||||
|
Keep in mind that the chart is required by the `kubemq-cluster` and `kubemq-connector` charts.
|
||||||
|
|
||||||
|
If you want to keep the history use `--keep-history` flag.
|
|
@ -0,0 +1,50 @@
|
||||||
|
{{/* vim: set filetype=mustache: */}}
|
||||||
|
|
||||||
|
|
||||||
|
{{/*{{- define "kubemq.name" -}}*/}}
|
||||||
|
{{/*{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}*/}}
|
||||||
|
{{/*{{- end -}}*/}}
|
||||||
|
|
||||||
|
{{- define "kubemq.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
If release name contains chart name it will be used as a full name.
|
||||||
|
*/}}
|
||||||
|
{{- define "kubemq.fullname" -}}
|
||||||
|
{{- if .Values.fullnameOverride -}}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||||
|
{{- if contains $name .Release.Name -}}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Generate chart secret name
|
||||||
|
*/}}
|
||||||
|
{{- define "kubemq.secretName" -}}
|
||||||
|
{{ default (include "kubemq.fullname" .) .Values.existingSecret }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service account to use
|
||||||
|
*/}}
|
||||||
|
{{- define "mychart.serviceAccountName" -}}
|
||||||
|
{{- if .Values.serviceAccount.create -}}
|
||||||
|
{{ default (include "mychart.fullname" .) .Values.serviceAccount.name }}
|
||||||
|
{{- else -}}
|
||||||
|
{{ default "default" .Values.serviceAccount.name }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "kubemq.crbName" -}}
|
||||||
|
{{- printf "kubemq-operator-%s-crb" .Release.Namespace -}}
|
||||||
|
{{- end -}}
|
|
@ -0,0 +1,41 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: kubemq-operator
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: kubemq-operator
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: kubemq-operator
|
||||||
|
spec:
|
||||||
|
serviceAccountName: kubemq-operator
|
||||||
|
containers:
|
||||||
|
- name: kubemq-operator
|
||||||
|
image: {{ .Values.operatorImage | default "docker.io/kubemq/kubemq-operator:latest" }}
|
||||||
|
command:
|
||||||
|
- kubemq-operator
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
env:
|
||||||
|
- name: WATCH_NAMESPACE
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.namespace
|
||||||
|
- name: POD_NAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.name
|
||||||
|
- name: RELATED_IMAGE_KUBEMQ_CLUSTER
|
||||||
|
value: {{ .Values.kubemqImage | default "docker.io/kubemq/kubemq:latest" | quote }}
|
||||||
|
- name: CONNECTOR_TARGETS_IMAGE
|
||||||
|
value: {{ .Values.connectorTargetsImage | default "kubemq/kubemq-targets:latest" | quote }}
|
||||||
|
- name: CONNECTOR_SOURCES_IMAGE
|
||||||
|
value: {{ .Values.connectorSourcesImage | default "kubemq/kubemq-sources:latest" | quote }}
|
||||||
|
- name: CONNECTOR_BRIDGES_IMAGE
|
||||||
|
value: {{ .Values.connectorBridgesImage | default "kubemq/kubemq-bridges:latest" | quote }}
|
|
@ -0,0 +1,33 @@
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: kubemq-operator-{{ .Release.Namespace }}-crb
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: kubemq-operator
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
roleRef:
|
||||||
|
kind: ClusterRole
|
||||||
|
name: kubemq-operator
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: kubemq-cluster-role
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- security.openshift.io
|
||||||
|
resources:
|
||||||
|
- securitycontextconstraints
|
||||||
|
verbs:
|
||||||
|
- use
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
resourceNames:
|
||||||
|
- privileged
|
|
@ -0,0 +1,5 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: kubemq-operator
|
||||||
|
namespace: {{ .Release.Namespace }}
|
|
@ -0,0 +1,5 @@
|
||||||
|
operatorImage: docker.io/kubemq/kubemq-operator:latest
|
||||||
|
kubemqImage: docker.io/kubemq/kubemq:latest
|
||||||
|
connectorTargetsImage: kubemq/kubemq-targets:latest
|
||||||
|
connectorSourcesImage: kubemq/kubemq-sources:latest
|
||||||
|
connectorBridgesImage: kubemq/kubemq-bridges:latest
|
|
@ -0,0 +1,28 @@
|
||||||
|
# Patterns to ignore when building packages.
|
||||||
|
# This supports shell glob matching, relative path matching, and
|
||||||
|
# negation (prefixed with !). Only one pattern per line.
|
||||||
|
.DS_Store
|
||||||
|
README.md.gotmpl
|
||||||
|
# Common VCS dirs
|
||||||
|
.git/
|
||||||
|
.gitignore
|
||||||
|
.bzr/
|
||||||
|
.bzrignore
|
||||||
|
.hg/
|
||||||
|
.hgignore
|
||||||
|
.svn/
|
||||||
|
# Common backup files
|
||||||
|
*.swp
|
||||||
|
*.bak
|
||||||
|
*.tmp
|
||||||
|
*.orig
|
||||||
|
*~
|
||||||
|
# Various IDEs
|
||||||
|
.project
|
||||||
|
.idea/
|
||||||
|
*.tmproj
|
||||||
|
.vscode/
|
||||||
|
|
||||||
|
*.go
|
||||||
|
testdata/
|
||||||
|
ci/
|
|
@ -0,0 +1,9 @@
|
||||||
|
dependencies:
|
||||||
|
- name: console
|
||||||
|
repository: https://charts.redpanda.com
|
||||||
|
version: 0.7.26
|
||||||
|
- name: connectors
|
||||||
|
repository: https://charts.redpanda.com
|
||||||
|
version: 0.1.11
|
||||||
|
digest: sha256:52ec651b909af2461cc7d69da8786e1047b96fb32a692ce949d36789c9f60e36
|
||||||
|
generated: "2024-04-16T04:00:57.672057332Z"
|
|
@ -0,0 +1,40 @@
|
||||||
|
annotations:
|
||||||
|
artifacthub.io/images: |
|
||||||
|
- name: redpanda
|
||||||
|
image: docker.redpanda.com/redpandadata/redpanda:v24.2.1
|
||||||
|
- name: busybox
|
||||||
|
image: busybox:latest
|
||||||
|
- name: mintel/docker-alpine-bash-curl-jq
|
||||||
|
image: mintel/docker-alpine-bash-curl-jq:latest
|
||||||
|
artifacthub.io/license: Apache-2.0
|
||||||
|
artifacthub.io/links: |
|
||||||
|
- name: Documentation
|
||||||
|
url: https://docs.redpanda.com
|
||||||
|
- name: "Helm (>= 3.10.0)"
|
||||||
|
url: https://helm.sh/docs/intro/install/
|
||||||
|
catalog.cattle.io/certified: partner
|
||||||
|
catalog.cattle.io/display-name: Redpanda
|
||||||
|
catalog.cattle.io/kube-version: '>=1.21-0'
|
||||||
|
catalog.cattle.io/release-name: redpanda
|
||||||
|
apiVersion: v2
|
||||||
|
appVersion: v24.2.1
|
||||||
|
dependencies:
|
||||||
|
- condition: console.enabled
|
||||||
|
name: console
|
||||||
|
repository: file://./charts/console
|
||||||
|
version: '>=0.5 <1.0'
|
||||||
|
- condition: connectors.enabled
|
||||||
|
name: connectors
|
||||||
|
repository: file://./charts/connectors
|
||||||
|
version: '>=0.1.2 <1.0'
|
||||||
|
description: Redpanda is the real-time engine for modern apps.
|
||||||
|
icon: file://assets/icons/redpanda.svg
|
||||||
|
kubeVersion: '>=1.21-0'
|
||||||
|
maintainers:
|
||||||
|
- name: redpanda-data
|
||||||
|
url: https://github.com/orgs/redpanda-data/people
|
||||||
|
name: redpanda
|
||||||
|
sources:
|
||||||
|
- https://github.com/redpanda-data/helm-charts
|
||||||
|
type: application
|
||||||
|
version: 5.8.14
|
|
@ -0,0 +1,201 @@
|
||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,24 @@
|
||||||
|
# Patterns to ignore when building packages.
|
||||||
|
# This supports shell glob matching, relative path matching, and
|
||||||
|
# negation (prefixed with !). Only one pattern per line.
|
||||||
|
.DS_Store
|
||||||
|
README.md.gotmpl
|
||||||
|
# Common VCS dirs
|
||||||
|
.git/
|
||||||
|
.gitignore
|
||||||
|
.bzr/
|
||||||
|
.bzrignore
|
||||||
|
.hg/
|
||||||
|
.hgignore
|
||||||
|
.svn/
|
||||||
|
# Common backup files
|
||||||
|
*.swp
|
||||||
|
*.bak
|
||||||
|
*.tmp
|
||||||
|
*.orig
|
||||||
|
*~
|
||||||
|
# Various IDEs
|
||||||
|
.project
|
||||||
|
.idea/
|
||||||
|
*.tmproj
|
||||||
|
.vscode/
|
|
@ -0,0 +1,25 @@
|
||||||
|
annotations:
|
||||||
|
artifacthub.io/images: |
|
||||||
|
- name: connectors
|
||||||
|
image: docker.redpanda.com/redpandadata/connectors:v1.0.6
|
||||||
|
- name: rpk
|
||||||
|
image: docker.redpanda.com/redpandadata/redpanda:latest
|
||||||
|
artifacthub.io/license: Apache-2.0
|
||||||
|
artifacthub.io/links: |
|
||||||
|
- name: Documentation
|
||||||
|
url: https://docs.redpanda.com
|
||||||
|
- name: "Helm (>= 3.6.0)"
|
||||||
|
url: https://helm.sh/docs/intro/install/
|
||||||
|
apiVersion: v2
|
||||||
|
appVersion: v1.0.6
|
||||||
|
description: Redpanda managed Connectors helm chart
|
||||||
|
icon: https://images.ctfassets.net/paqvtpyf8rwu/3cYHw5UzhXCbKuR24GDFGO/73fb682e6157d11c10d5b2b5da1d5af0/skate-stand-panda.svg
|
||||||
|
kubeVersion: ^1.21.0-0
|
||||||
|
maintainers:
|
||||||
|
- name: redpanda-data
|
||||||
|
url: https://github.com/orgs/redpanda-data/people
|
||||||
|
name: connectors
|
||||||
|
sources:
|
||||||
|
- https://github.com/redpanda-data/helm-charts
|
||||||
|
type: application
|
||||||
|
version: 0.1.11
|
|
@ -0,0 +1,201 @@
|
||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
|
@ -0,0 +1,578 @@
|
||||||
|
# Redpanda Connectors Helm Chart Specification
|
||||||
|
---
|
||||||
|
description: Find the default values and descriptions of settings in the Redpanda Connectors Helm chart.
|
||||||
|
---
|
||||||
|
|
||||||
|
![Version: 0.1.11](https://img.shields.io/badge/Version-0.1.11-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.0.6](https://img.shields.io/badge/AppVersion-v1.0.6-informational?style=flat-square)
|
||||||
|
|
||||||
|
This page describes the official Redpanda Connectors Helm Chart. In particular, this page describes the contents of the chart’s [`values.yaml` file](https://github.com/redpanda-data/helm-charts/blob/main/charts/connectors/values.yaml). Each of the settings is listed and described on this page, along with any default values.
|
||||||
|
|
||||||
|
For instructions on how to install and use the chart, including how to override and customize the chart’s values, refer to the [deployment documentation](https://docs.redpanda.com/current/deploy/deployment-option/self-hosted/kubernetes/k-deploy-connectors/).
|
||||||
|
|
||||||
|
----------------------------------------------
|
||||||
|
Autogenerated from chart metadata using [helm-docs v1.11.2](https://github.com/norwoodj/helm-docs/releases/v1.11.2)
|
||||||
|
|
||||||
|
## Source Code
|
||||||
|
|
||||||
|
* <https://github.com/redpanda-data/helm-charts>
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
Kubernetes: `^1.21.0-0`
|
||||||
|
|
||||||
|
## Settings
|
||||||
|
|
||||||
|
### [auth](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=auth)
|
||||||
|
|
||||||
|
Authentication settings. For details, see the [SASL documentation](https://docs.redpanda.com/docs/manage/kubernetes/security/sasl-kubernetes/). The first line of the secret file is used. So the first superuser is used to authenticate to the Redpanda cluster.
|
||||||
|
|
||||||
|
**Default:**
|
||||||
|
|
||||||
|
```
|
||||||
|
{"sasl":{"enabled":false,"mechanism":"scram-sha-512","secretRef":"","userName":""}}
|
||||||
|
```
|
||||||
|
|
||||||
|
### [auth.sasl.mechanism](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=auth.sasl.mechanism)
|
||||||
|
|
||||||
|
The authentication mechanism to use for the superuser. Options are `scram-sha-256` and `scram-sha-512`.
|
||||||
|
|
||||||
|
**Default:** `"scram-sha-512"`
|
||||||
|
|
||||||
|
### [auth.sasl.secretRef](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=auth.sasl.secretRef)
|
||||||
|
|
||||||
|
A Secret that contains your SASL user password.
|
||||||
|
|
||||||
|
**Default:** `""`
|
||||||
|
|
||||||
|
### [commonLabels](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=commonLabels)
|
||||||
|
|
||||||
|
Additional labels to add to all Kubernetes objects. For example, `my.k8s.service: redpanda`.
|
||||||
|
|
||||||
|
**Default:** `{}`
|
||||||
|
|
||||||
|
### [connectors.additionalConfiguration](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=connectors.additionalConfiguration)
|
||||||
|
|
||||||
|
A placeholder for any Java configuration settings for Kafka Connect that are not explicitly defined in this Helm chart. Java configuration settings are passed to the Kafka Connect startup script.
|
||||||
|
|
||||||
|
**Default:** `""`
|
||||||
|
|
||||||
|
### [connectors.bootstrapServers](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=connectors.bootstrapServers)
|
||||||
|
|
||||||
|
A comma-separated list of Redpanda broker addresses in the format of IP:Port or DNS:Port. Kafka Connect uses this to connect to the Redpanda/Kafka cluster.
|
||||||
|
|
||||||
|
**Default:** `""`
|
||||||
|
|
||||||
|
### [connectors.brokerTLS.ca.secretNameOverwrite](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=connectors.brokerTLS.ca.secretNameOverwrite)
|
||||||
|
|
||||||
|
If `secretRef` points to a Secret where the certificate authority (CA) is not under the `ca.crt` key, use `secretNameOverwrite` to overwrite it e.g. `corp-ca.crt`.
|
||||||
|
|
||||||
|
**Default:** `""`
|
||||||
|
|
||||||
|
### [connectors.brokerTLS.ca.secretRef](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=connectors.brokerTLS.ca.secretRef)
|
||||||
|
|
||||||
|
The name of the Secret where the ca.crt file content is located.
|
||||||
|
|
||||||
|
**Default:** `""`
|
||||||
|
|
||||||
|
### [connectors.brokerTLS.cert.secretNameOverwrite](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=connectors.brokerTLS.cert.secretNameOverwrite)
|
||||||
|
|
||||||
|
If secretRef points to secret where client signed certificate is not under tls.crt key then please use secretNameOverwrite to overwrite it e.g. corp-tls.crt
|
||||||
|
|
||||||
|
**Default:** `""`
|
||||||
|
|
||||||
|
### [connectors.brokerTLS.cert.secretRef](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=connectors.brokerTLS.cert.secretRef)
|
||||||
|
|
||||||
|
The name of the secret where client signed certificate is located
|
||||||
|
|
||||||
|
**Default:** `""`
|
||||||
|
|
||||||
|
### [connectors.brokerTLS.enabled](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=connectors.brokerTLS.enabled)
|
||||||
|
|
||||||
|
**Default:** `false`
|
||||||
|
|
||||||
|
### [connectors.brokerTLS.key.secretNameOverwrite](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=connectors.brokerTLS.key.secretNameOverwrite)
|
||||||
|
|
||||||
|
If secretRef points to secret where client private key is not under tls.key key then please use secretNameOverwrite to overwrite it e.g. corp-tls.key
|
||||||
|
|
||||||
|
**Default:** `""`
|
||||||
|
|
||||||
|
### [connectors.brokerTLS.key.secretRef](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=connectors.brokerTLS.key.secretRef)
|
||||||
|
|
||||||
|
The name of the secret where client private key is located
|
||||||
|
|
||||||
|
**Default:** `""`
|
||||||
|
|
||||||
|
### [connectors.groupID](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=connectors.groupID)
|
||||||
|
|
||||||
|
A unique string that identifies the Kafka Connect cluster. It's used in the formation of the internal topic names, ensuring that multiple Kafka Connect clusters can connect to the same Redpanda cluster without interfering with each other.
|
||||||
|
|
||||||
|
**Default:** `"connectors-cluster"`
|
||||||
|
|
||||||
|
### [connectors.producerBatchSize](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=connectors.producerBatchSize)
|
||||||
|
|
||||||
|
The number of bytes of records a producer will attempt to batch together before sending to Redpanda. Batching improves throughput.
|
||||||
|
|
||||||
|
**Default:** `131072`
|
||||||
|
|
||||||
|
### [connectors.producerLingerMS](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=connectors.producerLingerMS)
|
||||||
|
|
||||||
|
The time, in milliseconds, that a producer will wait before sending a batch of records. Waiting allows the producer to gather more records in the same batch and improve throughput.
|
||||||
|
|
||||||
|
**Default:** `1`
|
||||||
|
|
||||||
|
### [connectors.restPort](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=connectors.restPort)
|
||||||
|
|
||||||
|
The port on which the Kafka Connect REST API listens. The API is used for administrative tasks.
|
||||||
|
|
||||||
|
**Default:** `8083`
|
||||||
|
|
||||||
|
### [connectors.schemaRegistryURL](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=connectors.schemaRegistryURL)
|
||||||
|
|
||||||
|
**Default:** `""`
|
||||||
|
|
||||||
|
### [connectors.secretManager.connectorsPrefix](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=connectors.secretManager.connectorsPrefix)
|
||||||
|
|
||||||
|
**Default:** `""`
|
||||||
|
|
||||||
|
### [connectors.secretManager.consolePrefix](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=connectors.secretManager.consolePrefix)
|
||||||
|
|
||||||
|
**Default:** `""`
|
||||||
|
|
||||||
|
### [connectors.secretManager.enabled](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=connectors.secretManager.enabled)
|
||||||
|
|
||||||
|
**Default:** `false`
|
||||||
|
|
||||||
|
### [connectors.secretManager.region](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=connectors.secretManager.region)
|
||||||
|
|
||||||
|
**Default:** `""`
|
||||||
|
|
||||||
|
### [connectors.storage.remote](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=connectors.storage.remote)
|
||||||
|
|
||||||
|
Indicates if read and write operations for the respective topics are allowed remotely.
|
||||||
|
|
||||||
|
**Default:**
|
||||||
|
|
||||||
|
```
|
||||||
|
{"read":{"config":false,"offset":false,"status":false},"write":{"config":false,"offset":false,"status":false}}
|
||||||
|
```
|
||||||
|
|
||||||
|
### [connectors.storage.replicationFactor](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=connectors.storage.replicationFactor)
|
||||||
|
|
||||||
|
The number of replicas for each of the internal topics that Kafka Connect uses.
|
||||||
|
|
||||||
|
**Default:**
|
||||||
|
|
||||||
|
```
|
||||||
|
{"config":-1,"offset":-1,"status":-1}
|
||||||
|
```
|
||||||
|
|
||||||
|
### [connectors.storage.replicationFactor.config](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=connectors.storage.replicationFactor.config)
|
||||||
|
|
||||||
|
Replication factor for the configuration topic.
|
||||||
|
|
||||||
|
**Default:** `-1`
|
||||||
|
|
||||||
|
### [connectors.storage.replicationFactor.offset](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=connectors.storage.replicationFactor.offset)
|
||||||
|
|
||||||
|
Replication factor for the offset topic.
|
||||||
|
|
||||||
|
**Default:** `-1`
|
||||||
|
|
||||||
|
### [connectors.storage.replicationFactor.status](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=connectors.storage.replicationFactor.status)
|
||||||
|
|
||||||
|
Replication factor for the status topic.
|
||||||
|
|
||||||
|
**Default:** `-1`
|
||||||
|
|
||||||
|
### [connectors.storage.topic.config](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=connectors.storage.topic.config)
|
||||||
|
|
||||||
|
The name of the internal topic that Kafka Connect uses to store connector and task configurations.
|
||||||
|
|
||||||
|
**Default:**
|
||||||
|
|
||||||
|
```
|
||||||
|
"_internal_connectors_configs"
|
||||||
|
```
|
||||||
|
|
||||||
|
### [connectors.storage.topic.offset](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=connectors.storage.topic.offset)
|
||||||
|
|
||||||
|
The name of the internal topic that Kafka Connect uses to store source connector offsets.
|
||||||
|
|
||||||
|
**Default:**
|
||||||
|
|
||||||
|
```
|
||||||
|
"_internal_connectors_offsets"
|
||||||
|
```
|
||||||
|
|
||||||
|
### [connectors.storage.topic.status](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=connectors.storage.topic.status)
|
||||||
|
|
||||||
|
The name of the internal topic that Kafka Connect uses to store connector and task status updates.
|
||||||
|
|
||||||
|
**Default:**
|
||||||
|
|
||||||
|
```
|
||||||
|
"_internal_connectors_status"
|
||||||
|
```
|
||||||
|
|
||||||
|
### [container.javaGCLogEnabled](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=container.javaGCLogEnabled)
|
||||||
|
|
||||||
|
**Default:** `"false"`
|
||||||
|
|
||||||
|
### [container.resources](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=container.resources)
|
||||||
|
|
||||||
|
Pod resource management.
|
||||||
|
|
||||||
|
**Default:**
|
||||||
|
|
||||||
|
```
|
||||||
|
{"javaMaxHeapSize":"2G","limits":{"cpu":1,"memory":"2350Mi"},"request":{"cpu":1,"memory":"2350Mi"}}
|
||||||
|
```
|
||||||
|
|
||||||
|
### [container.resources.javaMaxHeapSize](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=container.resources.javaMaxHeapSize)
|
||||||
|
|
||||||
|
Java maximum heap size must not be greater than `container.resources.limits.memory`.
|
||||||
|
|
||||||
|
**Default:** `"2G"`
|
||||||
|
|
||||||
|
### [container.securityContext](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=container.securityContext)
|
||||||
|
|
||||||
|
Security context for the Redpanda Connectors container. See also `deployment.securityContext` for Pod-level settings.
|
||||||
|
|
||||||
|
**Default:**
|
||||||
|
|
||||||
|
```
|
||||||
|
{"allowPrivilegeEscalation":false}
|
||||||
|
```
|
||||||
|
|
||||||
|
### [deployment.annotations](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.annotations)
|
||||||
|
|
||||||
|
Additional annotations to apply to the Pods of this Deployment.
|
||||||
|
|
||||||
|
**Default:** `{}`
|
||||||
|
|
||||||
|
### [deployment.budget.maxUnavailable](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.budget.maxUnavailable)
|
||||||
|
|
||||||
|
**Default:** `1`
|
||||||
|
|
||||||
|
### [deployment.create](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.create)
|
||||||
|
|
||||||
|
**Default:** `true`
|
||||||
|
|
||||||
|
### [deployment.extraEnv](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.extraEnv)
|
||||||
|
|
||||||
|
Additional environment variables for the Pods.
|
||||||
|
|
||||||
|
**Default:** `[]`
|
||||||
|
|
||||||
|
### [deployment.extraEnvFrom](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.extraEnvFrom)
|
||||||
|
|
||||||
|
Configure extra environment variables from Secrets and ConfigMaps.
|
||||||
|
|
||||||
|
**Default:** `[]`
|
||||||
|
|
||||||
|
### [deployment.livenessProbe](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.livenessProbe)
|
||||||
|
|
||||||
|
Adjust the period for your probes to meet your needs. For details, see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes).
|
||||||
|
|
||||||
|
**Default:**
|
||||||
|
|
||||||
|
```
|
||||||
|
{"failureThreshold":3,"initialDelaySeconds":10,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1}
|
||||||
|
```
|
||||||
|
|
||||||
|
### [deployment.nodeAffinity](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.nodeAffinity)
|
||||||
|
|
||||||
|
Node Affinity rules for scheduling Pods of this Deployment. The suggestion would be to spread Pods according to topology zone. For details, see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity).
|
||||||
|
|
||||||
|
**Default:** `{}`
|
||||||
|
|
||||||
|
### [deployment.nodeSelector](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.nodeSelector)
|
||||||
|
|
||||||
|
Node selection constraints for scheduling Pods of this Deployment. These constraints override the global `nodeSelector` value. For details, see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector).
|
||||||
|
|
||||||
|
**Default:** `{}`
|
||||||
|
|
||||||
|
### [deployment.podAffinity](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.podAffinity)
|
||||||
|
|
||||||
|
Inter-Pod Affinity rules for scheduling Pods of this Deployment. For details, see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity).
|
||||||
|
|
||||||
|
**Default:** `{}`
|
||||||
|
|
||||||
|
### [deployment.podAntiAffinity](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.podAntiAffinity)
|
||||||
|
|
||||||
|
Anti-affinity rules for scheduling Pods of this Deployment. For details, see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity). You may either edit the default settings for anti-affinity rules, or specify new anti-affinity rules to use instead of the defaults.
|
||||||
|
|
||||||
|
**Default:**
|
||||||
|
|
||||||
|
```
|
||||||
|
{"custom":{},"topologyKey":"kubernetes.io/hostname","type":"hard","weight":100}
|
||||||
|
```
|
||||||
|
|
||||||
|
### [deployment.podAntiAffinity.custom](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.podAntiAffinity.custom)
|
||||||
|
|
||||||
|
Change `podAntiAffinity.type` to `custom` and provide your own podAntiAffinity rules here.
|
||||||
|
|
||||||
|
**Default:** `{}`
|
||||||
|
|
||||||
|
### [deployment.podAntiAffinity.topologyKey](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.podAntiAffinity.topologyKey)
|
||||||
|
|
||||||
|
The `topologyKey` to be used. Can be used to spread across different nodes, AZs, regions etc.
|
||||||
|
|
||||||
|
**Default:** `"kubernetes.io/hostname"`
|
||||||
|
|
||||||
|
### [deployment.podAntiAffinity.type](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.podAntiAffinity.type)
|
||||||
|
|
||||||
|
Valid anti-affinity types are `soft`, `hard`, or `custom`. Use `custom` if you want to supply your own anti-affinity rules in the `podAntiAffinity.custom` object.
|
||||||
|
|
||||||
|
**Default:** `"hard"`
|
||||||
|
|
||||||
|
### [deployment.podAntiAffinity.weight](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.podAntiAffinity.weight)
|
||||||
|
|
||||||
|
Weight for `soft` anti-affinity rules. Does not apply for other anti-affinity types.
|
||||||
|
|
||||||
|
**Default:** `100`
|
||||||
|
|
||||||
|
### [deployment.priorityClassName](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.priorityClassName)
|
||||||
|
|
||||||
|
PriorityClassName given to Pods of this Deployment. For details, see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass).
|
||||||
|
|
||||||
|
**Default:** `""`
|
||||||
|
|
||||||
|
### [deployment.progressDeadlineSeconds](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.progressDeadlineSeconds)
|
||||||
|
|
||||||
|
The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused.
|
||||||
|
|
||||||
|
**Default:** `600`
|
||||||
|
|
||||||
|
### [deployment.readinessProbe.failureThreshold](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.readinessProbe.failureThreshold)
|
||||||
|
|
||||||
|
**Default:** `2`
|
||||||
|
|
||||||
|
### [deployment.readinessProbe.initialDelaySeconds](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.readinessProbe.initialDelaySeconds)
|
||||||
|
|
||||||
|
**Default:** `60`
|
||||||
|
|
||||||
|
### [deployment.readinessProbe.periodSeconds](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.readinessProbe.periodSeconds)
|
||||||
|
|
||||||
|
**Default:** `10`
|
||||||
|
|
||||||
|
### [deployment.readinessProbe.successThreshold](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.readinessProbe.successThreshold)
|
||||||
|
|
||||||
|
**Default:** `3`
|
||||||
|
|
||||||
|
### [deployment.readinessProbe.timeoutSeconds](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.readinessProbe.timeoutSeconds)
|
||||||
|
|
||||||
|
**Default:** `5`
|
||||||
|
|
||||||
|
### [deployment.restartPolicy](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.restartPolicy)
|
||||||
|
|
||||||
|
**Default:** `"Always"`
|
||||||
|
|
||||||
|
### [deployment.revisionHistoryLimit](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.revisionHistoryLimit)
|
||||||
|
|
||||||
|
The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified.
|
||||||
|
|
||||||
|
**Default:** `10`
|
||||||
|
|
||||||
|
### [deployment.schedulerName](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.schedulerName)
|
||||||
|
|
||||||
|
**Default:** `""`
|
||||||
|
|
||||||
|
### [deployment.securityContext.fsGroup](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.securityContext.fsGroup)
|
||||||
|
|
||||||
|
**Default:** `101`
|
||||||
|
|
||||||
|
### [deployment.securityContext.fsGroupChangePolicy](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.securityContext.fsGroupChangePolicy)
|
||||||
|
|
||||||
|
**Default:** `"OnRootMismatch"`
|
||||||
|
|
||||||
|
### [deployment.securityContext.runAsUser](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.securityContext.runAsUser)
|
||||||
|
|
||||||
|
**Default:** `101`
|
||||||
|
|
||||||
|
### [deployment.strategy.type](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.strategy.type)
|
||||||
|
|
||||||
|
**Default:** `"RollingUpdate"`
|
||||||
|
|
||||||
|
### [deployment.terminationGracePeriodSeconds](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.terminationGracePeriodSeconds)
|
||||||
|
|
||||||
|
**Default:** `30`
|
||||||
|
|
||||||
|
### [deployment.tolerations](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.tolerations)
|
||||||
|
|
||||||
|
Taints to be tolerated by Pods of this Deployment. These tolerations override the global tolerations value. For details, see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/).
|
||||||
|
|
||||||
|
**Default:** `[]`
|
||||||
|
|
||||||
|
### [deployment.topologySpreadConstraints[0].maxSkew](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.topologySpreadConstraints[0].maxSkew)
|
||||||
|
|
||||||
|
**Default:** `1`
|
||||||
|
|
||||||
|
### [deployment.topologySpreadConstraints[0].topologyKey](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.topologySpreadConstraints[0].topologyKey)
|
||||||
|
|
||||||
|
**Default:**
|
||||||
|
|
||||||
|
```
|
||||||
|
"topology.kubernetes.io/zone"
|
||||||
|
```
|
||||||
|
|
||||||
|
### [deployment.topologySpreadConstraints[0].whenUnsatisfiable](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.topologySpreadConstraints[0].whenUnsatisfiable)
|
||||||
|
|
||||||
|
**Default:** `"ScheduleAnyway"`
|
||||||
|
|
||||||
|
### [deployment.updateStrategy.type](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=deployment.updateStrategy.type)
|
||||||
|
|
||||||
|
**Default:** `"RollingUpdate"`
|
||||||
|
|
||||||
|
### [fullnameOverride](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=fullnameOverride)
|
||||||
|
|
||||||
|
Override `connectors.fullname` template.
|
||||||
|
|
||||||
|
**Default:** `""`
|
||||||
|
|
||||||
|
### [image](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=image)
|
||||||
|
|
||||||
|
Redpanda Docker image settings.
|
||||||
|
|
||||||
|
**Default:**
|
||||||
|
|
||||||
|
```
|
||||||
|
{"pullPolicy":"IfNotPresent","repository":"docker.redpanda.com/redpandadata/connectors","tag":""}
|
||||||
|
```
|
||||||
|
|
||||||
|
### [image.pullPolicy](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=image.pullPolicy)
|
||||||
|
|
||||||
|
The imagePullPolicy. If `image.tag` is 'latest', the default is `Always`.
|
||||||
|
|
||||||
|
**Default:** `"IfNotPresent"`
|
||||||
|
|
||||||
|
### [image.repository](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=image.repository)
|
||||||
|
|
||||||
|
Docker repository from which to pull the Redpanda Docker image.
|
||||||
|
|
||||||
|
**Default:**
|
||||||
|
|
||||||
|
```
|
||||||
|
"docker.redpanda.com/redpandadata/connectors"
|
||||||
|
```
|
||||||
|
|
||||||
|
### [image.tag](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=image.tag)
|
||||||
|
|
||||||
|
The Redpanda version. See DockerHub for: [All stable versions](https://hub.docker.com/r/redpandadata/redpanda/tags) and [all unstable versions](https://hub.docker.com/r/redpandadata/redpanda-unstable/tags).
|
||||||
|
|
||||||
|
**Default:** `Chart.appVersion`.
|
||||||
|
|
||||||
|
### [imagePullSecrets](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=imagePullSecrets)
|
||||||
|
|
||||||
|
Pull secrets may be used to provide credentials to image repositories See https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||||
|
|
||||||
|
**Default:** `[]`
|
||||||
|
|
||||||
|
### [logging](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=logging)
|
||||||
|
|
||||||
|
Log-level settings.
|
||||||
|
|
||||||
|
**Default:** `{"level":"warn"}`
|
||||||
|
|
||||||
|
### [logging.level](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=logging.level)
|
||||||
|
|
||||||
|
Log level Valid values (from least to most verbose) are: `error`, `warn`, `info` and `debug`.
|
||||||
|
|
||||||
|
**Default:** `"warn"`
|
||||||
|
|
||||||
|
### [monitoring](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=monitoring)
|
||||||
|
|
||||||
|
Monitoring. When set to `true`, the Helm chart creates a PodMonitor that can be used by Prometheus-Operator or VictoriaMetrics-Operator to scrape the metrics.
|
||||||
|
|
||||||
|
**Default:**
|
||||||
|
|
||||||
|
```
|
||||||
|
{"annotations":{},"enabled":false,"labels":{},"namespaceSelector":{"any":true},"scrapeInterval":"30s"}
|
||||||
|
```
|
||||||
|
|
||||||
|
### [nameOverride](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=nameOverride)
|
||||||
|
|
||||||
|
Override `connectors.name` template.
|
||||||
|
|
||||||
|
**Default:** `""`
|
||||||
|
|
||||||
|
### [service](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=service)
|
||||||
|
|
||||||
|
Service management.
|
||||||
|
|
||||||
|
**Default:**
|
||||||
|
|
||||||
|
```
|
||||||
|
{"annotations":{},"name":"","ports":[{"name":"prometheus","port":9404}]}
|
||||||
|
```
|
||||||
|
|
||||||
|
### [service.annotations](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=service.annotations)
|
||||||
|
|
||||||
|
Annotations to add to the Service.
|
||||||
|
|
||||||
|
**Default:** `{}`
|
||||||
|
|
||||||
|
### [service.name](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=service.name)
|
||||||
|
|
||||||
|
The name of the service to use. If not set, a name is generated using the `connectors.fullname` template.
|
||||||
|
|
||||||
|
**Default:** `""`
|
||||||
|
|
||||||
|
### [serviceAccount](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=serviceAccount)
|
||||||
|
|
||||||
|
ServiceAccount management.
|
||||||
|
|
||||||
|
**Default:**
|
||||||
|
|
||||||
|
```
|
||||||
|
{"annotations":{},"create":false,"name":""}
|
||||||
|
```
|
||||||
|
|
||||||
|
### [serviceAccount.annotations](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=serviceAccount.annotations)
|
||||||
|
|
||||||
|
Annotations to add to the ServiceAccount.
|
||||||
|
|
||||||
|
**Default:** `{}`
|
||||||
|
|
||||||
|
### [serviceAccount.create](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=serviceAccount.create)
|
||||||
|
|
||||||
|
Specifies whether a ServiceAccount should be created.
|
||||||
|
|
||||||
|
**Default:** `false`
|
||||||
|
|
||||||
|
### [serviceAccount.name](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=serviceAccount.name)
|
||||||
|
|
||||||
|
The name of the ServiceAccount to use. If not set and `serviceAccount.create` is `true`, a name is generated using the `connectors.fullname` template.
|
||||||
|
|
||||||
|
**Default:** `""`
|
||||||
|
|
||||||
|
### [storage.volumeMounts[0].mountPath](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=storage.volumeMounts[0].mountPath)
|
||||||
|
|
||||||
|
**Default:** `"/tmp"`
|
||||||
|
|
||||||
|
### [storage.volumeMounts[0].name](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=storage.volumeMounts[0].name)
|
||||||
|
|
||||||
|
**Default:** `"rp-connect-tmp"`
|
||||||
|
|
||||||
|
### [storage.volume[0].emptyDir.medium](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=storage.volume[0].emptyDir.medium)
|
||||||
|
|
||||||
|
**Default:** `"Memory"`
|
||||||
|
|
||||||
|
### [storage.volume[0].emptyDir.sizeLimit](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=storage.volume[0].emptyDir.sizeLimit)
|
||||||
|
|
||||||
|
**Default:** `"5Mi"`
|
||||||
|
|
||||||
|
### [storage.volume[0].name](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=storage.volume[0].name)
|
||||||
|
|
||||||
|
**Default:** `"rp-connect-tmp"`
|
||||||
|
|
||||||
|
### [test.create](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=test.create)
|
||||||
|
|
||||||
|
**Default:** `true`
|
||||||
|
|
||||||
|
### [tolerations](https://artifacthub.io/packages/helm/redpanda-data/connectors?modal=values&path=tolerations)
|
||||||
|
|
||||||
|
Taints to be tolerated by Pods. For details, see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/).
|
||||||
|
|
||||||
|
**Default:** `[]`
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
# contributor license agreements. See the NOTICE file distributed with
|
||||||
|
# this work for additional information regarding copyright ownership.
|
||||||
|
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
# (the "License"); you may not use this file except in compliance with
|
||||||
|
# the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
---
|
||||||
|
connectors:
|
||||||
|
bootstrapServers: "redpanda-0.redpanda.redpanda.svc.cluster.local.:9093,redpanda-1.redpanda.redpanda.svc.cluster.local.:9093,redpanda-2.redpanda.redpanda.svc.cluster.local.:9093"
|
||||||
|
brokerTLS:
|
||||||
|
enabled: true
|
||||||
|
ca:
|
||||||
|
secretRef: redpanda-default-cert
|
||||||
|
|
||||||
|
logging:
|
||||||
|
level: trace
|
||||||
|
|
||||||
|
deployment:
|
||||||
|
annotations:
|
||||||
|
test: test
|
||||||
|
test2: test2
|
||||||
|
|
||||||
|
service:
|
||||||
|
annotations:
|
||||||
|
test: test
|
||||||
|
test2: test2
|
|
@ -0,0 +1,28 @@
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
# contributor license agreements. See the NOTICE file distributed with
|
||||||
|
# this work for additional information regarding copyright ownership.
|
||||||
|
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
# (the "License"); you may not use this file except in compliance with
|
||||||
|
# the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
---
|
||||||
|
connectors:
|
||||||
|
bootstrapServers: "redpanda-0.redpanda.redpanda.svc.cluster.local.:9093,redpanda-1.redpanda.redpanda.svc.cluster.local.:9093,redpanda-2.redpanda.redpanda.svc.cluster.local.:9093"
|
||||||
|
brokerTLS:
|
||||||
|
enabled: true
|
||||||
|
ca:
|
||||||
|
secretRef: redpanda-default-cert
|
||||||
|
cert:
|
||||||
|
secretRef: redpanda-default-cert
|
||||||
|
key:
|
||||||
|
secretRef: redpanda-default-cert
|
||||||
|
|
||||||
|
logging:
|
||||||
|
level: trace
|
|
@ -0,0 +1,113 @@
|
||||||
|
{{/*
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
(the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "connectors.name" -}}
|
||||||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
*/}}
|
||||||
|
{{- define "connectors.fullname" }}
|
||||||
|
{{- if .Values.fullnameOverride }}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- else }}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||||
|
{{- if contains $name .Release.Name }}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- else }}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
full helm labels + common labels
|
||||||
|
*/}}
|
||||||
|
{{- define "full.labels" -}}
|
||||||
|
{{ $required := dict
|
||||||
|
"helm.sh/chart" ( include "connectors.chart" . )
|
||||||
|
"app.kubernetes.io/managed-by" ( .Release.Service ) }}
|
||||||
|
{{- toYaml ( merge $required (fromYaml (include "connectors-pod-labels" .))) }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
pod labels merged with common labels
|
||||||
|
*/}}
|
||||||
|
{{- define "connectors-pod-labels" -}}
|
||||||
|
{{ $required := dict
|
||||||
|
"app.kubernetes.io/name" ( include "connectors.name" . )
|
||||||
|
"app.kubernetes.io/instance" ( .Release.Name )
|
||||||
|
"app.kubernetes.io/component" ( include "connectors.name" . ) }}
|
||||||
|
{{- toYaml ( merge $required .Values.commonLabels ) }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create chart name and version as used by the chart label.
|
||||||
|
*/}}
|
||||||
|
{{- define "connectors.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Get the version of redpanda being used as an image
|
||||||
|
*/}}
|
||||||
|
{{- define "connectors.semver" -}}
|
||||||
|
{{ include "connectors.tag" . | trimPrefix "v" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service account to use
|
||||||
|
*/}}
|
||||||
|
{{- define "connectors.serviceAccountName" -}}
|
||||||
|
{{- if .Values.serviceAccount.create }}
|
||||||
|
{{- default (include "connectors.fullname" .) .Values.serviceAccount.name }}
|
||||||
|
{{- else }}
|
||||||
|
{{- default "default" .Values.serviceAccount.name }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service to use
|
||||||
|
*/}}
|
||||||
|
{{- define "connectors.serviceName" -}}
|
||||||
|
{{- default (include "connectors.fullname" .) .Values.service.name }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Use AppVersion if image.tag is not set
|
||||||
|
*/}}
|
||||||
|
{{- define "connectors.tag" -}}
|
||||||
|
{{- $tag := default .Chart.AppVersion .Values.image.tag -}}
|
||||||
|
{{- $matchString := "^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$" -}}
|
||||||
|
{{- $match := mustRegexMatch $matchString $tag -}}
|
||||||
|
{{- if not $match -}}
|
||||||
|
{{/*
|
||||||
|
This error message is for end users. This can also occur if
|
||||||
|
AppVersion doesn't start with a 'v' in Chart.yaml.
|
||||||
|
*/}}
|
||||||
|
{{ fail "image.tag must start with a 'v' and be valid semver" }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- $tag -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "curl-options" -}}
|
||||||
|
{{- print " -svm3 --fail --retry \"120\" --retry-max-time \"120\" --retry-all-errors -o - -w \"\\nstatus=%{http_code} %{redirect_url} size=%{size_download} time=%{time_total} content-type=\\\"%{content_type}\\\"\\n\" "}}
|
||||||
|
{{- end -}}
|
|
@ -0,0 +1,268 @@
|
||||||
|
{{/*
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
(the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
{{- if .Values.deployment.create -}}
|
||||||
|
{{- $root := deepCopy . }}
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ include "connectors.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- with include "full.labels" . }}
|
||||||
|
{{- . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with $.Values.deployment.annotations }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- with dig "replicas" "" .Values.deployment }}
|
||||||
|
replicas: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
progressDeadlineSeconds: {{ .Values.deployment.progressDeadlineSeconds }}
|
||||||
|
revisionHistoryLimit: {{ .Values.deployment.revisionHistoryLimit }}
|
||||||
|
selector:
|
||||||
|
matchLabels: {{ (include "connectors-pod-labels" .) | nindent 6 }}
|
||||||
|
strategy: {{- toYaml .Values.deployment.strategy | nindent 4 }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
{{- with $.Values.deployment.annotations }}
|
||||||
|
annotations: {{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
labels:
|
||||||
|
{{- with include "connectors-pod-labels" . }}
|
||||||
|
{{- . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
terminationGracePeriodSeconds: {{ .Values.deployment.terminationGracePeriodSeconds }}
|
||||||
|
affinity:
|
||||||
|
{{- with .Values.deployment.nodeAffinity }}
|
||||||
|
nodeAffinity: {{- toYaml . | nindent 10 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.deployment.podAffinity }}
|
||||||
|
podAffinity: {{- toYaml . | nindent 10 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.deployment.podAntiAffinity }}
|
||||||
|
podAntiAffinity:
|
||||||
|
{{- if eq .Values.deployment.podAntiAffinity.type "hard" }}
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- topologyKey: {{ .Values.deployment.podAntiAffinity.topologyKey }}
|
||||||
|
namespaces:
|
||||||
|
- {{ .Release.Namespace | quote }}
|
||||||
|
labelSelector:
|
||||||
|
matchLabels: {{ include "connectors-pod-labels" . | nindent 18 }}
|
||||||
|
{{- else if eq .Values.deployment.podAntiAffinity.type "soft" }}
|
||||||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- weight: {{ .Values.deployment.podAntiAffinity.weight | int64 }}
|
||||||
|
podAffinityTerm:
|
||||||
|
topologyKey: {{ .Values.deployment.podAntiAffinity.topologyKey }}
|
||||||
|
labelSelector:
|
||||||
|
matchLabels: {{ include "connectors-pod-labels" . | nindent 20 }}
|
||||||
|
{{- else if eq .Values.deployment.podAntiAffinity.type "custom" }}
|
||||||
|
{{- toYaml .Values.deployment.podAntiAffinity.custom | nindent 10 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
serviceAccountName: {{ include "connectors.serviceAccountName" . }}
|
||||||
|
containers:
|
||||||
|
- name: connectors-cluster
|
||||||
|
image: {{ .Values.image.repository }}:{{ include "connectors.tag" . }}
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
securityContext:
|
||||||
|
{{- with .Values.container.securityContext }}
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.deployment.command }}
|
||||||
|
command: {{ toJson . }}
|
||||||
|
{{- end }}
|
||||||
|
env:
|
||||||
|
- name: CONNECT_CONFIGURATION
|
||||||
|
value: |
|
||||||
|
rest.advertised.port={{ .Values.connectors.restPort }}
|
||||||
|
rest.port={{ .Values.connectors.restPort }}
|
||||||
|
key.converter=org.apache.kafka.connect.converters.ByteArrayConverter
|
||||||
|
value.converter=org.apache.kafka.connect.converters.ByteArrayConverter
|
||||||
|
group.id={{ .Values.connectors.groupID }}
|
||||||
|
offset.storage.topic={{ .Values.connectors.storage.topic.offset }}
|
||||||
|
config.storage.topic={{ .Values.connectors.storage.topic.config }}
|
||||||
|
status.storage.topic={{ .Values.connectors.storage.topic.status }}
|
||||||
|
offset.storage.redpanda.remote.read={{ .Values.connectors.storage.remote.read.offset }}
|
||||||
|
offset.storage.redpanda.remote.write={{ .Values.connectors.storage.remote.write.offset }}
|
||||||
|
config.storage.redpanda.remote.read={{ .Values.connectors.storage.remote.read.config }}
|
||||||
|
config.storage.redpanda.remote.write={{ .Values.connectors.storage.remote.write.config }}
|
||||||
|
status.storage.redpanda.remote.read={{ .Values.connectors.storage.remote.read.status }}
|
||||||
|
status.storage.redpanda.remote.write={{ .Values.connectors.storage.remote.write.status }}
|
||||||
|
offset.storage.replication.factor={{ .Values.connectors.storage.replicationFactor.offset }}
|
||||||
|
config.storage.replication.factor={{ .Values.connectors.storage.replicationFactor.config }}
|
||||||
|
status.storage.replication.factor={{ .Values.connectors.storage.replicationFactor.status }}
|
||||||
|
producer.linger.ms={{ .Values.connectors.producerLingerMS }}
|
||||||
|
producer.batch.size={{ .Values.connectors.producerBatchSize }}
|
||||||
|
config.providers=file,secretsManager,env
|
||||||
|
config.providers.file.class=org.apache.kafka.common.config.provider.FileConfigProvider
|
||||||
|
{{- if .Values.connectors.secretManager.enabled }}
|
||||||
|
config.providers.secretsManager.class=com.github.jcustenborder.kafka.config.aws.SecretsManagerConfigProvider
|
||||||
|
config.providers.secretsManager.param.secret.prefix={{ .Values.connectors.secretManager.consolePrefix }}{{ .Values.connectors.secretManager.connectorsPrefix }}
|
||||||
|
config.providers.secretsManager.param.aws.region={{ .Values.connectors.secretManager.region }}
|
||||||
|
{{- end }}
|
||||||
|
config.providers.env.class=org.apache.kafka.common.config.provider.EnvVarConfigProvider
|
||||||
|
- name: CONNECT_ADDITIONAL_CONFIGURATION
|
||||||
|
value: {{ .Values.connectors.additionalConfiguration | quote }}
|
||||||
|
- name: CONNECT_BOOTSTRAP_SERVERS
|
||||||
|
value: {{ .Values.connectors.bootstrapServers | quote }}
|
||||||
|
{{- if .Values.connectors.schemaRegistryURL }}
|
||||||
|
- name: SCHEMA_REGISTRY_URL
|
||||||
|
value: {{ .Values.connectors.schemaRegistryURL | quote }}
|
||||||
|
{{- end }}
|
||||||
|
- name: CONNECT_GC_LOG_ENABLED
|
||||||
|
value: {{ .Values.container.javaGCLogEnabled | quote }}
|
||||||
|
- name: CONNECT_HEAP_OPTS
|
||||||
|
value: -Xms256M -Xmx{{ .Values.container.resources.javaMaxHeapSize }}
|
||||||
|
- name: CONNECT_LOG_LEVEL
|
||||||
|
value: {{ .Values.logging.level }}
|
||||||
|
{{- if and .Values.auth.sasl.userName .Values.auth.sasl.mechanism .Values.auth.sasl.secretRef }}
|
||||||
|
- name: CONNECT_SASL_USERNAME
|
||||||
|
value: {{ .Values.auth.sasl.userName }}
|
||||||
|
- name: CONNECT_SASL_MECHANISM
|
||||||
|
value: {{ .Values.auth.sasl.mechanism }}
|
||||||
|
- name: CONNECT_SASL_PASSWORD_FILE
|
||||||
|
value: rc-credentials/password
|
||||||
|
{{- end }}
|
||||||
|
- name: CONNECT_TLS_ENABLED
|
||||||
|
value: {{ .Values.connectors.brokerTLS.enabled | quote }}
|
||||||
|
{{- if .Values.connectors.brokerTLS.ca.secretRef }}
|
||||||
|
- name: CONNECT_TRUSTED_CERTS
|
||||||
|
value: {{ printf "ca/%s" (default "ca.crt" .Values.connectors.brokerTLS.ca.secretNameOverwrite) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.connectors.brokerTLS.cert.secretRef }}
|
||||||
|
- name: CONNECT_TLS_AUTH_CERT
|
||||||
|
value: {{ printf "cert/%s" (default "tls.crt" .Values.connectors.brokerTLS.cert.secretNameOverwrite) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.connectors.brokerTLS.key.secretRef }}
|
||||||
|
- name: CONNECT_TLS_AUTH_KEY
|
||||||
|
value: {{ printf "key/%s" (default "tls.key" .Values.connectors.brokerTLS.key.secretNameOverwrite) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.deployment.extraEnv }}
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
envFrom:
|
||||||
|
{{- with .Values.deployment.extraEnvFrom }}
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: rest-api
|
||||||
|
scheme: HTTP
|
||||||
|
initialDelaySeconds: {{ .Values.deployment.livenessProbe.initialDelaySeconds }}
|
||||||
|
failureThreshold: {{ .Values.deployment.livenessProbe.failureThreshold }}
|
||||||
|
periodSeconds: {{ .Values.deployment.livenessProbe.periodSeconds }}
|
||||||
|
successThreshold: {{ .Values.deployment.livenessProbe.successThreshold }}
|
||||||
|
timeoutSeconds: {{ .Values.deployment.livenessProbe.timeoutSeconds }}
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /connectors
|
||||||
|
port: rest-api
|
||||||
|
scheme: HTTP
|
||||||
|
initialDelaySeconds: {{ .Values.deployment.readinessProbe.initialDelaySeconds }}
|
||||||
|
failureThreshold: {{ .Values.deployment.readinessProbe.failureThreshold }}
|
||||||
|
periodSeconds: {{ .Values.deployment.readinessProbe.periodSeconds }}
|
||||||
|
successThreshold: {{ .Values.deployment.readinessProbe.successThreshold }}
|
||||||
|
timeoutSeconds: {{ .Values.deployment.readinessProbe.timeoutSeconds }}
|
||||||
|
ports:
|
||||||
|
- containerPort: {{ .Values.connectors.restPort }}
|
||||||
|
name: rest-api
|
||||||
|
protocol: TCP
|
||||||
|
{{- range $port := .Values.service.ports }}
|
||||||
|
- containerPort: {{ $port.port }}
|
||||||
|
name: {{ $port.name }}
|
||||||
|
protocol: TCP
|
||||||
|
{{- end }}
|
||||||
|
resources:
|
||||||
|
requests: {{ toYaml .Values.container.resources.request | nindent 14 }}
|
||||||
|
limits: {{ toYaml .Values.container.resources.limits | nindent 14 }}
|
||||||
|
terminationMessagePath: /dev/termination-log
|
||||||
|
terminationMessagePolicy: File
|
||||||
|
volumeMounts:
|
||||||
|
{{- if and .Values.auth.sasl.userName .Values.auth.sasl.mechanism .Values.auth.sasl.secretRef }}
|
||||||
|
- mountPath: /opt/kafka/connect-password/rc-credentials
|
||||||
|
name: rc-credentials
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.connectors.brokerTLS.ca.secretRef }}
|
||||||
|
- name: truststore
|
||||||
|
# The /opt/kafka/connect-certs is fixed path within Connectors
|
||||||
|
mountPath: /opt/kafka/connect-certs/ca
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.connectors.brokerTLS.cert.secretRef }}
|
||||||
|
- name: cert
|
||||||
|
# The /opt/kafka/connect-certs is fixed path within Connectors
|
||||||
|
mountPath: /opt/kafka/connect-certs/cert
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.connectors.brokerTLS.key.secretRef }}
|
||||||
|
- name: key
|
||||||
|
# The /opt/kafka/connect-certs is fixed path within Connectors
|
||||||
|
mountPath: /opt/kafka/connect-certs/key
|
||||||
|
{{- end }}
|
||||||
|
{{- toYaml .Values.storage.volumeMounts | nindent 12 }}
|
||||||
|
dnsPolicy: ClusterFirst
|
||||||
|
restartPolicy: {{ .Values.deployment.restartPolicy }}
|
||||||
|
{{- with .Values.deployment.schedulerName }}
|
||||||
|
schedulerName: {{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.deployment.nodeSelector }}
|
||||||
|
nodeSelector: {{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets: {{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.deployment.securityContext }}
|
||||||
|
securityContext: {{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.deployment.tolerations }}
|
||||||
|
tolerations: {{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
topologySpreadConstraints:
|
||||||
|
{{- range $spread := .Values.deployment.topologySpreadConstraints }}
|
||||||
|
- labelSelector:
|
||||||
|
matchLabels: {{ include "connectors-pod-labels" $root | nindent 14 }}
|
||||||
|
maxSkew: {{ $spread.maxSkew }}
|
||||||
|
topologyKey: {{ $spread.topologyKey }}
|
||||||
|
whenUnsatisfiable: {{ $spread.whenUnsatisfiable }}
|
||||||
|
{{- end }}
|
||||||
|
volumes:
|
||||||
|
{{- if .Values.connectors.brokerTLS.ca.secretRef }}
|
||||||
|
- name: truststore
|
||||||
|
secret:
|
||||||
|
defaultMode: 0o444
|
||||||
|
secretName: {{ .Values.connectors.brokerTLS.ca.secretRef }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.connectors.brokerTLS.cert.secretRef }}
|
||||||
|
- name: cert
|
||||||
|
secret:
|
||||||
|
defaultMode: 0o444
|
||||||
|
secretName: {{ .Values.connectors.brokerTLS.cert.secretRef }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.connectors.brokerTLS.key.secretRef }}
|
||||||
|
- name: key
|
||||||
|
secret:
|
||||||
|
defaultMode: 0o444
|
||||||
|
secretName: {{ .Values.connectors.brokerTLS.key.secretRef }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if and .Values.auth.sasl.userName .Values.auth.sasl.mechanism .Values.auth.sasl.secretRef }}
|
||||||
|
- name: rc-credentials
|
||||||
|
secret:
|
||||||
|
defaultMode: 0o444
|
||||||
|
secretName: {{ .Values.auth.sasl.secretRef }}
|
||||||
|
{{- end }}
|
||||||
|
{{- toYaml .Values.storage.volume | nindent 8 }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,40 @@
|
||||||
|
{{- if and (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") .Values.monitoring.enabled }}
|
||||||
|
{{/*
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
(the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: PodMonitor
|
||||||
|
metadata:
|
||||||
|
name: {{ template "connectors.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- with .Values.monitoring.labels }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
annotations:
|
||||||
|
{{- with .Values.monitoring.annotations }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- with .Values.monitoring.namespaceSelector }}
|
||||||
|
namespaceSelector: {{- toYaml . | nindent 4}}
|
||||||
|
{{- end }}
|
||||||
|
podMetricsEndpoints:
|
||||||
|
- path: /
|
||||||
|
port: prometheus
|
||||||
|
selector:
|
||||||
|
matchLabels: {{ (include "connectors-pod-labels" .) | nindent 6 }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,48 @@
|
||||||
|
{{/*
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
(the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ include "connectors.serviceName" . }}
|
||||||
|
labels:
|
||||||
|
{{- with include "full.labels" . }}
|
||||||
|
{{- . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with $.Values.service.annotations }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
ipFamilies:
|
||||||
|
- IPv4
|
||||||
|
ipFamilyPolicy: SingleStack
|
||||||
|
ports:
|
||||||
|
- name: rest-api
|
||||||
|
port: {{ .Values.connectors.restPort }}
|
||||||
|
targetPort: {{ .Values.connectors.restPort }}
|
||||||
|
protocol: TCP
|
||||||
|
{{- range $port := .Values.service.ports }}
|
||||||
|
- name: {{ $port.name }}
|
||||||
|
port: {{ $port.port }}
|
||||||
|
targetPort: {{ $port.port }}
|
||||||
|
protocol: TCP
|
||||||
|
{{- end }}
|
||||||
|
selector:
|
||||||
|
{{- with include "connectors-pod-labels" . }}
|
||||||
|
{{- . | nindent 6 }}
|
||||||
|
{{- end }}
|
||||||
|
sessionAffinity: None
|
||||||
|
type: ClusterIP
|
|
@ -0,0 +1,32 @@
|
||||||
|
{{/*
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
(the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
---
|
||||||
|
{{- if .Values.serviceAccount.create -}}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: {{ include "connectors.serviceAccountName" . }}
|
||||||
|
namespace: {{ .Release.Namespace | quote }}
|
||||||
|
labels:
|
||||||
|
{{- with include "full.labels" . }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.serviceAccount.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,173 @@
|
||||||
|
{{/*
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
(the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
{{- if .Values.test.create -}}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: {{ include "connectors.fullname" . }}-mm2-test-{{ randNumeric 3 }}
|
||||||
|
namespace: {{ .Release.Namespace | quote }}
|
||||||
|
labels:
|
||||||
|
{{- with include "full.labels" . }}
|
||||||
|
{{- . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
annotations:
|
||||||
|
"helm.sh/hook": test
|
||||||
|
"helm.sh/hook-delete-policy": before-hook-creation
|
||||||
|
spec:
|
||||||
|
restartPolicy: Never
|
||||||
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets: {{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: create-mm2
|
||||||
|
image: docker.redpanda.com/redpandadata/redpanda:latest
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
set -xe
|
||||||
|
|
||||||
|
trap connectorsState ERR
|
||||||
|
|
||||||
|
connectorsState () {
|
||||||
|
echo check connectors expand status
|
||||||
|
curl {{ template "curl-options" . }} http://{{ include "connectors.serviceName" . }}:{{ .Values.connectors.restPort }}/connectors?expand=status
|
||||||
|
echo check connectors expand info
|
||||||
|
curl {{ template "curl-options" . }} http://{{ include "connectors.serviceName" . }}:{{ .Values.connectors.restPort }}/connectors?expand=info
|
||||||
|
echo check connector configuration
|
||||||
|
curl {{ template "curl-options" . }} http://{{ include "connectors.serviceName" . }}:{{ .Values.connectors.restPort }}/connectors/$CONNECTOR_NAME
|
||||||
|
echo check connector topics
|
||||||
|
curl {{ template "curl-options" . }} http://{{ include "connectors.serviceName" . }}:{{ .Values.connectors.restPort }}/connectors/$CONNECTOR_NAME/topics
|
||||||
|
}
|
||||||
|
|
||||||
|
curl {{ template "curl-options" . }} http://{{ include "connectors.serviceName" . }}:{{ .Values.connectors.restPort }}/connectors
|
||||||
|
|
||||||
|
SASL_MECHANISM="PLAIN"
|
||||||
|
{{- if .Values.auth.sasl.enabled }}
|
||||||
|
set -e
|
||||||
|
set +x
|
||||||
|
|
||||||
|
IFS=: read -r CONNECT_SASL_USERNAME KAFKA_SASL_PASSWORD CONNECT_SASL_MECHANISM < $(find /mnt/users/* -print)
|
||||||
|
CONNECT_SASL_MECHANISM=${CONNECT_SASL_MECHANISM:-{{ .Values.auth.sasl.mechanism | upper }}}
|
||||||
|
if [[ -n "$CONNECT_SASL_USERNAME" && -n "$KAFKA_SASL_PASSWORD" && -n "$CONNECT_SASL_MECHANISM" ]]; then
|
||||||
|
rpk profile set user=$CONNECT_SASL_USERNAME pass=$KAFKA_SASL_PASSWORD sasl.mechanism=$CONNECT_SASL_MECHANISM
|
||||||
|
SASL_MECHANISM=$CONNECT_SASL_MECHANISM
|
||||||
|
JAAS_CONFIG_SOURCE="\"source.cluster.sasl.jaas.config\": \"org.apache.kafka.common.security.scram.ScramLoginModule required username=\\\\"\"${CONNECT_SASL_USERNAME}\\\\"\" password=\\\\"\"${KAFKA_SASL_PASSWORD}\\\\"\";\","
|
||||||
|
JAAS_CONFIG_TARGET="\"target.cluster.sasl.jaas.config\": \"org.apache.kafka.common.security.scram.ScramLoginModule required username=\\\\"\"${CONNECT_SASL_USERNAME}\\\\"\" password=\\\\"\"${KAFKA_SASL_PASSWORD}\\\\"\";\","
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -x
|
||||||
|
set +e
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
rpk profile create test
|
||||||
|
rpk profile set tls.enabled={{.Values.connectors.brokerTLS.enabled}} brokers={{ .Values.connectors.bootstrapServers }}
|
||||||
|
{{- if .Values.connectors.brokerTLS.ca.secretRef }}
|
||||||
|
rpk profile set tls.ca={{ printf "/redpanda-certs/%s" (default "ca.crt" .Values.connectors.brokerTLS.ca.secretNameOverwrite) }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.connectors.brokerTLS.enabled }}
|
||||||
|
CONNECT_TLS_ENABLED=true
|
||||||
|
{{- else }}
|
||||||
|
CONNECT_TLS_ENABLED=false
|
||||||
|
{{- end }}
|
||||||
|
SECURITY_PROTOCOL=PLAINTEXT
|
||||||
|
if [[ -n "$CONNECT_SASL_MECHANISM" && $CONNECT_TLS_ENABLED == "true" ]]; then
|
||||||
|
SECURITY_PROTOCOL="SASL_SSL"
|
||||||
|
elif [[ -n "$CONNECT_SASL_MECHANISM" ]]; then
|
||||||
|
SECURITY_PROTOCOL="SASL_PLAINTEXT"
|
||||||
|
elif [[ $CONNECT_TLS_ENABLED == "true" ]]; then
|
||||||
|
SECURITY_PROTOCOL="SSL"
|
||||||
|
fi
|
||||||
|
|
||||||
|
rpk topic list
|
||||||
|
rpk topic create test-topic
|
||||||
|
rpk topic list
|
||||||
|
echo "Test message!" | rpk topic produce test-topic
|
||||||
|
|
||||||
|
CONNECTOR_NAME=mm2-$RANDOM
|
||||||
|
cat << 'EOF' > /tmp/mm2-conf.json
|
||||||
|
{
|
||||||
|
"name": "CONNECTOR_NAME",
|
||||||
|
"config": {
|
||||||
|
"connector.class": "org.apache.kafka.connect.mirror.MirrorSourceConnector",
|
||||||
|
"topics": "test-topic",
|
||||||
|
"replication.factor": "1",
|
||||||
|
"tasks.max": "1",
|
||||||
|
"source.cluster.bootstrap.servers": {{ .Values.connectors.bootstrapServers | quote }},
|
||||||
|
"target.cluster.bootstrap.servers": {{ .Values.connectors.bootstrapServers | quote }},
|
||||||
|
"target.cluster.alias": "test-only",
|
||||||
|
"source.cluster.alias": "source",
|
||||||
|
"key.converter": "org.apache.kafka.connect.converters.ByteArrayConverter",
|
||||||
|
"value.converter": "org.apache.kafka.connect.converters.ByteArrayConverter",
|
||||||
|
"source->target.enabled": "true",
|
||||||
|
"target->source.enabled": "false",
|
||||||
|
"sync.topic.configs.interval.seconds": "5",
|
||||||
|
"sync.topics.configs.enabled": "true",
|
||||||
|
"source.cluster.ssl.truststore.type": "PEM",
|
||||||
|
"target.cluster.ssl.truststore.type": "PEM",
|
||||||
|
"source.cluster.ssl.truststore.location": {{ printf "/opt/kafka/connect-certs/ca/%s" (default "ca.crt" .Values.connectors.brokerTLS.ca.secretNameOverwrite) | quote }},
|
||||||
|
"target.cluster.ssl.truststore.location": {{ printf "/opt/kafka/connect-certs/ca/%s" (default "ca.crt" .Values.connectors.brokerTLS.ca.secretNameOverwrite) | quote }},
|
||||||
|
JAAS_CONFIG_SOURCE
|
||||||
|
JAAS_CONFIG_TARGET
|
||||||
|
"source.cluster.security.protocol": "SECURITY_PROTOCOL",
|
||||||
|
"target.cluster.security.protocol": "SECURITY_PROTOCOL",
|
||||||
|
"source.cluster.sasl.mechanism": "SASL_MECHANISM",
|
||||||
|
"target.cluster.sasl.mechanism": "SASL_MECHANISM",
|
||||||
|
"offset-syncs.topic.replication.factor": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
sed -i "s/CONNECTOR_NAME/$CONNECTOR_NAME/g" /tmp/mm2-conf.json
|
||||||
|
sed -i "s/SASL_MECHANISM/$SASL_MECHANISM/g" /tmp/mm2-conf.json
|
||||||
|
sed -i "s/SECURITY_PROTOCOL/$SECURITY_PROTOCOL/g" /tmp/mm2-conf.json
|
||||||
|
set +x
|
||||||
|
sed -i "s/JAAS_CONFIG_SOURCE/$JAAS_CONFIG_SOURCE/g" /tmp/mm2-conf.json
|
||||||
|
sed -i "s/JAAS_CONFIG_TARGET/$JAAS_CONFIG_TARGET/g" /tmp/mm2-conf.json
|
||||||
|
set -x
|
||||||
|
|
||||||
|
curl {{ template "curl-options" . }} -H 'Content-Type: application/json' http://{{ include "connectors.serviceName" . }}:{{ .Values.connectors.restPort }}/connectors -d @/tmp/mm2-conf.json
|
||||||
|
|
||||||
|
# The rpk topic consume could fail for the first few times as kafka connect needs
|
||||||
|
# to spawn the task and copy one message from the source topic. To solve this race condition
|
||||||
|
# the retry should be implemented in bash for rpk topic consume or other mechanism that
|
||||||
|
# can confirm source connectors started its execution. As a fast fix fixed 30 second fix is added.
|
||||||
|
sleep 30
|
||||||
|
|
||||||
|
rpk topic consume source.test-topic -n 1 | grep "Test message!"
|
||||||
|
|
||||||
|
curl {{ template "curl-options" . }} -X DELETE http://{{ include "connectors.serviceName" . }}:{{ .Values.connectors.restPort }}/connectors/$CONNECTOR_NAME
|
||||||
|
|
||||||
|
curl {{ template "curl-options" . }} http://{{ include "connectors.serviceName" . }}:{{ .Values.connectors.restPort }}/connectors
|
||||||
|
|
||||||
|
rpk topic delete test-topic source.test-topic mm2-offset-syncs.test-only.internal
|
||||||
|
volumeMounts:
|
||||||
|
{{- if .Values.connectors.brokerTLS.ca.secretRef }}
|
||||||
|
- mountPath: /redpanda-certs
|
||||||
|
name: redpanda-ca
|
||||||
|
{{- end }}
|
||||||
|
{{- toYaml .Values.storage.volumeMounts | nindent 8 }}
|
||||||
|
volumes:
|
||||||
|
{{- if .Values.connectors.brokerTLS.ca.secretRef }}
|
||||||
|
- name: redpanda-ca
|
||||||
|
secret:
|
||||||
|
defaultMode: 0444
|
||||||
|
secretName: {{ .Values.connectors.brokerTLS.ca.secretRef }}
|
||||||
|
{{- end }}
|
||||||
|
{{- toYaml .Values.storage.volume | nindent 4 }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,312 @@
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
# contributor license agreements. See the NOTICE file distributed with
|
||||||
|
# this work for additional information regarding copyright ownership.
|
||||||
|
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
# (the "License"); you may not use this file except in compliance with
|
||||||
|
# the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
# This file contains values for variables referenced from yaml files in the templates directory.
|
||||||
|
#
|
||||||
|
# For further information on Helm templating see the documentation at:
|
||||||
|
# https://helm.sh/docs/chart_template_guide/values_files/
|
||||||
|
|
||||||
|
#
|
||||||
|
# >>> This chart requires Helm version 3.6.0 or greater <<<
|
||||||
|
#
|
||||||
|
|
||||||
|
# Common settings
|
||||||
|
#
|
||||||
|
# -- Override `connectors.name` template.
|
||||||
|
nameOverride: ""
|
||||||
|
# -- Override `connectors.fullname` template.
|
||||||
|
fullnameOverride: ""
|
||||||
|
# -- Additional labels to add to all Kubernetes objects.
|
||||||
|
# For example, `my.k8s.service: redpanda`.
|
||||||
|
commonLabels: {}
|
||||||
|
# -- Taints to be tolerated by Pods.
|
||||||
|
# For details,
|
||||||
|
# see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/).
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
# -- Redpanda Docker image settings.
|
||||||
|
image:
|
||||||
|
# -- Docker repository from which to pull the Redpanda Docker image.
|
||||||
|
repository: docker.redpanda.com/redpandadata/connectors
|
||||||
|
# -- The Redpanda version.
|
||||||
|
# See DockerHub for:
|
||||||
|
# [All stable versions](https://hub.docker.com/r/redpandadata/redpanda/tags)
|
||||||
|
# and [all unstable versions](https://hub.docker.com/r/redpandadata/redpanda-unstable/tags).
|
||||||
|
# @default -- `Chart.appVersion`.
|
||||||
|
tag: ""
|
||||||
|
# -- The imagePullPolicy.
|
||||||
|
# If `image.tag` is 'latest', the default is `Always`.
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
# -- Pull secrets may be used to provide credentials to image repositories
|
||||||
|
# See https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||||
|
imagePullSecrets: []
|
||||||
|
|
||||||
|
test:
|
||||||
|
create: true
|
||||||
|
|
||||||
|
connectors:
|
||||||
|
# -- The port on which the Kafka Connect REST API listens. The API is used for administrative tasks.
|
||||||
|
restPort: 8083
|
||||||
|
# -- A comma-separated list of Redpanda broker addresses in the format of IP:Port or DNS:Port. Kafka Connect uses this to connect to the Redpanda/Kafka cluster.
|
||||||
|
bootstrapServers: ""
|
||||||
|
# A comma-separated list of Schema Registry addresses in the format IP:Port or DNS:Port. The Schema Registry is a service that manages the schemas used by producers and consumers.
|
||||||
|
schemaRegistryURL: ""
|
||||||
|
# -- A placeholder for any Java configuration settings for Kafka Connect that are not explicitly defined in this Helm chart. Java configuration settings are passed to the Kafka Connect startup script.
|
||||||
|
additionalConfiguration: ""
|
||||||
|
secretManager:
|
||||||
|
enabled: false
|
||||||
|
region: ""
|
||||||
|
consolePrefix: ""
|
||||||
|
connectorsPrefix: ""
|
||||||
|
# -- The number of bytes of records a producer will attempt to batch together before sending to Redpanda. Batching improves throughput.
|
||||||
|
producerBatchSize: 131072
|
||||||
|
# -- The time, in milliseconds, that a producer will wait before sending a batch of records. Waiting allows the producer to gather more records in the same batch and improve throughput.
|
||||||
|
producerLingerMS: 1
|
||||||
|
storage:
|
||||||
|
# -- The number of replicas for each of the internal topics that Kafka Connect uses.
|
||||||
|
replicationFactor:
|
||||||
|
# -- Replication factor for the offset topic.
|
||||||
|
offset: -1
|
||||||
|
# -- Replication factor for the configuration topic.
|
||||||
|
config: -1
|
||||||
|
# -- Replication factor for the status topic.
|
||||||
|
status: -1
|
||||||
|
# -- Indicates if read and write operations for the respective topics are allowed remotely.
|
||||||
|
remote:
|
||||||
|
read:
|
||||||
|
offset: false
|
||||||
|
config: false
|
||||||
|
status: false
|
||||||
|
write:
|
||||||
|
offset: false
|
||||||
|
config: false
|
||||||
|
status: false
|
||||||
|
topic:
|
||||||
|
# -- The name of the internal topic that Kafka Connect uses to store source connector offsets.
|
||||||
|
offset: _internal_connectors_offsets
|
||||||
|
# -- The name of the internal topic that Kafka Connect uses to store connector and task configurations.
|
||||||
|
config: _internal_connectors_configs
|
||||||
|
# -- The name of the internal topic that Kafka Connect uses to store connector and task status updates.
|
||||||
|
status: _internal_connectors_status
|
||||||
|
# -- A unique string that identifies the Kafka Connect cluster. It's used in the formation of the internal topic names, ensuring that multiple Kafka Connect clusters can connect to the same Redpanda cluster without interfering with each other.
|
||||||
|
groupID: connectors-cluster
|
||||||
|
brokerTLS:
|
||||||
|
enabled: false
|
||||||
|
ca:
|
||||||
|
# -- The name of the Secret where the ca.crt file content is located.
|
||||||
|
secretRef: ""
|
||||||
|
# -- If `secretRef` points to a Secret where the certificate authority (CA) is not under the
|
||||||
|
# `ca.crt` key, use `secretNameOverwrite` to overwrite it e.g. `corp-ca.crt`.
|
||||||
|
secretNameOverwrite: ""
|
||||||
|
cert:
|
||||||
|
# -- The name of the secret where client signed certificate is located
|
||||||
|
secretRef: ""
|
||||||
|
# -- If secretRef points to secret where client signed certificate is not under
|
||||||
|
# tls.crt key then please use secretNameOverwrite to overwrite it e.g. corp-tls.crt
|
||||||
|
secretNameOverwrite: ""
|
||||||
|
key:
|
||||||
|
# -- The name of the secret where client private key is located
|
||||||
|
secretRef: ""
|
||||||
|
# -- If secretRef points to secret where client private key is not under
|
||||||
|
# tls.key key then please use secretNameOverwrite to overwrite it e.g. corp-tls.key
|
||||||
|
secretNameOverwrite: ""
|
||||||
|
|
||||||
|
# -- Authentication settings.
|
||||||
|
# For details,
|
||||||
|
# see the [SASL documentation](https://docs.redpanda.com/docs/manage/kubernetes/security/sasl-kubernetes/).
|
||||||
|
# The first line of the secret file is used. So the first superuser is used to authenticate to the Redpanda cluster.
|
||||||
|
auth:
|
||||||
|
sasl:
|
||||||
|
enabled: false
|
||||||
|
# -- The authentication mechanism to use for the superuser. Options are `scram-sha-256` and `scram-sha-512`.
|
||||||
|
mechanism: scram-sha-512
|
||||||
|
# -- A Secret that contains your SASL user password.
|
||||||
|
secretRef: ""
|
||||||
|
userName: ""
|
||||||
|
|
||||||
|
# -- Log-level settings.
|
||||||
|
logging:
|
||||||
|
# -- Log level
|
||||||
|
# Valid values (from least to most verbose) are: `error`, `warn`, `info` and `debug`.
|
||||||
|
level: warn
|
||||||
|
|
||||||
|
# -- Monitoring.
|
||||||
|
# When set to `true`, the Helm chart creates a PodMonitor that can be used by Prometheus-Operator or VictoriaMetrics-Operator to scrape the metrics.
|
||||||
|
monitoring:
|
||||||
|
enabled: false
|
||||||
|
scrapeInterval: 30s
|
||||||
|
labels: {}
|
||||||
|
annotations: {}
|
||||||
|
namespaceSelector:
|
||||||
|
any: true
|
||||||
|
|
||||||
|
container:
|
||||||
|
#
|
||||||
|
# -- Security context for the Redpanda Connectors container.
|
||||||
|
# See also `deployment.securityContext` for Pod-level settings.
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
# -- Pod resource management.
|
||||||
|
resources:
|
||||||
|
request:
|
||||||
|
cpu: 1
|
||||||
|
memory: 2350Mi
|
||||||
|
limits:
|
||||||
|
cpu: 1
|
||||||
|
memory: 2350Mi
|
||||||
|
# -- Java maximum heap size must not be greater than `container.resources.limits.memory`.
|
||||||
|
javaMaxHeapSize: 2G
|
||||||
|
javaGCLogEnabled: "false"
|
||||||
|
|
||||||
|
deployment:
|
||||||
|
# Replicas can be used to scale Deployment
|
||||||
|
# replicas
|
||||||
|
|
||||||
|
create: true
|
||||||
|
# Customize the command to use as the entrypoint of the Deployment.
|
||||||
|
# command: []
|
||||||
|
strategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
schedulerName: ""
|
||||||
|
updateStrategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
budget:
|
||||||
|
maxUnavailable: 1
|
||||||
|
# -- Additional annotations to apply to the Pods of this Deployment.
|
||||||
|
annotations: {}
|
||||||
|
# -- Adjust the period for your probes to meet your needs.
|
||||||
|
# For details,
|
||||||
|
# see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes).
|
||||||
|
livenessProbe:
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
failureThreshold: 3
|
||||||
|
periodSeconds: 10
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 1
|
||||||
|
readinessProbe:
|
||||||
|
initialDelaySeconds: 60
|
||||||
|
failureThreshold: 2
|
||||||
|
periodSeconds: 10
|
||||||
|
successThreshold: 3
|
||||||
|
timeoutSeconds: 5
|
||||||
|
|
||||||
|
# -- Additional environment variables for the Pods.
|
||||||
|
extraEnv: []
|
||||||
|
# - name: RACK_ID
|
||||||
|
# value: "1"
|
||||||
|
|
||||||
|
# -- Configure extra environment variables from Secrets and ConfigMaps.
|
||||||
|
extraEnvFrom: []
|
||||||
|
# - secretRef:
|
||||||
|
# name: my-secret
|
||||||
|
# - configMapRef:
|
||||||
|
# name: my-configmap
|
||||||
|
|
||||||
|
# -- The maximum time in seconds for a deployment to make progress before it is
|
||||||
|
# considered to be failed. The deployment controller will continue to process
|
||||||
|
# failed deployments and a condition with a ProgressDeadlineExceeded reason
|
||||||
|
# will be surfaced in the deployment status. Note that progress will not be
|
||||||
|
# estimated during the time a deployment is paused.
|
||||||
|
progressDeadlineSeconds: 600
|
||||||
|
|
||||||
|
# -- The number of old ReplicaSets to retain to allow rollback. This is a pointer
|
||||||
|
# to distinguish between explicit zero and not specified.
|
||||||
|
revisionHistoryLimit: 10
|
||||||
|
|
||||||
|
# -- Inter-Pod Affinity rules for scheduling Pods of this Deployment.
|
||||||
|
# For details,
|
||||||
|
# see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity).
|
||||||
|
podAffinity: {}
|
||||||
|
# -- Node Affinity rules for scheduling Pods of this Deployment.
|
||||||
|
# The suggestion would be to spread Pods according to topology zone.
|
||||||
|
# For details,
|
||||||
|
# see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity).
|
||||||
|
nodeAffinity: {}
|
||||||
|
# -- Anti-affinity rules for scheduling Pods of this Deployment.
|
||||||
|
# For details,
|
||||||
|
# see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity).
|
||||||
|
# You may either edit the default settings for anti-affinity rules,
|
||||||
|
# or specify new anti-affinity rules to use instead of the defaults.
|
||||||
|
podAntiAffinity:
|
||||||
|
# -- The `topologyKey` to be used.
|
||||||
|
# Can be used to spread across different nodes, AZs, regions etc.
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
|
# -- Valid anti-affinity types are `soft`, `hard`, or `custom`.
|
||||||
|
# Use `custom` if you want to supply your own anti-affinity rules in the `podAntiAffinity.custom` object.
|
||||||
|
type: hard
|
||||||
|
# -- Weight for `soft` anti-affinity rules.
|
||||||
|
# Does not apply for other anti-affinity types.
|
||||||
|
weight: 100
|
||||||
|
# -- Change `podAntiAffinity.type` to `custom` and provide your own podAntiAffinity rules here.
|
||||||
|
custom: {}
|
||||||
|
# -- Node selection constraints for scheduling Pods of this Deployment.
|
||||||
|
# These constraints override the global `nodeSelector` value.
|
||||||
|
# For details,
|
||||||
|
# see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector).
|
||||||
|
nodeSelector: {}
|
||||||
|
# -- PriorityClassName given to Pods of this Deployment.
|
||||||
|
# For details,
|
||||||
|
# see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass).
|
||||||
|
priorityClassName: ""
|
||||||
|
# -- Taints to be tolerated by Pods of this Deployment.
|
||||||
|
# These tolerations override the global tolerations value.
|
||||||
|
# For details,
|
||||||
|
# see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/).
|
||||||
|
tolerations: []
|
||||||
|
# For details,
|
||||||
|
# see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/).
|
||||||
|
topologySpreadConstraints:
|
||||||
|
- maxSkew: 1
|
||||||
|
topologyKey: topology.kubernetes.io/zone
|
||||||
|
whenUnsatisfiable: ScheduleAnyway
|
||||||
|
securityContext:
|
||||||
|
fsGroup: 101
|
||||||
|
runAsUser: 101
|
||||||
|
fsGroupChangePolicy: OnRootMismatch
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
|
restartPolicy: Always
|
||||||
|
|
||||||
|
storage:
|
||||||
|
volume:
|
||||||
|
- emptyDir:
|
||||||
|
medium: Memory
|
||||||
|
sizeLimit: 5Mi
|
||||||
|
name: rp-connect-tmp
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /tmp
|
||||||
|
name: rp-connect-tmp
|
||||||
|
|
||||||
|
# -- ServiceAccount management.
|
||||||
|
serviceAccount:
|
||||||
|
# -- Specifies whether a ServiceAccount should be created.
|
||||||
|
create: false
|
||||||
|
# -- Annotations to add to the ServiceAccount.
|
||||||
|
annotations: {}
|
||||||
|
# -- The name of the ServiceAccount to use.
|
||||||
|
# If not set and `serviceAccount.create` is `true`,
|
||||||
|
# a name is generated using the `connectors.fullname` template.
|
||||||
|
name: ""
|
||||||
|
|
||||||
|
# -- Service management.
|
||||||
|
service:
|
||||||
|
# -- Annotations to add to the Service.
|
||||||
|
annotations: {}
|
||||||
|
# -- The name of the service to use.
|
||||||
|
# If not set, a name is generated using the `connectors.fullname` template.
|
||||||
|
name: ""
|
||||||
|
ports:
|
||||||
|
- name: prometheus
|
||||||
|
port: 9404
|
|
@ -0,0 +1,24 @@
|
||||||
|
# Patterns to ignore when building packages.
|
||||||
|
# This supports shell glob matching, relative path matching, and
|
||||||
|
# negation (prefixed with !). Only one pattern per line.
|
||||||
|
.DS_Store
|
||||||
|
README.md.gotmpl
|
||||||
|
# Common VCS dirs
|
||||||
|
.git/
|
||||||
|
.gitignore
|
||||||
|
.bzr/
|
||||||
|
.bzrignore
|
||||||
|
.hg/
|
||||||
|
.hgignore
|
||||||
|
.svn/
|
||||||
|
# Common backup files
|
||||||
|
*.swp
|
||||||
|
*.bak
|
||||||
|
*.tmp
|
||||||
|
*.orig
|
||||||
|
*~
|
||||||
|
# Various IDEs
|
||||||
|
.project
|
||||||
|
.idea/
|
||||||
|
*.tmproj
|
||||||
|
.vscode/
|
|
@ -0,0 +1,22 @@
|
||||||
|
annotations:
|
||||||
|
artifacthub.io/images: |
|
||||||
|
- name: redpanda
|
||||||
|
image: docker.redpanda.com/redpandadata/console:v2.4.6
|
||||||
|
artifacthub.io/license: Apache-2.0
|
||||||
|
artifacthub.io/links: |
|
||||||
|
- name: Documentation
|
||||||
|
url: https://docs.redpanda.com
|
||||||
|
- name: "Helm (>= 3.6.0)"
|
||||||
|
url: https://helm.sh/docs/intro/install/
|
||||||
|
apiVersion: v2
|
||||||
|
appVersion: v2.4.6
|
||||||
|
description: Helm chart to deploy Redpanda Console.
|
||||||
|
icon: https://images.ctfassets.net/paqvtpyf8rwu/3cYHw5UzhXCbKuR24GDFGO/73fb682e6157d11c10d5b2b5da1d5af0/skate-stand-panda.svg
|
||||||
|
maintainers:
|
||||||
|
- name: redpanda-data
|
||||||
|
url: https://github.com/orgs/redpanda-data/people
|
||||||
|
name: console
|
||||||
|
sources:
|
||||||
|
- https://github.com/redpanda-data/helm-charts
|
||||||
|
type: application
|
||||||
|
version: 0.7.26
|
|
@ -0,0 +1,349 @@
|
||||||
|
# Redpanda Console Helm Chart Specification
|
||||||
|
---
|
||||||
|
description: Find the default values and descriptions of settings in the Redpanda Console Helm chart.
|
||||||
|
---
|
||||||
|
|
||||||
|
![Version: 0.7.26](https://img.shields.io/badge/Version-0.7.26-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.4.6](https://img.shields.io/badge/AppVersion-v2.4.6-informational?style=flat-square)
|
||||||
|
|
||||||
|
This page describes the official Redpanda Console Helm Chart. In particular, this page describes the contents of the chart’s [`values.yaml` file](https://github.com/redpanda-data/helm-charts/blob/main/charts/console/values.yaml).
|
||||||
|
Each of the settings is listed and described on this page, along with any default values.
|
||||||
|
|
||||||
|
The Redpanda Console Helm chart is included as a subchart in the Redpanda Helm chart so that you can deploy and configure Redpanda and Redpanda Console together.
|
||||||
|
For instructions on how to install and use the chart, refer to the [deployment documentation](https://docs.redpanda.com/docs/deploy/deployment-option/self-hosted/kubernetes/kubernetes-deploy/).
|
||||||
|
For instructions on how to override and customize the chart’s values, see [Configure Redpanda Console](https://docs.redpanda.com/docs/manage/kubernetes/configure-helm-chart/#configure-redpanda-console).
|
||||||
|
|
||||||
|
----------------------------------------------
|
||||||
|
Autogenerated from chart metadata using [helm-docs v1.11.2](https://github.com/norwoodj/helm-docs/releases/v1.11.2)
|
||||||
|
|
||||||
|
## Source Code
|
||||||
|
|
||||||
|
* <https://github.com/redpanda-data/helm-charts>
|
||||||
|
|
||||||
|
## Settings
|
||||||
|
|
||||||
|
### [affinity](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=affinity)
|
||||||
|
|
||||||
|
**Default:** `{}`
|
||||||
|
|
||||||
|
### [annotations](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=annotations)
|
||||||
|
|
||||||
|
Annotations to add to the deployment.
|
||||||
|
|
||||||
|
**Default:** `{}`
|
||||||
|
|
||||||
|
### [automountServiceAccountToken](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=automountServiceAccountToken)
|
||||||
|
|
||||||
|
Automount API credentials for the Service Account into the pod.
|
||||||
|
|
||||||
|
**Default:** `true`
|
||||||
|
|
||||||
|
### [autoscaling.enabled](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=autoscaling.enabled)
|
||||||
|
|
||||||
|
**Default:** `false`
|
||||||
|
|
||||||
|
### [autoscaling.maxReplicas](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=autoscaling.maxReplicas)
|
||||||
|
|
||||||
|
**Default:** `100`
|
||||||
|
|
||||||
|
### [autoscaling.minReplicas](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=autoscaling.minReplicas)
|
||||||
|
|
||||||
|
**Default:** `1`
|
||||||
|
|
||||||
|
### [autoscaling.targetCPUUtilizationPercentage](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=autoscaling.targetCPUUtilizationPercentage)
|
||||||
|
|
||||||
|
**Default:** `80`
|
||||||
|
|
||||||
|
### [commonLabels](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=commonLabels)
|
||||||
|
|
||||||
|
**Default:** `{}`
|
||||||
|
|
||||||
|
### [configmap.create](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=configmap.create)
|
||||||
|
|
||||||
|
**Default:** `true`
|
||||||
|
|
||||||
|
### [console.config](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=console.config)
|
||||||
|
|
||||||
|
Settings for the `Config.yaml` (required). For a reference of configuration settings, see the [Redpanda Console documentation](https://docs.redpanda.com/docs/reference/console/config/).
|
||||||
|
|
||||||
|
**Default:** `{}`
|
||||||
|
|
||||||
|
### [deployment.create](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=deployment.create)
|
||||||
|
|
||||||
|
**Default:** `true`
|
||||||
|
|
||||||
|
### [enterprise](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=enterprise)
|
||||||
|
|
||||||
|
Settings for license key, as an alternative to secret.enterprise when a license secret is available
|
||||||
|
|
||||||
|
**Default:**
|
||||||
|
|
||||||
|
```
|
||||||
|
{"licenseSecretRef":{"key":"","name":""}}
|
||||||
|
```
|
||||||
|
|
||||||
|
### [extraContainers](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=extraContainers)
|
||||||
|
|
||||||
|
Add additional containers, such as for oauth2-proxy.
|
||||||
|
|
||||||
|
**Default:** `[]`
|
||||||
|
|
||||||
|
### [extraEnv](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=extraEnv)
|
||||||
|
|
||||||
|
Additional environment variables for the Redpanda Console Deployment.
|
||||||
|
|
||||||
|
**Default:** `[]`
|
||||||
|
|
||||||
|
### [extraEnvFrom](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=extraEnvFrom)
|
||||||
|
|
||||||
|
Additional environment variables for Redpanda Console mapped from Secret or ConfigMap.
|
||||||
|
|
||||||
|
**Default:** `[]`
|
||||||
|
|
||||||
|
### [extraVolumeMounts](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=extraVolumeMounts)
|
||||||
|
|
||||||
|
Add additional volume mounts, such as for TLS keys.
|
||||||
|
|
||||||
|
**Default:** `[]`
|
||||||
|
|
||||||
|
### [extraVolumes](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=extraVolumes)
|
||||||
|
|
||||||
|
Add additional volumes, such as for TLS keys.
|
||||||
|
|
||||||
|
**Default:** `[]`
|
||||||
|
|
||||||
|
### [fullnameOverride](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=fullnameOverride)
|
||||||
|
|
||||||
|
Override `console.fullname` template.
|
||||||
|
|
||||||
|
**Default:** `""`
|
||||||
|
|
||||||
|
### [image](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=image)
|
||||||
|
|
||||||
|
Redpanda Console Docker image settings.
|
||||||
|
|
||||||
|
**Default:**
|
||||||
|
|
||||||
|
```
|
||||||
|
{"pullPolicy":"IfNotPresent","registry":"docker.redpanda.com","repository":"redpandadata/console","tag":""}
|
||||||
|
```
|
||||||
|
|
||||||
|
### [image.pullPolicy](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=image.pullPolicy)
|
||||||
|
|
||||||
|
The imagePullPolicy.
|
||||||
|
|
||||||
|
**Default:** `"IfNotPresent"`
|
||||||
|
|
||||||
|
### [image.repository](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=image.repository)
|
||||||
|
|
||||||
|
Docker repository from which to pull the Redpanda Docker image.
|
||||||
|
|
||||||
|
**Default:** `"redpandadata/console"`
|
||||||
|
|
||||||
|
### [image.tag](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=image.tag)
|
||||||
|
|
||||||
|
The Redpanda Console version. See DockerHub for: [All stable versions](https://hub.docker.com/r/redpandadata/console/tags) and [all unstable versions](https://hub.docker.com/r/redpandadata/console-unstable/tags).
|
||||||
|
|
||||||
|
**Default:** `Chart.appVersion`
|
||||||
|
|
||||||
|
### [imagePullSecrets](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=imagePullSecrets)
|
||||||
|
|
||||||
|
Pull secrets may be used to provide credentials to image repositories See https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||||
|
|
||||||
|
**Default:** `[]`
|
||||||
|
|
||||||
|
### [ingress.annotations](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=ingress.annotations)
|
||||||
|
|
||||||
|
**Default:** `{}`
|
||||||
|
|
||||||
|
### [ingress.className](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=ingress.className)
|
||||||
|
|
||||||
|
**Default:** `""`
|
||||||
|
|
||||||
|
### [ingress.enabled](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=ingress.enabled)
|
||||||
|
|
||||||
|
**Default:** `false`
|
||||||
|
|
||||||
|
### [ingress.hosts[0].host](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=ingress.hosts[0].host)
|
||||||
|
|
||||||
|
**Default:** `"chart-example.local"`
|
||||||
|
|
||||||
|
### [ingress.hosts[0].paths[0].path](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=ingress.hosts[0].paths[0].path)
|
||||||
|
|
||||||
|
**Default:** `"/"`
|
||||||
|
|
||||||
|
### [ingress.hosts[0].paths[0].pathType](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=ingress.hosts[0].paths[0].pathType)
|
||||||
|
|
||||||
|
**Default:** `"ImplementationSpecific"`
|
||||||
|
|
||||||
|
### [ingress.tls](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=ingress.tls)
|
||||||
|
|
||||||
|
**Default:** `[]`
|
||||||
|
|
||||||
|
### [initContainers](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=initContainers)
|
||||||
|
|
||||||
|
Any initContainers defined should be written here
|
||||||
|
|
||||||
|
**Default:** `{"extraInitContainers":""}`
|
||||||
|
|
||||||
|
### [initContainers.extraInitContainers](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=initContainers.extraInitContainers)
|
||||||
|
|
||||||
|
Additional set of init containers
|
||||||
|
|
||||||
|
**Default:** `""`
|
||||||
|
|
||||||
|
### [livenessProbe](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=livenessProbe)
|
||||||
|
|
||||||
|
Settings for liveness and readiness probes. For details, see the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes).
|
||||||
|
|
||||||
|
**Default:**
|
||||||
|
|
||||||
|
```
|
||||||
|
{"failureThreshold":3,"initialDelaySeconds":0,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1}
|
||||||
|
```
|
||||||
|
|
||||||
|
### [nameOverride](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=nameOverride)
|
||||||
|
|
||||||
|
Override `console.name` template.
|
||||||
|
|
||||||
|
**Default:** `""`
|
||||||
|
|
||||||
|
### [nodeSelector](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=nodeSelector)
|
||||||
|
|
||||||
|
**Default:** `{}`
|
||||||
|
|
||||||
|
### [podAnnotations](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=podAnnotations)
|
||||||
|
|
||||||
|
**Default:** `{}`
|
||||||
|
|
||||||
|
### [podLabels](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=podLabels)
|
||||||
|
|
||||||
|
**Default:** `{}`
|
||||||
|
|
||||||
|
### [podSecurityContext.fsGroup](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=podSecurityContext.fsGroup)
|
||||||
|
|
||||||
|
**Default:** `99`
|
||||||
|
|
||||||
|
### [podSecurityContext.runAsUser](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=podSecurityContext.runAsUser)
|
||||||
|
|
||||||
|
**Default:** `99`
|
||||||
|
|
||||||
|
### [priorityClassName](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=priorityClassName)
|
||||||
|
|
||||||
|
PriorityClassName given to Pods. For details, see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass).
|
||||||
|
|
||||||
|
**Default:** `""`
|
||||||
|
|
||||||
|
### [readinessProbe.failureThreshold](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=readinessProbe.failureThreshold)
|
||||||
|
|
||||||
|
**Default:** `3`
|
||||||
|
|
||||||
|
### [readinessProbe.initialDelaySeconds](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=readinessProbe.initialDelaySeconds)
|
||||||
|
|
||||||
|
Grant time to test connectivity to upstream services such as Kafka and Schema Registry.
|
||||||
|
|
||||||
|
**Default:** `10`
|
||||||
|
|
||||||
|
### [readinessProbe.periodSeconds](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=readinessProbe.periodSeconds)
|
||||||
|
|
||||||
|
**Default:** `10`
|
||||||
|
|
||||||
|
### [readinessProbe.successThreshold](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=readinessProbe.successThreshold)
|
||||||
|
|
||||||
|
**Default:** `1`
|
||||||
|
|
||||||
|
### [readinessProbe.timeoutSeconds](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=readinessProbe.timeoutSeconds)
|
||||||
|
|
||||||
|
**Default:** `1`
|
||||||
|
|
||||||
|
### [replicaCount](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=replicaCount)
|
||||||
|
|
||||||
|
**Default:** `1`
|
||||||
|
|
||||||
|
### [resources](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=resources)
|
||||||
|
|
||||||
|
**Default:** `{}`
|
||||||
|
|
||||||
|
### [secret](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=secret)
|
||||||
|
|
||||||
|
Create a new Kubernetes Secret for all sensitive configuration inputs. Each provided Secret is mounted automatically and made available to the Pod. If you want to use one or more existing Secrets, you can use the `extraEnvFrom` list to mount environment variables from string and secretMounts to mount files such as Certificates from Secrets.
|
||||||
|
|
||||||
|
**Default:**
|
||||||
|
|
||||||
|
```
|
||||||
|
{"create":true,"enterprise":{},"kafka":{},"login":{"github":{},"google":{},"jwtSecret":"","oidc":{},"okta":{}},"redpanda":{"adminApi":{}}}
|
||||||
|
```
|
||||||
|
|
||||||
|
### [secret.kafka](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=secret.kafka)
|
||||||
|
|
||||||
|
Kafka Secrets.
|
||||||
|
|
||||||
|
**Default:** `{}`
|
||||||
|
|
||||||
|
### [secretMounts](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=secretMounts)
|
||||||
|
|
||||||
|
SecretMounts is an abstraction to make a Secret available in the container's filesystem. Under the hood it creates a volume and a volume mount for the Redpanda Console container.
|
||||||
|
|
||||||
|
**Default:** `[]`
|
||||||
|
|
||||||
|
### [securityContext.runAsNonRoot](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=securityContext.runAsNonRoot)
|
||||||
|
|
||||||
|
**Default:** `true`
|
||||||
|
|
||||||
|
### [service.annotations](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=service.annotations)
|
||||||
|
|
||||||
|
**Default:** `{}`
|
||||||
|
|
||||||
|
### [service.port](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=service.port)
|
||||||
|
|
||||||
|
**Default:** `8080`
|
||||||
|
|
||||||
|
### [service.targetPort](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=service.targetPort)
|
||||||
|
|
||||||
|
Override the value in `console.config.server.listenPort` if not `nil`
|
||||||
|
|
||||||
|
**Default:** `nil`
|
||||||
|
|
||||||
|
### [service.type](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=service.type)
|
||||||
|
|
||||||
|
**Default:** `"ClusterIP"`
|
||||||
|
|
||||||
|
### [serviceAccount.annotations](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=serviceAccount.annotations)
|
||||||
|
|
||||||
|
Annotations to add to the service account.
|
||||||
|
|
||||||
|
**Default:** `{}`
|
||||||
|
|
||||||
|
### [serviceAccount.automountServiceAccountToken](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=serviceAccount.automountServiceAccountToken)
|
||||||
|
|
||||||
|
Specifies whether a service account should automount API-Credentials
|
||||||
|
|
||||||
|
**Default:** `true`
|
||||||
|
|
||||||
|
### [serviceAccount.create](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=serviceAccount.create)
|
||||||
|
|
||||||
|
Specifies whether a service account should be created.
|
||||||
|
|
||||||
|
**Default:** `true`
|
||||||
|
|
||||||
|
### [serviceAccount.name](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=serviceAccount.name)
|
||||||
|
|
||||||
|
The name of the service account to use. If not set and `serviceAccount.create` is `true`, a name is generated using the `console.fullname` template
|
||||||
|
|
||||||
|
**Default:** `""`
|
||||||
|
|
||||||
|
### [strategy](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=strategy)
|
||||||
|
|
||||||
|
**Default:** `{}`
|
||||||
|
|
||||||
|
### [tests.enabled](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=tests.enabled)
|
||||||
|
|
||||||
|
**Default:** `true`
|
||||||
|
|
||||||
|
### [tolerations](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=tolerations)
|
||||||
|
|
||||||
|
**Default:** `[]`
|
||||||
|
|
||||||
|
### [topologySpreadConstraints](https://artifacthub.io/packages/helm/redpanda-data/console?modal=values&path=topologySpreadConstraints)
|
||||||
|
|
||||||
|
**Default:** `{}`
|
||||||
|
|
|
@ -0,0 +1,94 @@
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
# contributor license agreements. See the NOTICE file distributed with
|
||||||
|
# this work for additional information regarding copyright ownership.
|
||||||
|
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
# (the "License"); you may not use this file except in compliance with
|
||||||
|
# the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
image:
|
||||||
|
tag: master-8fcce39
|
||||||
|
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 1
|
||||||
|
memory: 2Gi
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 512Mi
|
||||||
|
|
||||||
|
console:
|
||||||
|
config:
|
||||||
|
kafka:
|
||||||
|
brokers:
|
||||||
|
- bootstrap.mybrokers.com:9092
|
||||||
|
clientId: redpanda-console
|
||||||
|
sasl:
|
||||||
|
enabled: true
|
||||||
|
mechanism: SCRAM-SHA-256
|
||||||
|
username: console
|
||||||
|
# password: set via Helm secret / Env variable
|
||||||
|
tls:
|
||||||
|
enabled: false
|
||||||
|
login:
|
||||||
|
google:
|
||||||
|
enabled: true
|
||||||
|
clientId: redacted.apps.googleusercontent.com
|
||||||
|
# clientSecret: set via Helm secret / Env variable
|
||||||
|
directory:
|
||||||
|
# serviceAccountFilepath: set via Helm secret / Env variable
|
||||||
|
targetPrincipal: admin@mycompany.com
|
||||||
|
enterprise:
|
||||||
|
rbac:
|
||||||
|
enabled: true
|
||||||
|
roleBindingsFilepath: /etc/console/configs/role-bindings.yaml
|
||||||
|
roleBindings:
|
||||||
|
- roleName: viewer
|
||||||
|
metadata:
|
||||||
|
# Metadata properties will be shown in the UI. You can omit it if you want to
|
||||||
|
name: Developers
|
||||||
|
subjects:
|
||||||
|
# You can specify all groups or users from different providers here which shall be bound to the same role
|
||||||
|
- kind: group
|
||||||
|
provider: Google
|
||||||
|
name: engineering@mycompany.com
|
||||||
|
- kind: user
|
||||||
|
provider: Google
|
||||||
|
name: singleuser@mycompany.com
|
||||||
|
- roleName: admin
|
||||||
|
metadata:
|
||||||
|
name: Admin
|
||||||
|
subjects:
|
||||||
|
- kind: user
|
||||||
|
provider: Google
|
||||||
|
name: adminperson@mycompany.com
|
||||||
|
|
||||||
|
secret:
|
||||||
|
create: true
|
||||||
|
kafka:
|
||||||
|
saslPassword: "redacted"
|
||||||
|
enterprise:
|
||||||
|
license: "redacted"
|
||||||
|
login:
|
||||||
|
google:
|
||||||
|
clientSecret: "redacted"
|
||||||
|
groupsServiceAccount: |
|
||||||
|
{
|
||||||
|
"type": "service_account",
|
||||||
|
"project_id": "redacted",
|
||||||
|
"private_key_id": "redacted",
|
||||||
|
"private_key": "-----BEGIN PRIVATE KEY-----\nREDACTED\n-----END PRIVATE KEY-----\n",
|
||||||
|
"client_email": "redacted@projectid.iam.gserviceaccount.com",
|
||||||
|
"client_id": "redacted",
|
||||||
|
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
|
||||||
|
"token_uri": "https://oauth2.googleapis.com/token",
|
||||||
|
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
|
||||||
|
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/redacted.iam.gserviceaccount.com"
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
{{/*
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
(the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
1. Get the application URL by running these commands:
|
||||||
|
{{- if .Values.ingress.enabled }}
|
||||||
|
{{- range $host := .Values.ingress.hosts }}
|
||||||
|
{{- range .paths }}
|
||||||
|
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- else if contains "NodePort" .Values.service.type }}
|
||||||
|
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "console.fullname" . }})
|
||||||
|
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||||
|
echo http://$NODE_IP:$NODE_PORT
|
||||||
|
{{- else if contains "LoadBalancer" .Values.service.type }}
|
||||||
|
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||||
|
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "console.fullname" . }}'
|
||||||
|
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "console.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||||
|
echo http://$SERVICE_IP:{{ .Values.service.port }}
|
||||||
|
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||||
|
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "console.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||||
|
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
|
||||||
|
echo "Visit http://127.0.0.1:8080 to use your application"
|
||||||
|
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,111 @@
|
||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "console.name" -}}
|
||||||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
If release name contains chart name it will be used as a full name.
|
||||||
|
*/}}
|
||||||
|
{{- define "console.fullname" -}}
|
||||||
|
{{- if .Values.fullnameOverride }}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- else }}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||||
|
{{- if contains $name .Release.Name }}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- else }}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create chart name and version as used by the chart label.
|
||||||
|
*/}}
|
||||||
|
{{- define "console.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Console Image
|
||||||
|
*/}}
|
||||||
|
{{- define "console.container.image" -}}
|
||||||
|
{{- if .Values.image.registry -}}
|
||||||
|
{{- printf "%s/%s:%s" .Values.image.registry .Values.image.repository ( .Values.image.tag | default .Chart.AppVersion ) }}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s:%s" .Values.image.repository ( .Values.image.tag | default .Chart.AppVersion ) }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Common labels
|
||||||
|
*/}}
|
||||||
|
{{- define "console.labels" -}}
|
||||||
|
helm.sh/chart: {{ include "console.chart" . }}
|
||||||
|
{{ include "console.selectorLabels" . }}
|
||||||
|
{{- if .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
|
{{- end }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
{{ with .Values.commonLabels }}
|
||||||
|
{{- toYaml . -}}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Selector labels
|
||||||
|
*/}}
|
||||||
|
{{- define "console.selectorLabels" -}}
|
||||||
|
app.kubernetes.io/name: {{ include "console.name" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service account to use
|
||||||
|
*/}}
|
||||||
|
{{- define "console.serviceAccountName" -}}
|
||||||
|
{{- if .Values.serviceAccount.create }}
|
||||||
|
{{- default (include "console.fullname" .) .Values.serviceAccount.name }}
|
||||||
|
{{- else }}
|
||||||
|
{{- default "default" .Values.serviceAccount.name }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Console's HTTP server Port.
|
||||||
|
The port is defined from the provided config but can be overridden
|
||||||
|
by setting service.targetPort and if that is missing defaults to 8080.
|
||||||
|
*/}}
|
||||||
|
{{- define "console.containerPort" -}}
|
||||||
|
{{- $listenPort := 8080 -}}
|
||||||
|
{{- if .Values.service.targetPort -}}
|
||||||
|
{{- $listenPort = .Values.service.targetPort -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if and .Values.console .Values.console.config .Values.console.config.server -}}
|
||||||
|
{{- .Values.console.config.server.listenPort | default $listenPort -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $listenPort -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Some umbrella charts may use a global registry variable.
|
||||||
|
In order to be compatible with this, we will watch for a global.imageRegistry
|
||||||
|
variable or return the imageRegistry as specified via the values.
|
||||||
|
*/}}
|
||||||
|
{{- define "console.imageRegistry" -}}
|
||||||
|
{{- $registryName := .Values.image.registry -}}
|
||||||
|
{{- if .Values.global }}
|
||||||
|
{{- if .Values.global.imageRegistry }}
|
||||||
|
{{- printf "%s" .Values.global.imageRegistry -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s" $registryName -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s" $registryName -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
|
@ -0,0 +1,40 @@
|
||||||
|
{{- if .Values.configmap.create -}}
|
||||||
|
{{/*
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
(the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ include "console.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "console.labels" . | nindent 4 }}
|
||||||
|
data:
|
||||||
|
config.yaml: |
|
||||||
|
# from .Values.console.config
|
||||||
|
{{- tpl (toYaml .Values.console.config) $ | nindent 4 }}
|
||||||
|
{{- if .Values.console.roles }}
|
||||||
|
roles.yaml: |
|
||||||
|
roles:
|
||||||
|
{{- tpl (toYaml .Values.console.roles) $ | nindent 6 }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.console.roleBindings }}
|
||||||
|
role-bindings.yaml: |
|
||||||
|
roleBindings:
|
||||||
|
{{- tpl (toYaml .Values.console.roleBindings) $ | nindent 6 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,308 @@
|
||||||
|
{{- if .Values.deployment.create -}}
|
||||||
|
{{/*
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
(the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ include "console.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "console.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- if not .Values.autoscaling.enabled }}
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
{{- end }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "console.selectorLabels" . | nindent 6 }}
|
||||||
|
{{- with .Values.strategy }}
|
||||||
|
strategy:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
||||||
|
{{- with .Values.podAnnotations }}
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
labels:
|
||||||
|
{{- include "console.selectorLabels" . | nindent 8 }}
|
||||||
|
{{- with .Values.podLabels }}{{ toYaml . | nindent 8 }}{{ end }}
|
||||||
|
spec:
|
||||||
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
serviceAccountName: {{ include "console.serviceAccountName" . }}
|
||||||
|
automountServiceAccountToken: {{ .Values.automountServiceAccountToken }}
|
||||||
|
{{- with .Values.podSecurityContext }}
|
||||||
|
securityContext: {{- . | toYaml | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
volumes:
|
||||||
|
- name: configs
|
||||||
|
configMap:
|
||||||
|
name: {{ include "console.fullname" . }}
|
||||||
|
{{- if .Values.secret.create }}
|
||||||
|
- name: secrets
|
||||||
|
secret:
|
||||||
|
secretName: {{ include "console.fullname" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- range .Values.secretMounts }}
|
||||||
|
- name: {{ .name }}
|
||||||
|
secret:
|
||||||
|
secretName: {{ .secretName }}
|
||||||
|
{{- if .defaultMode }}
|
||||||
|
defaultMode: {{ .defaultMode }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.extraVolumes }}
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if dig "extraInitContainers" false .Values.initContainers }}
|
||||||
|
initContainers:
|
||||||
|
{{- tpl .Values.initContainers.extraInitContainers . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: {{ .Chart.Name }}
|
||||||
|
{{- with .Values.deployment.command }}
|
||||||
|
command: {{ toJson . }}
|
||||||
|
{{- end }}
|
||||||
|
args:
|
||||||
|
- "--config.filepath=/etc/console/configs/config.yaml"
|
||||||
|
{{- with .Values.deployment.extraArgs }}
|
||||||
|
{{ . | toYaml | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.securityContext }}
|
||||||
|
securityContext: {{- . | toYaml | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
image: {{ include "console.container.image" . }}
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: {{ include "console.containerPort" . }}
|
||||||
|
protocol: TCP
|
||||||
|
volumeMounts:
|
||||||
|
- name: configs
|
||||||
|
mountPath: /etc/console/configs
|
||||||
|
readOnly: true
|
||||||
|
{{- if .Values.secret.create }}
|
||||||
|
- name: secrets
|
||||||
|
mountPath: /etc/console/secrets
|
||||||
|
readOnly: true
|
||||||
|
{{- end }}
|
||||||
|
{{- range .Values.secretMounts }}
|
||||||
|
- name: {{ .name }}
|
||||||
|
mountPath: {{ .path }}
|
||||||
|
{{- if .subPath }}
|
||||||
|
subPath: {{ .subPath }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.extraVolumeMounts }}
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
livenessProbe:
|
||||||
|
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||||
|
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||||
|
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||||
|
successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
||||||
|
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
||||||
|
httpGet:
|
||||||
|
path: /admin/health
|
||||||
|
port: http
|
||||||
|
readinessProbe:
|
||||||
|
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
||||||
|
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
||||||
|
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
||||||
|
successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
||||||
|
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
||||||
|
httpGet:
|
||||||
|
path: /admin/health
|
||||||
|
port: http
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.resources | nindent 12 }}
|
||||||
|
env:
|
||||||
|
{{- with .Values.extraEnv }}
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.secret.create }}
|
||||||
|
{{- if .Values.secret.kafka.saslPassword }}
|
||||||
|
- name: KAFKA_SASL_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ include "console.fullname" . }}
|
||||||
|
key: kafka-sasl-password
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.secret.kafka.protobufGitBasicAuthPassword }}
|
||||||
|
- name: KAFKA_PROTOBUF_GIT_BASICAUTH_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ include "console.fullname" . }}
|
||||||
|
key: kafka-protobuf-git-basicauth-password
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.secret.kafka.awsMskIamSecretKey }}
|
||||||
|
- name: KAFKA_SASL_AWSMSKIAM_SECRETKEY
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ include "console.fullname" . }}
|
||||||
|
key: kafka-sasl-aws-msk-iam-secret-key
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.secret.kafka.tlsCa }}
|
||||||
|
- name: KAFKA_TLS_CAFILEPATH
|
||||||
|
value: "/etc/console/secrets/kafka-tls-ca"
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.secret.kafka.tlsCert }}
|
||||||
|
- name: KAFKA_TLS_CERTFILEPATH
|
||||||
|
value: "/etc/console/secrets/kafka-tls-cert"
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.secret.kafka.tlsKey }}
|
||||||
|
- name: KAFKA_TLS_KEYFILEPATH
|
||||||
|
value: "/etc/console/secrets/kafka-tls-key"
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.secret.kafka.schemaRegistryTlsCa }}
|
||||||
|
- name: KAFKA_SCHEMAREGISTRY_TLS_CAFILEPATH
|
||||||
|
value: "/etc/console/secrets/kafka-schemaregistry-tls-ca"
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.secret.kafka.schemaRegistryTlsCert }}
|
||||||
|
- name: KAFKA_SCHEMAREGISTRY_TLS_CERTFILEPATH
|
||||||
|
value: "/etc/console/secrets/kafka-schemaregistry-tls-cert"
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.secret.kafka.schemaRegistryTlsKey }}
|
||||||
|
- name: KAFKA_SCHEMAREGISTRY_TLS_KEYFILEPATH
|
||||||
|
value: "/etc/console/secrets/kafka-schemaregistry-tls-key"
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.secret.kafka.schemaRegistryPassword }}
|
||||||
|
- name: KAFKA_SCHEMAREGISTRY_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ include "console.fullname" . }}
|
||||||
|
key: kafka-schema-registry-password
|
||||||
|
{{- end }}
|
||||||
|
- name: LOGIN_JWTSECRET
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ include "console.fullname" . }}
|
||||||
|
key: login-jwt-secret
|
||||||
|
{{- if .Values.secret.login.google.clientSecret }}
|
||||||
|
- name: LOGIN_GOOGLE_CLIENTSECRET
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ include "console.fullname" . }}
|
||||||
|
key: login-google-oauth-client-secret
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.secret.login.google.groupsServiceAccount }}
|
||||||
|
- name: LOGIN_GOOGLE_DIRECTORY_SERVICEACCOUNTFILEPATH
|
||||||
|
value: /etc/console/secrets/login-google-groups-service-account.json
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.secret.login.github.clientSecret }}
|
||||||
|
- name: LOGIN_GITHUB_CLIENTSECRET
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ include "console.fullname" . }}
|
||||||
|
key: login-github-oauth-client-secret
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.secret.login.github.personalAccessToken }}
|
||||||
|
- name: LOGIN_GITHUB_DIRECTORY_PERSONALACCESSTOKEN
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ include "console.fullname" . }}
|
||||||
|
key: login-github-personal-access-token
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.secret.login.okta.clientSecret }}
|
||||||
|
- name: LOGIN_OKTA_CLIENTSECRET
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ include "console.fullname" . }}
|
||||||
|
key: login-okta-client-secret
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.secret.login.okta.directoryApiToken }}
|
||||||
|
- name: LOGIN_OKTA_DIRECTORY_APITOKEN
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ include "console.fullname" . }}
|
||||||
|
key: login-okta-directory-api-token
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.secret.login.oidc.clientSecret }}
|
||||||
|
- name: LOGIN_OIDC_CLIENTSECRET
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ include "console.fullname" . }}
|
||||||
|
key: login-oidc-client-secret
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.secret.enterprise.license }}
|
||||||
|
- name: LICENSE
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ include "console.fullname" . }}
|
||||||
|
key: enterprise-license
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.secret.redpanda.adminApi.password }}
|
||||||
|
- name: REDPANDA_ADMINAPI_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ include "console.fullname" . }}
|
||||||
|
key: redpanda-admin-api-password
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.secret.redpanda.adminApi.tlsCa }}
|
||||||
|
- name: REDPANDA_ADMINAPI_TLS_CAFILEPATH
|
||||||
|
value: "/etc/console/secrets/redpanda-admin-api-tls-ca"
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.secret.redpanda.adminApi.tlsKey }}
|
||||||
|
- name: REDPANDA_ADMINAPI_TLS_KEYFILEPATH
|
||||||
|
value: "/etc/console/secrets/redpanda-admin-api-tls-key"
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.secret.redpanda.adminApi.tlsCert }}
|
||||||
|
- name: REDPANDA_ADMINAPI_TLS_CERTFILEPATH
|
||||||
|
value: "/etc/console/secrets/redpanda-admin-api-tls-cert"
|
||||||
|
{{- end }}
|
||||||
|
{{- else }}
|
||||||
|
{{- if dig "licenseSecretRef" "name" "" .Values.enterprise }}
|
||||||
|
- name: LICENSE
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ dig "licenseSecretRef" "name" "" .Values.enterprise }}
|
||||||
|
key: {{ dig "licenseSecretRef" "key" "enterprise-license" .Values.enterprise }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.extraEnvFrom }}
|
||||||
|
envFrom:
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.extraContainers }}
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.topologySpreadConstraints }}
|
||||||
|
topologySpreadConstraints:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
priorityClassName: {{ .Values.priorityClassName }}
|
||||||
|
{{- with .Values.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
|
@ -0,0 +1,48 @@
|
||||||
|
{{- if .Values.autoscaling.enabled }}
|
||||||
|
{{/*
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
(the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
apiVersion: autoscaling/v2
|
||||||
|
kind: HorizontalPodAutoscaler
|
||||||
|
metadata:
|
||||||
|
name: {{ include "console.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "console.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
scaleTargetRef:
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
name: {{ include "console.fullname" . }}
|
||||||
|
minReplicas: {{ .Values.autoscaling.minReplicas }}
|
||||||
|
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
|
||||||
|
metrics:
|
||||||
|
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
|
||||||
|
- type: Resource
|
||||||
|
resource:
|
||||||
|
name: cpu
|
||||||
|
target:
|
||||||
|
type: Utilization
|
||||||
|
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
||||||
|
- type: Resource
|
||||||
|
resource:
|
||||||
|
name: memory
|
||||||
|
target:
|
||||||
|
type: Utilization
|
||||||
|
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,79 @@
|
||||||
|
{{/*
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
(the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
{{- if .Values.ingress.enabled -}}
|
||||||
|
{{- $fullName := include "console.fullname" . -}}
|
||||||
|
{{- $svcPort := .Values.service.port -}}
|
||||||
|
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
|
||||||
|
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
|
||||||
|
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||||
|
apiVersion: networking.k8s.io/v1beta1
|
||||||
|
{{- else -}}
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
{{- end }}
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: {{ $fullName }}
|
||||||
|
labels:
|
||||||
|
{{- include "console.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.ingress.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
|
||||||
|
ingressClassName: {{ .Values.ingress.className }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.ingress.tls }}
|
||||||
|
tls:
|
||||||
|
{{- range .Values.ingress.tls }}
|
||||||
|
- hosts:
|
||||||
|
{{- range .hosts }}
|
||||||
|
- {{ tpl (.) $ | quote }}
|
||||||
|
{{- end }}
|
||||||
|
secretName: {{ .secretName }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
{{- range .Values.ingress.hosts }}
|
||||||
|
- {{- if .host }}
|
||||||
|
host: {{ tpl (.host) $ | quote }}
|
||||||
|
{{- end}}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
{{- range .paths }}
|
||||||
|
- path: {{ .path }}
|
||||||
|
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
|
||||||
|
pathType: {{ .pathType }}
|
||||||
|
{{- end }}
|
||||||
|
backend:
|
||||||
|
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
|
||||||
|
service:
|
||||||
|
name: {{ $fullName }}
|
||||||
|
port:
|
||||||
|
number: {{ $svcPort }}
|
||||||
|
{{- else }}
|
||||||
|
serviceName: {{ $fullName }}
|
||||||
|
servicePort: {{ $svcPort }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,58 @@
|
||||||
|
{{/*
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
(the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
{{- if .Values.secret.create -}}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ include "console.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "console.labels" . | nindent 4 }}
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
# Set empty defaults, so that we can always mount them as env variable even if they are not used.
|
||||||
|
# For this reason we can't use `with` to change the scope.
|
||||||
|
# Kafka
|
||||||
|
kafka-sasl-password: {{ .Values.secret.kafka.saslPassword | default "" | b64enc | quote }}
|
||||||
|
kafka-protobuf-git-basicauth-password: {{ .Values.secret.kafka.protobufGitBasicAuthPassword | default "" | b64enc | quote }}
|
||||||
|
kafka-sasl-aws-msk-iam-secret-key: {{ .Values.secret.kafka.awsMskIamSecretKey | default "" | b64enc | quote }}
|
||||||
|
kafka-tls-ca: {{ .Values.secret.kafka.tlsCa | default "" | b64enc | quote }}
|
||||||
|
kafka-tls-cert: {{ .Values.secret.kafka.tlsCert | default "" | b64enc | quote }}
|
||||||
|
kafka-tls-key: {{ .Values.secret.kafka.tlsKey | default "" | b64enc | quote }}
|
||||||
|
kafka-schema-registry-password: {{ .Values.secret.kafka.schemaRegistryPassword | default "" | b64enc | quote }}
|
||||||
|
kafka-schemaregistry-tls-ca: {{ .Values.secret.kafka.schemaRegistryTlsCa | default "" | b64enc | quote }}
|
||||||
|
kafka-schemaregistry-tls-cert: {{ .Values.secret.kafka.schemaRegistryTlsCert | default "" | b64enc | quote }}
|
||||||
|
kafka-schemaregistry-tls-key: {{ .Values.secret.kafka.schemaRegistryTlsKey | default "" | b64enc | quote }}
|
||||||
|
|
||||||
|
# Login
|
||||||
|
login-jwt-secret: {{ .Values.secret.login.jwtSecret | default (randAlphaNum 32) | b64enc | quote }}
|
||||||
|
login-google-oauth-client-secret: {{ .Values.secret.login.google.clientSecret | default "" | b64enc | quote }}
|
||||||
|
login-google-groups-service-account.json: {{ .Values.secret.login.google.groupsServiceAccount | default "" | b64enc | quote }}
|
||||||
|
login-github-oauth-client-secret: {{ .Values.secret.login.github.clientSecret | default "" | b64enc | quote }}
|
||||||
|
login-github-personal-access-token: {{ .Values.secret.login.github.personalAccessToken | default "" | b64enc | quote }}
|
||||||
|
login-okta-client-secret: {{ .Values.secret.login.okta.clientSecret | default "" | b64enc | quote }}
|
||||||
|
login-okta-directory-api-token: {{ .Values.secret.login.okta.directoryApiToken | default "" | b64enc | quote }}
|
||||||
|
login-oidc-client-secret: {{ .Values.secret.login.oidc.clientSecret | default "" | b64enc | quote }}
|
||||||
|
|
||||||
|
# Enterprise
|
||||||
|
enterprise-license: {{ .Values.secret.enterprise.license | default "" | b64enc | quote }}
|
||||||
|
|
||||||
|
# Redpanda
|
||||||
|
redpanda-admin-api-password: {{ .Values.secret.redpanda.adminApi.password | default "" | b64enc | quote }}
|
||||||
|
redpanda-admin-api-tls-ca: {{ .Values.secret.redpanda.adminApi.tlsCa | default "" | b64enc | quote }}
|
||||||
|
redpanda-admin-api-tls-cert: {{ .Values.secret.redpanda.adminApi.tlsCert | default "" | b64enc | quote }}
|
||||||
|
redpanda-admin-api-tls-key: {{ .Values.secret.redpanda.adminApi.tlsKey | default "" | b64enc | quote }}
|
||||||
|
{{- end }}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue