dipup 사용 차트를 카탈로그에 동기화 (7개 갱신 + 5개 신규)
dipup 이 go:embed 로 직접 보관·관리하던 Helm 차트를 카탈로그로 옮기는 첫 단계다.
두 저장소가 각자 CVE/SBOM 파이프라인을 운영하는 이중화를 해소하려면, 먼저 카탈로그가
dipup 과 같은 차트·같은 이미지를 보게 만들어야 한다.
배경: CVE 파이프라인 구성 이전에 두 곳에서 같은 차트를 유지하기 어려워 dipup 이 별도로
차트를 관리해 왔고, 그 결과 버전이 갈라졌다. 겹치는 10개 중 버전까지 일치하는 것은
postgresql-ha·dnsup 2개뿐이었다.
## 버전 갱신 (7개) — 신규 버전 디렉토리 추가, 구버전은 보존
| 차트 | 기존 | 신규 | appVersion |
|---|---|---|---|
| apisix | 2.14.0 | 2.16.0 | 3.16.0 → 3.17.0 |
| argo-cd | 7.7.0 | 7.8.11 | v2.13.0 → v2.14.5 |
| cert-manager | v1.16.1 | v1.21.0 | 동일 |
| gitea | 12.4.0 | 12.6.0 | 1.24.6 → 1.26.1 |
| harbor | 1.16.2 | 1.19.1 | 2.12.2 → 2.15.1 |
| kyverno | 3.4.1 | 3.8.2 | v1.14.1 → v1.18.2 |
| rancher | 2.10.1 | 2.14.3 | v2.10.1 → v2.14.3 |
차트 본문은 dipup 이 임베딩한 .tgz 를 그대로 전개했다(네트워크 pull 이 아니라 dipup 이
실제 배포하는 바이트와 동일함을 보장하기 위함). BUILD-README/CUSTOM-README/custom-values
3개 파일은 구버전에서 승계했다.
## 신규 추가 (5개)
infisical-standalone 1.9.0, longhorn 109.3.1+up1.11.2, longhorn-crd 109.3.1+up1.11.2,
metallb 0.16.1, secrets-operator v0.10.33.
longhorn/longhorn-crd 는 업스트림이 아니라 Rancher 패키징 차트(109.x 라인, Rancher 2.14
계열과 짝)다. BUILD-README 의 `helm repo add` 라인은 chart_version_detector 가 파싱하는
계약이라 실제 업스트림 repo 를 검증해 기재했고, 감지기로 현재/최신 버전이 정상 조회되는
것을 확인했다.
## custom-values — 버전과 결합된 이미지 핀 정리
카탈로그 스캐너가 dipup 의 effective image 를 보게 하려면 이미지 핀이 맞아야 한다.
- **kyverno: 승계본이 3.8.2 에서 깨져 재작성.** 3.4.1 은 정리 훅이
`registry: ~ / repository: bitnami/kubectl` 이라 bitnamilegacy 오버라이드가 맞았지만,
3.8.2 는 `registry: ghcr.io / repository: kyverno/readiness-checker` 로 바뀌었다.
그대로 옮기면 ghcr.io/bitnamilegacy/kubectl 이라는 없는 좌표가 된다. 해당 오버라이드를
제거하고, 3.8.2 에서 삭제된 policyReportsCleanup 키도 함께 뺐다. 남는 조치는 tag 고정뿐
(기본 tag 가 비어 latest 로 떨어짐 → v1.18.2 로 고정).
- apisix: 3.16.0-keycloak-authz → 3.17.0-keycloak-authz (차트 appVersion 과 함께 이동)
- gitea: image.tag 1.26.4 핀 추가 — 차트 기본 1.26.1 대비 CRITICAL 2→0, HIGH 44→12
- infisical: image.tag v0.162.7 핀 — 기본 v0.158.x 는 stale Debian base 로 OS 기인 CVE
다수(fixable CRITICAL 53→5, HIGH 491→55). redis/postgresql 은 bitnamilegacy 좌표로.
- longhorn: 실측 기반 리소스 튜닝(manager request, guaranteedInstanceManagerCPU,
systemManagedCSIComponentsResourceLimits). replica 수처럼 노드 수에 의존하는 값은
넣지 않았다 — 소비 측에서 주입한다.
## 검증
12개 차트 전부 `helm template --kube-version 1.34.1` 렌더 성공. 렌더 결과 이미지가
dipup 배포 이미지와 일치함을 확인(paasup/apisix:3.17.0-keycloak-authz,
gitea:1.26.4-rootless, readiness-checker:v1.18.2, infisical:v0.162.7).
## 범위에서 뺀 것
- **keycloak**: 카탈로그는 codecentric(app 17.0.1-legacy), dipup 은 bitnami(app 26.2.4)로
계보가 다르다. 이슈 #1(bitnami 대체 방안 검토)의 결론이 나온 뒤 처리한다.
- **rancher-monitoring(-crd)**: 14c05f1 에서 불필요 판단으로 제거된 차트이고
victoria-metrics 스택으로 대체 예정이라 추가하지 않는다.
- **dip-api/dip-console**: 자체 개발 차트로 각 앱 저장소가 출처다. 대조 결과 앱 저장소와
dipup 사본이 일치해 카탈로그가 개입할 이유가 없다.
- **postgresql-ha/dnsup**: 이미 버전이 일치해 작업 대상이 아니었다.
## 후속 과제
dnsup 은 카탈로그·dipup 사본(1.0.1)이 원본(dip-console-api helm/dnsup 1.0.0)보다 앞서
있다. 1.0.1 에만 있는 service.LoadBalancerIP·service.annotations 지원을 원본으로 백포트한
뒤, 카탈로그에서 dnsup 을 제거하는 것이 자체 개발 차트 출처 원칙에 맞다.
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
Longhorn is now installed on the cluster!
|
||||
|
||||
Please wait a few minutes for other Longhorn components such as CSI deployments, Engine Images, and Instance Managers to be initialized.
|
||||
|
||||
Visit our documentation at https://longhorn.io/docs/
|
||||
@@ -0,0 +1,91 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "longhorn.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 "longhorn.fullname" -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{- define "longhorn.managerIP" -}}
|
||||
{{- $fullname := (include "longhorn.fullname" .) -}}
|
||||
{{- printf "http://%s-backend:9500" $fullname | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{- define "secret" }}
|
||||
{{- printf "{\"auths\": {\"%s\": {\"auth\": \"%s\"}}}" .Values.privateRegistry.registryUrl (printf "%s:%s" .Values.privateRegistry.registryUser .Values.privateRegistry.registryPasswd | b64enc) | b64enc }}
|
||||
{{- end }}
|
||||
|
||||
{{- /*
|
||||
longhorn.labels generates the standard Helm labels.
|
||||
*/ -}}
|
||||
{{- define "longhorn.labels" -}}
|
||||
app.kubernetes.io/name: {{ template "longhorn.name" . }}
|
||||
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{- define "system_default_registry" -}}
|
||||
{{- if .Values.global.cattle.systemDefaultRegistry -}}
|
||||
{{- .Values.global.cattle.systemDefaultRegistry -}}
|
||||
{{- else -}}
|
||||
{{- "" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "registry_url" -}}
|
||||
{{- if .Values.privateRegistry.registryUrl -}}
|
||||
{{- .Values.privateRegistry.registryUrl -}}
|
||||
{{- else -}}
|
||||
{{ include "system_default_registry" . }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /*
|
||||
define the longhorn release namespace
|
||||
*/ -}}
|
||||
{{- define "release_namespace" -}}
|
||||
{{- if .Values.namespaceOverride -}}
|
||||
{{- .Values.namespaceOverride -}}
|
||||
{{- else -}}
|
||||
{{- .Release.Namespace -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /*
|
||||
multiTypeSetting helper
|
||||
Input: any value (string, number, or map)
|
||||
Output: properly quoted YAML string
|
||||
*/ -}}
|
||||
{{- define "longhorn.multiTypeSetting" -}}
|
||||
{{- $v := . -}}
|
||||
{{- if kindIs "map" $v -}}
|
||||
{{- $v | toJson | quote -}}
|
||||
{{- else -}}
|
||||
{{- $v | quote -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Optional timezone injection for all Longhorn workloads.
|
||||
When .Values.global.timezone is set, this snippet renders a TZ env var.
|
||||
*/}}
|
||||
{{- define "longhorn.timezoneEnv" -}}
|
||||
{{- if .Values.global.timezone }}
|
||||
- name: TZ
|
||||
value: {{ .Values.global.timezone | quote }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,89 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: longhorn-role
|
||||
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- apiextensions.k8s.io
|
||||
resources:
|
||||
- customresourcedefinitions
|
||||
verbs:
|
||||
- "*"
|
||||
- apiGroups: [""]
|
||||
resources: ["pods"]
|
||||
verbs: ["get", "list", "watch", "delete", "deletecollection"]
|
||||
- apiGroups: [""]
|
||||
resources: ["secrets", "services", "endpoints", "configmaps", "serviceaccounts", "pods/log"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["events", "persistentvolumes", "persistentvolumeclaims", "persistentvolumeclaims/status", "nodes"]
|
||||
verbs: ["*"]
|
||||
- apiGroups: [""]
|
||||
resources: ["namespaces"]
|
||||
verbs: ["get", "list"]
|
||||
- apiGroups: ["apps"]
|
||||
resources: ["daemonsets", "statefulsets", "deployments", "replicasets"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: ["batch"]
|
||||
resources: ["jobs", "cronjobs"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: ["policy"]
|
||||
resources: ["poddisruptionbudgets"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: ["scheduling.k8s.io"]
|
||||
resources: ["priorityclasses"]
|
||||
verbs: ["watch", "list"]
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["storageclasses", "volumeattachments", "volumeattachments/status", "volumeattributesclasses", "csinodes", "csidrivers", "csistoragecapacities"]
|
||||
verbs: ["*"]
|
||||
- apiGroups: ["snapshot.storage.k8s.io"]
|
||||
resources: ["volumesnapshotclasses", "volumesnapshots", "volumesnapshotcontents", "volumesnapshotcontents/status"]
|
||||
verbs: ["*"]
|
||||
- apiGroups: ["longhorn.io"]
|
||||
resources: ["volumes", "volumes/status", "engines", "engines/status", "replicas", "replicas/status", "settings", "settings/status",
|
||||
"engineimages", "engineimages/status", "nodes", "nodes/status", "instancemanagers", "instancemanagers/status",
|
||||
{{- if .Values.openshift.enabled }}
|
||||
"engineimages/finalizers", "nodes/finalizers", "instancemanagers/finalizers",
|
||||
{{- end }}
|
||||
"sharemanagers", "sharemanagers/status", "backingimages", "backingimages/status",
|
||||
"backingimagemanagers", "backingimagemanagers/status", "backingimagedatasources", "backingimagedatasources/status",
|
||||
"backuptargets", "backuptargets/status", "backupvolumes", "backupvolumes/status", "backups", "backups/status",
|
||||
"recurringjobs", "recurringjobs/status", "orphans", "orphans/status", "snapshots", "snapshots/status",
|
||||
"supportbundles", "supportbundles/status", "systembackups", "systembackups/status", "systemrestores", "systemrestores/status",
|
||||
"volumeattachments", "volumeattachments/status", "backupbackingimages", "backupbackingimages/status"]
|
||||
verbs: ["*"]
|
||||
- apiGroups: ["coordination.k8s.io"]
|
||||
resources: ["leases"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: ["metrics.k8s.io"]
|
||||
resources: ["pods", "nodes"]
|
||||
verbs: ["get", "list"]
|
||||
- apiGroups: ["apiregistration.k8s.io"]
|
||||
resources: ["apiservices"]
|
||||
verbs: ["list", "watch"]
|
||||
- apiGroups: ["admissionregistration.k8s.io"]
|
||||
resources: ["mutatingwebhookconfigurations", "validatingwebhookconfigurations"]
|
||||
verbs: ["get", "list", "create", "patch", "delete"]
|
||||
- apiGroups: ["rbac.authorization.k8s.io"]
|
||||
resources: ["roles", "rolebindings"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: ["discovery.k8s.io"]
|
||||
resources: ["endpointslices"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: ["rbac.authorization.k8s.io"]
|
||||
resources: ["clusterrolebindings", "clusterroles"]
|
||||
verbs: ["*"]
|
||||
{{- if .Values.openshift.enabled }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: longhorn-ocp-privileged-role
|
||||
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
||||
rules:
|
||||
- apiGroups: ["security.openshift.io"]
|
||||
resources: ["securitycontextconstraints"]
|
||||
resourceNames: ["anyuid", "privileged"]
|
||||
verbs: ["use"]
|
||||
{{- end }}
|
||||
@@ -0,0 +1,49 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: longhorn-bind
|
||||
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: longhorn-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: longhorn-service-account
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: longhorn-support-bundle
|
||||
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: cluster-admin
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: longhorn-support-bundle
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
{{- if .Values.openshift.enabled }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: longhorn-ocp-privileged-bind
|
||||
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: longhorn-ocp-privileged-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: longhorn-service-account
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
- kind: ServiceAccount
|
||||
name: longhorn-ui-service-account
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
- kind: ServiceAccount
|
||||
name: default # supportbundle-agent-support-bundle uses default sa
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,205 @@
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
||||
app: longhorn-manager
|
||||
name: longhorn-manager
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: longhorn-manager
|
||||
template:
|
||||
metadata:
|
||||
labels: {{- include "longhorn.labels" . | nindent 8 }}
|
||||
app: longhorn-manager
|
||||
{{- with .Values.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
containers:
|
||||
- name: longhorn-manager
|
||||
image: {{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.manager.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
securityContext:
|
||||
privileged: true
|
||||
command:
|
||||
- longhorn-manager
|
||||
- -d
|
||||
{{- if eq .Values.longhornManager.log.format "json" }}
|
||||
- -j
|
||||
{{- end }}
|
||||
- daemon
|
||||
- --engine-image
|
||||
- "{{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.engine.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.engine.repository }}:{{ .Values.image.longhorn.engine.tag }}"
|
||||
- --instance-manager-image
|
||||
- "{{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.instanceManager.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.instanceManager.repository }}:{{ .Values.image.longhorn.instanceManager.tag }}"
|
||||
- --share-manager-image
|
||||
- "{{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.shareManager.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.shareManager.repository }}:{{ .Values.image.longhorn.shareManager.tag }}"
|
||||
- --backing-image-manager-image
|
||||
- "{{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.backingImageManager.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.backingImageManager.repository }}:{{ .Values.image.longhorn.backingImageManager.tag }}"
|
||||
- --support-bundle-manager-image
|
||||
- "{{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.supportBundleKit.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.supportBundleKit.repository }}:{{ .Values.image.longhorn.supportBundleKit.tag }}"
|
||||
- --manager-image
|
||||
- "{{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.manager.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}"
|
||||
- --service-account
|
||||
- longhorn-service-account
|
||||
{{- if .Values.preUpgradeChecker.upgradeVersionCheck}}
|
||||
- --upgrade-version-check
|
||||
{{- end }}
|
||||
ports:
|
||||
- containerPort: 9500
|
||||
name: manager
|
||||
- containerPort: 9502
|
||||
name: admission-wh
|
||||
- containerPort: 9503
|
||||
name: recov-backend
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /v1/healthz
|
||||
port: 9502
|
||||
scheme: HTTPS
|
||||
volumeMounts:
|
||||
- name: boot
|
||||
mountPath: /host/boot/
|
||||
readOnly: true
|
||||
- name: dev
|
||||
mountPath: /host/dev/
|
||||
- name: proc
|
||||
mountPath: /host/proc/
|
||||
readOnly: true
|
||||
- name: etc
|
||||
mountPath: /host/etc/
|
||||
readOnly: true
|
||||
- name: longhorn
|
||||
mountPath: /var/lib/longhorn/
|
||||
mountPropagation: Bidirectional
|
||||
- name: longhorn-grpc-tls
|
||||
mountPath: /tls-files/
|
||||
{{- if .Values.enableGoCoverDir }}
|
||||
- name: go-cover-dir
|
||||
mountPath: /go-cover-dir/
|
||||
{{- end }}
|
||||
env:
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: POD_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.podIP
|
||||
- name: NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
{{- if .Values.enableGoCoverDir }}
|
||||
- name: GOCOVERDIR
|
||||
value: /go-cover-dir/
|
||||
{{- end }}
|
||||
{{- include "longhorn.timezoneEnv" . | nindent 8 }}
|
||||
{{- with .Values.longhornManager.resources }}
|
||||
resources:
|
||||
{{- toYaml . | nindent 10 }}
|
||||
{{- end }}
|
||||
- name: pre-pull-share-manager-image
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
image: {{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.shareManager.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.shareManager.repository }}:{{ .Values.image.longhorn.shareManager.tag }}
|
||||
command: ["sh", "-c", "echo share-manager image pulled && sleep infinity"]
|
||||
volumes:
|
||||
- name: boot
|
||||
hostPath:
|
||||
path: /boot/
|
||||
- name: dev
|
||||
hostPath:
|
||||
path: /dev/
|
||||
- name: proc
|
||||
hostPath:
|
||||
path: /proc/
|
||||
- name: etc
|
||||
hostPath:
|
||||
path: /etc/
|
||||
- name: longhorn
|
||||
hostPath:
|
||||
path: /var/lib/longhorn/
|
||||
{{- if .Values.enableGoCoverDir }}
|
||||
- name: go-cover-dir
|
||||
hostPath:
|
||||
path: /go-cover-dir/
|
||||
type: DirectoryOrCreate
|
||||
{{- end }}
|
||||
- name: longhorn-grpc-tls
|
||||
secret:
|
||||
secretName: longhorn-grpc-tls
|
||||
optional: true
|
||||
{{- with (coalesce .Values.global.imagePullSecrets .Values.privateRegistry.registrySecret) }}
|
||||
imagePullSecrets:
|
||||
{{- $imagePullSecrets := list }}
|
||||
{{- if kindIs "string" . }}
|
||||
{{- $imagePullSecrets = append $imagePullSecrets (dict "name" .) }}
|
||||
{{- else }}
|
||||
{{- range . }}
|
||||
{{- if kindIs "string" . }}
|
||||
{{- $imagePullSecrets = append $imagePullSecrets (dict "name" .) }}
|
||||
{{- else }}
|
||||
{{- $imagePullSecrets = append $imagePullSecrets . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- toYaml $imagePullSecrets | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.longhornManager.priorityClass }}
|
||||
priorityClassName: {{ .Values.longhornManager.priorityClass | quote }}
|
||||
{{- end }}
|
||||
{{- if or .Values.global.tolerations .Values.longhornManager.tolerations .Values.global.cattle.windowsCluster.enabled }}
|
||||
tolerations:
|
||||
{{- if and .Values.global.cattle.windowsCluster.enabled .Values.global.cattle.windowsCluster.tolerations }}
|
||||
{{ toYaml .Values.global.cattle.windowsCluster.tolerations | indent 6 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.global.tolerations .Values.longhornManager.tolerations }}
|
||||
{{ default .Values.global.tolerations .Values.longhornManager.tolerations | toYaml | indent 6 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if or .Values.global.nodeSelector .Values.longhornManager.nodeSelector .Values.global.cattle.windowsCluster.enabled }}
|
||||
nodeSelector:
|
||||
{{- if and .Values.global.cattle.windowsCluster.enabled .Values.global.cattle.windowsCluster.nodeSelector }}
|
||||
{{ toYaml .Values.global.cattle.windowsCluster.nodeSelector | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.global.nodeSelector .Values.longhornManager.nodeSelector }}
|
||||
{{ default .Values.global.nodeSelector .Values.longhornManager.nodeSelector | toYaml | indent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
serviceAccountName: longhorn-service-account
|
||||
updateStrategy:
|
||||
{{ toYaml .Values.longhornManager.updateStrategy | indent 4 }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
||||
app: longhorn-manager
|
||||
{{- with .Values.longhornManager.serviceLabels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
name: longhorn-backend
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
{{- if .Values.longhornManager.serviceAnnotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.longhornManager.serviceAnnotations | indent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.service.manager.type }}
|
||||
selector:
|
||||
app: longhorn-manager
|
||||
ports:
|
||||
- name: manager
|
||||
port: 9500
|
||||
targetPort: manager
|
||||
{{- if .Values.service.manager.nodePort }}
|
||||
nodePort: {{ .Values.service.manager.nodePort }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,17 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: longhorn-default-resource
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
||||
data:
|
||||
default-resource.yaml: |-
|
||||
{{- if not (kindIs "invalid" .Values.defaultBackupStore.backupTarget) }}
|
||||
backup-target: {{ .Values.defaultBackupStore.backupTarget }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultBackupStore.backupTargetCredentialSecret) }}
|
||||
backup-target-credential-secret: {{ .Values.defaultBackupStore.backupTargetCredentialSecret }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultBackupStore.pollInterval) }}
|
||||
backupstore-poll-interval: {{ .Values.defaultBackupStore.pollInterval }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,298 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: longhorn-default-setting
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
||||
data:
|
||||
default-setting.yaml: |-
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.allowRecurringJobWhileVolumeDetached) }}
|
||||
allow-recurring-job-while-volume-detached: {{ .Values.defaultSettings.allowRecurringJobWhileVolumeDetached }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.createDefaultDiskLabeledNodes) }}
|
||||
create-default-disk-labeled-nodes: {{ .Values.defaultSettings.createDefaultDiskLabeledNodes }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.defaultDataPath) }}
|
||||
default-data-path: {{ .Values.defaultSettings.defaultDataPath | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.replicaSoftAntiAffinity) }}
|
||||
replica-soft-anti-affinity: {{ .Values.defaultSettings.replicaSoftAntiAffinity }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.replicaAutoBalance) }}
|
||||
replica-auto-balance: {{ .Values.defaultSettings.replicaAutoBalance | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.storageOverProvisioningPercentage) }}
|
||||
storage-over-provisioning-percentage: {{ .Values.defaultSettings.storageOverProvisioningPercentage | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.storageMinimalAvailablePercentage) }}
|
||||
storage-minimal-available-percentage: {{ .Values.defaultSettings.storageMinimalAvailablePercentage | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.storageReservedPercentageForDefaultDisk) }}
|
||||
storage-reserved-percentage-for-default-disk: {{ .Values.defaultSettings.storageReservedPercentageForDefaultDisk | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.upgradeChecker) }}
|
||||
upgrade-checker: {{ .Values.defaultSettings.upgradeChecker }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.upgradeResponderURL) }}
|
||||
upgrade-responder-url: {{ .Values.defaultSettings.upgradeResponderURL | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.managerUrl) }}
|
||||
manager-url: {{ .Values.defaultSettings.managerUrl | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.defaultReplicaCount) }}
|
||||
default-replica-count: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.defaultReplicaCount }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.defaultDataLocality) }}
|
||||
default-data-locality: {{ .Values.defaultSettings.defaultDataLocality | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.defaultLonghornStaticStorageClass) }}
|
||||
default-longhorn-static-storage-class: {{ .Values.defaultSettings.defaultLonghornStaticStorageClass | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.failedBackupTTL) }}
|
||||
failed-backup-ttl: {{ .Values.defaultSettings.failedBackupTTL | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.backupExecutionTimeout) }}
|
||||
backup-execution-timeout: {{ .Values.defaultSettings.backupExecutionTimeout | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.restoreVolumeRecurringJobs) }}
|
||||
restore-volume-recurring-jobs: {{ .Values.defaultSettings.restoreVolumeRecurringJobs }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.recurringSuccessfulJobsHistoryLimit) }}
|
||||
recurring-successful-jobs-history-limit: {{ .Values.defaultSettings.recurringSuccessfulJobsHistoryLimit | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.recurringJobMaxRetention) }}
|
||||
recurring-job-max-retention: {{ .Values.defaultSettings.recurringJobMaxRetention | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.recurringFailedJobsHistoryLimit) }}
|
||||
recurring-failed-jobs-history-limit: {{ .Values.defaultSettings.recurringFailedJobsHistoryLimit | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.supportBundleFailedHistoryLimit) }}
|
||||
support-bundle-failed-history-limit: {{ .Values.defaultSettings.supportBundleFailedHistoryLimit | quote }}
|
||||
{{- end }}
|
||||
{{- if or (not (kindIs "invalid" .Values.defaultSettings.taintToleration)) (.Values.global.cattle.windowsCluster.enabled) }}
|
||||
taint-toleration: {{ $windowsDefaultSettingTaintToleration := list }}{{ $defaultSettingTaintToleration := list -}}
|
||||
{{- if and .Values.global.cattle.windowsCluster.enabled .Values.global.cattle.windowsCluster.defaultSetting.taintToleration -}}
|
||||
{{- $windowsDefaultSettingTaintToleration = .Values.global.cattle.windowsCluster.defaultSetting.taintToleration -}}
|
||||
{{- end -}}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.taintToleration) -}}
|
||||
{{- $defaultSettingTaintToleration = .Values.defaultSettings.taintToleration -}}
|
||||
{{- end -}}
|
||||
{{- $taintToleration := list $windowsDefaultSettingTaintToleration $defaultSettingTaintToleration }}{{ join ";" (compact $taintToleration) | quote -}}
|
||||
{{- end }}
|
||||
{{- if or (not (kindIs "invalid" .Values.defaultSettings.systemManagedComponentsNodeSelector)) (.Values.global.cattle.windowsCluster.enabled) }}
|
||||
system-managed-components-node-selector: {{ $windowsDefaultSettingNodeSelector := list }}{{ $defaultSettingNodeSelector := list -}}
|
||||
{{- if and .Values.global.cattle.windowsCluster.enabled .Values.global.cattle.windowsCluster.defaultSetting.systemManagedComponentsNodeSelector -}}
|
||||
{{ $windowsDefaultSettingNodeSelector = .Values.global.cattle.windowsCluster.defaultSetting.systemManagedComponentsNodeSelector -}}
|
||||
{{- end -}}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.systemManagedComponentsNodeSelector) -}}
|
||||
{{- $defaultSettingNodeSelector = .Values.defaultSettings.systemManagedComponentsNodeSelector -}}
|
||||
{{- end -}}
|
||||
{{- $nodeSelector := list $windowsDefaultSettingNodeSelector $defaultSettingNodeSelector }}{{ join ";" (compact $nodeSelector) | quote -}}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.systemManagedCSIComponentsResourceLimits) }}
|
||||
system-managed-csi-components-resource-limits: {{ .Values.defaultSettings.systemManagedCSIComponentsResourceLimits | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.priorityClass) }}
|
||||
priority-class: {{ .Values.defaultSettings.priorityClass | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.autoSalvage) }}
|
||||
auto-salvage: {{ .Values.defaultSettings.autoSalvage }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.autoDeletePodWhenVolumeDetachedUnexpectedly) }}
|
||||
auto-delete-pod-when-volume-detached-unexpectedly: {{ .Values.defaultSettings.autoDeletePodWhenVolumeDetachedUnexpectedly }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.blacklistForAutoDeletePodWhenVolumeDetachedUnexpectedly) }}
|
||||
blacklist-for-auto-delete-pod-when-volume-detached-unexpectedly: {{ .Values.defaultSettings.blacklistForAutoDeletePodWhenVolumeDetachedUnexpectedly }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.disableSchedulingOnCordonedNode) }}
|
||||
disable-scheduling-on-cordoned-node: {{ .Values.defaultSettings.disableSchedulingOnCordonedNode }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.replicaZoneSoftAntiAffinity) }}
|
||||
replica-zone-soft-anti-affinity: {{ .Values.defaultSettings.replicaZoneSoftAntiAffinity }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.replicaDiskSoftAntiAffinity) }}
|
||||
replica-disk-soft-anti-affinity: {{ .Values.defaultSettings.replicaDiskSoftAntiAffinity }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.nodeDownPodDeletionPolicy) }}
|
||||
node-down-pod-deletion-policy: {{ .Values.defaultSettings.nodeDownPodDeletionPolicy | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.nodeDrainPolicy) }}
|
||||
node-drain-policy: {{ .Values.defaultSettings.nodeDrainPolicy | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.detachManuallyAttachedVolumesWhenCordoned) }}
|
||||
detach-manually-attached-volumes-when-cordoned: {{ .Values.defaultSettings.detachManuallyAttachedVolumesWhenCordoned }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.replicaReplenishmentWaitInterval) }}
|
||||
replica-replenishment-wait-interval: {{ .Values.defaultSettings.replicaReplenishmentWaitInterval | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.concurrentReplicaRebuildPerNodeLimit) }}
|
||||
concurrent-replica-rebuild-per-node-limit: {{ .Values.defaultSettings.concurrentReplicaRebuildPerNodeLimit | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.rebuildConcurrentSyncLimit) }}
|
||||
rebuild-concurrent-sync-limit: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.rebuildConcurrentSyncLimit }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.concurrentVolumeBackupRestorePerNodeLimit) }}
|
||||
concurrent-volume-backup-restore-per-node-limit: {{ .Values.defaultSettings.concurrentVolumeBackupRestorePerNodeLimit | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.disableRevisionCounter) }}
|
||||
disable-revision-counter: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.disableRevisionCounter }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.systemManagedPodsImagePullPolicy) }}
|
||||
system-managed-pods-image-pull-policy: {{ .Values.defaultSettings.systemManagedPodsImagePullPolicy | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.allowVolumeCreationWithDegradedAvailability) }}
|
||||
allow-volume-creation-with-degraded-availability: {{ .Values.defaultSettings.allowVolumeCreationWithDegradedAvailability }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.autoCleanupSystemGeneratedSnapshot) }}
|
||||
auto-cleanup-system-generated-snapshot: {{ .Values.defaultSettings.autoCleanupSystemGeneratedSnapshot }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.autoCleanupRecurringJobBackupSnapshot) }}
|
||||
auto-cleanup-recurring-job-backup-snapshot: {{ .Values.defaultSettings.autoCleanupRecurringJobBackupSnapshot }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.concurrentAutomaticEngineUpgradePerNodeLimit) }}
|
||||
concurrent-automatic-engine-upgrade-per-node-limit: {{ .Values.defaultSettings.concurrentAutomaticEngineUpgradePerNodeLimit | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.backingImageCleanupWaitInterval) }}
|
||||
backing-image-cleanup-wait-interval: {{ .Values.defaultSettings.backingImageCleanupWaitInterval | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.backingImageRecoveryWaitInterval) }}
|
||||
backing-image-recovery-wait-interval: {{ .Values.defaultSettings.backingImageRecoveryWaitInterval | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.guaranteedInstanceManagerCPU) }}
|
||||
guaranteed-instance-manager-cpu: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.guaranteedInstanceManagerCPU }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.kubernetesClusterAutoscalerEnabled) }}
|
||||
kubernetes-cluster-autoscaler-enabled: {{ .Values.defaultSettings.kubernetesClusterAutoscalerEnabled }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.orphanResourceAutoDeletion) }}
|
||||
orphan-resource-auto-deletion: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.orphanResourceAutoDeletion }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.orphanResourceAutoDeletionGracePeriod) }}
|
||||
orphan-resource-auto-deletion-grace-period: {{ .Values.defaultSettings.orphanResourceAutoDeletionGracePeriod | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.storageNetwork) }}
|
||||
storage-network: {{ .Values.defaultSettings.storageNetwork | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.endpointNetworkForRWXVolume) }}
|
||||
endpoint-network-for-rwx-volume: {{ .Values.defaultSettings.endpointNetworkForRWXVolume | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.deletingConfirmationFlag) }}
|
||||
deleting-confirmation-flag: {{ .Values.defaultSettings.deletingConfirmationFlag }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.engineReplicaTimeout) }}
|
||||
engine-replica-timeout: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.engineReplicaTimeout }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.snapshotDataIntegrity) }}
|
||||
snapshot-data-integrity: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.snapshotDataIntegrity }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.snapshotDataIntegrityImmediateCheckAfterSnapshotCreation) }}
|
||||
snapshot-data-integrity-immediate-check-after-snapshot-creation: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.snapshotDataIntegrityImmediateCheckAfterSnapshotCreation }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.snapshotDataIntegrityCronjob) }}
|
||||
snapshot-data-integrity-cronjob: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.snapshotDataIntegrityCronjob }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.removeSnapshotsDuringFilesystemTrim) }}
|
||||
remove-snapshots-during-filesystem-trim: {{ .Values.defaultSettings.removeSnapshotsDuringFilesystemTrim }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.fastReplicaRebuildEnabled) }}
|
||||
fast-replica-rebuild-enabled: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.fastReplicaRebuildEnabled }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.replicaFileSyncHttpClientTimeout) }}
|
||||
replica-file-sync-http-client-timeout: {{ .Values.defaultSettings.replicaFileSyncHttpClientTimeout | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.longGRPCTimeOut) }}
|
||||
long-grpc-timeout: {{ .Values.defaultSettings.longGRPCTimeOut | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.logLevel) }}
|
||||
log-level: {{ .Values.defaultSettings.logLevel | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.logPath) }}
|
||||
log-path: {{ .Values.defaultSettings.logPath | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.backupCompressionMethod) }}
|
||||
backup-compression-method: {{ .Values.defaultSettings.backupCompressionMethod | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.backupConcurrentLimit) }}
|
||||
backup-concurrent-limit: {{ .Values.defaultSettings.backupConcurrentLimit | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.restoreConcurrentLimit) }}
|
||||
restore-concurrent-limit: {{ .Values.defaultSettings.restoreConcurrentLimit | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.defaultBackupBlockSize) }}
|
||||
default-backup-block-size: {{ .Values.defaultSettings.defaultBackupBlockSize | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.v1DataEngine) }}
|
||||
v1-data-engine: {{ .Values.defaultSettings.v1DataEngine }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.v2DataEngine) }}
|
||||
v2-data-engine: {{ .Values.defaultSettings.v2DataEngine }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.dataEngineHugepageEnabled) }}
|
||||
data-engine-hugepage-enabled: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.dataEngineHugepageEnabled }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.dataEngineMemorySize) }}
|
||||
data-engine-memory-size: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.dataEngineMemorySize }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.allowEmptyNodeSelectorVolume) }}
|
||||
allow-empty-node-selector-volume: {{ .Values.defaultSettings.allowEmptyNodeSelectorVolume }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.allowEmptyDiskSelectorVolume) }}
|
||||
allow-empty-disk-selector-volume: {{ .Values.defaultSettings.allowEmptyDiskSelectorVolume }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.allowCollectingLonghornUsageMetrics) }}
|
||||
allow-collecting-longhorn-usage-metrics: {{ .Values.defaultSettings.allowCollectingLonghornUsageMetrics }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.disableSnapshotPurge) }}
|
||||
disable-snapshot-purge: {{ .Values.defaultSettings.disableSnapshotPurge }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.snapshotMaxCount) }}
|
||||
snapshot-max-count: {{ .Values.defaultSettings.snapshotMaxCount | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.dataEngineLogLevel) }}
|
||||
data-engine-log-level: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.dataEngineLogLevel }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.dataEngineLogFlags) }}
|
||||
data-engine-log-flags: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.dataEngineLogFlags }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.freezeFilesystemForSnapshot) }}
|
||||
freeze-filesystem-for-snapshot: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.freezeFilesystemForSnapshot }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.autoCleanupSnapshotWhenDeleteBackup) }}
|
||||
auto-cleanup-when-delete-backup: {{ .Values.defaultSettings.autoCleanupSnapshotWhenDeleteBackup }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.autoCleanupSnapshotAfterOnDemandBackupCompleted) }}
|
||||
auto-cleanup-snapshot-after-on-demand-backup-completed: {{ .Values.defaultSettings.autoCleanupSnapshotAfterOnDemandBackupCompleted }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.rwxVolumeFastFailover) }}
|
||||
rwx-volume-fast-failover: {{ .Values.defaultSettings.rwxVolumeFastFailover}}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.offlineReplicaRebuilding) }}
|
||||
offline-replica-rebuilding: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.offlineReplicaRebuilding }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.dataEngineCPUMask) }}
|
||||
data-engine-cpu-mask: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.dataEngineCPUMask }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.replicaRebuildingBandwidthLimit) }}
|
||||
replica-rebuilding-bandwidth-limit: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.replicaRebuildingBandwidthLimit }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.replicaRebuildingBandwidthLimit) }}
|
||||
default-ublk-queue-depth: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.defaultUblkQueueDepth }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.replicaRebuildingBandwidthLimit) }}
|
||||
default-ublk-number-of-queue: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.defaultUblkNumberOfQueue }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.instanceManagerPodLivenessProbeTimeout) }}
|
||||
instance-manager-pod-liveness-probe-timeout: {{ .Values.defaultSettings.instanceManagerPodLivenessProbeTimeout | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.snapshotHeavyTaskConcurrentLimit) }}
|
||||
snapshot-heavy-task-concurrent-limit: {{ .Values.defaultSettings.snapshotHeavyTaskConcurrentLimit | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.nodeDiskHealthMonitoring) }}
|
||||
node-disk-health-monitoring: {{ .Values.defaultSettings.nodeDiskHealthMonitoring }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.csiAllowedTopologyKeys) }}
|
||||
csi-allowed-topology-keys: {{ .Values.defaultSettings.csiAllowedTopologyKeys | quote }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "invalid" .Values.defaultSettings.csiStorageCapacityTracking) }}
|
||||
csi-storage-capacity-tracking: {{ .Values.defaultSettings.csiStorageCapacityTracking | quote }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,152 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: longhorn-driver-deployer
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: longhorn-driver-deployer
|
||||
template:
|
||||
metadata:
|
||||
labels: {{- include "longhorn.labels" . | nindent 8 }}
|
||||
app: longhorn-driver-deployer
|
||||
spec:
|
||||
initContainers:
|
||||
- name: wait-longhorn-manager
|
||||
image: {{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.manager.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}
|
||||
command: ['sh', '-c', 'while [ $(curl -m 1 -s -o /dev/null -w "%{http_code}" http://longhorn-backend:9500/v1) != "200" ]; do echo waiting; sleep 2; done']
|
||||
containers:
|
||||
- name: longhorn-driver-deployer
|
||||
image: {{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.manager.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command:
|
||||
- longhorn-manager
|
||||
- -d
|
||||
{{- if eq .Values.longhornDriver.log.format "json" }}
|
||||
- -j
|
||||
{{- end }}
|
||||
- deploy-driver
|
||||
- --manager-image
|
||||
- "{{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.manager.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}"
|
||||
- --manager-url
|
||||
- http://longhorn-backend:9500/v1
|
||||
env:
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
- name: SERVICE_ACCOUNT
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.serviceAccountName
|
||||
{{- if .Values.csi.kubeletRootDir }}
|
||||
- name: KUBELET_ROOT_DIR
|
||||
value: {{ .Values.csi.kubeletRootDir }}
|
||||
{{- end }}
|
||||
{{- if .Values.csi.podAntiAffinityPreset }}
|
||||
- name: CSI_POD_ANTI_AFFINITY_PRESET
|
||||
value: {{ .Values.csi.podAntiAffinityPreset }}
|
||||
{{- end }}
|
||||
{{- if and .Values.image.csi.attacher.repository .Values.image.csi.attacher.tag }}
|
||||
- name: CSI_ATTACHER_IMAGE
|
||||
value: "{{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.csi.attacher.registry) }}{{ . }}/{{ end }}{{ .Values.image.csi.attacher.repository }}:{{ .Values.image.csi.attacher.tag }}"
|
||||
{{- end }}
|
||||
{{- if and .Values.image.csi.provisioner.repository .Values.image.csi.provisioner.tag }}
|
||||
- name: CSI_PROVISIONER_IMAGE
|
||||
value: "{{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.csi.provisioner.registry) }}{{ . }}/{{ end }}{{ .Values.image.csi.provisioner.repository }}:{{ .Values.image.csi.provisioner.tag }}"
|
||||
{{- end }}
|
||||
{{- if and .Values.image.csi.nodeDriverRegistrar.repository .Values.image.csi.nodeDriverRegistrar.tag }}
|
||||
- name: CSI_NODE_DRIVER_REGISTRAR_IMAGE
|
||||
value: "{{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.csi.nodeDriverRegistrar.registry) }}{{ . }}/{{ end }}{{ .Values.image.csi.nodeDriverRegistrar.repository }}:{{ .Values.image.csi.nodeDriverRegistrar.tag }}"
|
||||
{{- end }}
|
||||
{{- if and .Values.image.csi.resizer.repository .Values.image.csi.resizer.tag }}
|
||||
- name: CSI_RESIZER_IMAGE
|
||||
value: "{{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.csi.resizer.registry) }}{{ . }}/{{ end }}{{ .Values.image.csi.resizer.repository }}:{{ .Values.image.csi.resizer.tag }}"
|
||||
{{- end }}
|
||||
{{- if and .Values.image.csi.snapshotter.repository .Values.image.csi.snapshotter.tag }}
|
||||
- name: CSI_SNAPSHOTTER_IMAGE
|
||||
value: "{{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.csi.snapshotter.registry) }}{{ . }}/{{ end }}{{ .Values.image.csi.snapshotter.repository }}:{{ .Values.image.csi.snapshotter.tag }}"
|
||||
{{- end }}
|
||||
{{- if and .Values.image.csi.livenessProbe.repository .Values.image.csi.livenessProbe.tag }}
|
||||
- name: CSI_LIVENESS_PROBE_IMAGE
|
||||
value: "{{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.csi.livenessProbe.registry) }}{{ . }}/{{ end }}{{ .Values.image.csi.livenessProbe.repository }}:{{ .Values.image.csi.livenessProbe.tag }}"
|
||||
{{- end }}
|
||||
{{- if .Values.csi.attacherReplicaCount }}
|
||||
- name: CSI_ATTACHER_REPLICA_COUNT
|
||||
value: {{ .Values.csi.attacherReplicaCount | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.csi.provisionerReplicaCount }}
|
||||
- name: CSI_PROVISIONER_REPLICA_COUNT
|
||||
value: {{ .Values.csi.provisionerReplicaCount | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.csi.resizerReplicaCount }}
|
||||
- name: CSI_RESIZER_REPLICA_COUNT
|
||||
value: {{ .Values.csi.resizerReplicaCount | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.csi.snapshotterReplicaCount }}
|
||||
- name: CSI_SNAPSHOTTER_REPLICA_COUNT
|
||||
value: {{ .Values.csi.snapshotterReplicaCount | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.enableGoCoverDir }}
|
||||
- name: GOCOVERDIR
|
||||
value: /go-cover-dir/
|
||||
volumeMounts:
|
||||
- name: go-cover-dir
|
||||
mountPath: /go-cover-dir/
|
||||
{{- end }}
|
||||
{{- include "longhorn.timezoneEnv" . | nindent 10 }}
|
||||
|
||||
{{- with (coalesce .Values.global.imagePullSecrets .Values.privateRegistry.registrySecret) }}
|
||||
imagePullSecrets:
|
||||
{{- $imagePullSecrets := list }}
|
||||
{{- if kindIs "string" . }}
|
||||
{{- $imagePullSecrets = append $imagePullSecrets (dict "name" .) }}
|
||||
{{- else }}
|
||||
{{- range . }}
|
||||
{{- if kindIs "string" . }}
|
||||
{{- $imagePullSecrets = append $imagePullSecrets (dict "name" .) }}
|
||||
{{- else }}
|
||||
{{- $imagePullSecrets = append $imagePullSecrets . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- toYaml $imagePullSecrets | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.longhornDriver.priorityClass }}
|
||||
priorityClassName: {{ .Values.longhornDriver.priorityClass | quote }}
|
||||
{{- end }}
|
||||
{{- if or .Values.global.tolerations .Values.longhornDriver.tolerations .Values.global.cattle.windowsCluster.enabled }}
|
||||
tolerations:
|
||||
{{- if and .Values.global.cattle.windowsCluster.enabled .Values.global.cattle.windowsCluster.tolerations }}
|
||||
{{ toYaml .Values.global.cattle.windowsCluster.tolerations | indent 6 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.global.tolerations .Values.longhornDriver.tolerations }}
|
||||
{{ default .Values.global.tolerations .Values.longhornDriver.tolerations | toYaml | indent 6 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if or .Values.global.nodeSelector .Values.longhornDriver.nodeSelector .Values.global.cattle.windowsCluster.enabled }}
|
||||
nodeSelector:
|
||||
{{- if and .Values.global.cattle.windowsCluster.enabled .Values.global.cattle.windowsCluster.nodeSelector }}
|
||||
{{ toYaml .Values.global.cattle.windowsCluster.nodeSelector | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.global.nodeSelector .Values.longhornDriver.nodeSelector }}
|
||||
{{ default .Values.global.nodeSelector .Values.longhornDriver.nodeSelector | toYaml | indent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
serviceAccountName: longhorn-service-account
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
{{- if .Values.enableGoCoverDir }}
|
||||
volumes:
|
||||
- name: go-cover-dir
|
||||
hostPath:
|
||||
path: /go-cover-dir/
|
||||
type: DirectoryOrCreate
|
||||
{{- end }}
|
||||
@@ -0,0 +1,199 @@
|
||||
{{- if .Values.openshift.enabled }}
|
||||
{{- if .Values.openshift.ui.route }}
|
||||
# https://github.com/openshift/oauth-proxy/blob/master/contrib/sidecar.yaml
|
||||
# Create a proxy service account and ensure it will use the route "proxy"
|
||||
# Create a secure connection to the proxy via a route
|
||||
apiVersion: route.openshift.io/v1
|
||||
kind: Route
|
||||
metadata:
|
||||
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
||||
app: longhorn-ui
|
||||
name: {{ .Values.openshift.ui.route }}
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
spec:
|
||||
to:
|
||||
kind: Service
|
||||
name: longhorn-ui
|
||||
tls:
|
||||
termination: reencrypt
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
||||
app: longhorn-ui
|
||||
name: longhorn-ui
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
annotations:
|
||||
service.alpha.openshift.io/serving-cert-secret-name: longhorn-ui-tls
|
||||
spec:
|
||||
ports:
|
||||
- name: longhorn-ui
|
||||
port: {{ .Values.openshift.ui.port | default 443 }}
|
||||
targetPort: {{ .Values.openshift.ui.proxy | default 8443 }}
|
||||
selector:
|
||||
app: longhorn-ui
|
||||
---
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
||||
app: longhorn-ui
|
||||
name: longhorn-ui
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
spec:
|
||||
replicas: {{ .Values.longhornUI.replicas }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: longhorn-ui
|
||||
template:
|
||||
metadata:
|
||||
labels: {{- include "longhorn.labels" . | nindent 8 }}
|
||||
app: longhorn-ui
|
||||
spec:
|
||||
serviceAccountName: longhorn-ui-service-account
|
||||
affinity:
|
||||
{{- toYaml .Values.longhornUI.affinity | nindent 8 }}
|
||||
containers:
|
||||
{{- if .Values.openshift.enabled }}
|
||||
{{- if .Values.openshift.ui.route }}
|
||||
- name: oauth-proxy
|
||||
{{- if .Values.image.openshift.oauthProxy.repository }}
|
||||
image: {{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.openshift.oauthProxy.registry) }}{{ . }}/{{ end }}{{ .Values.image.openshift.oauthProxy.repository }}:{{ .Values.image.openshift.oauthProxy.tag }}
|
||||
{{- else }}
|
||||
image: ""
|
||||
{{- end }}
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: {{ .Values.openshift.ui.proxy | default 8443 }}
|
||||
name: public
|
||||
args:
|
||||
- --https-address=:{{ .Values.openshift.ui.proxy | default 8443 }}
|
||||
- --provider=openshift
|
||||
- --openshift-service-account=longhorn-ui-service-account
|
||||
- --upstream=http://localhost:8000
|
||||
- --tls-cert=/etc/tls/private/tls.crt
|
||||
- --tls-key=/etc/tls/private/tls.key
|
||||
- --cookie-secret=SECRET
|
||||
- --openshift-sar={"namespace":"{{ include "release_namespace" . }}","group":"longhorn.io","resource":"setting","verb":"delete"}
|
||||
volumeMounts:
|
||||
- mountPath: /etc/tls/private
|
||||
name: longhorn-ui-tls
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
- name: longhorn-ui
|
||||
image: {{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.ui.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.ui.repository }}:{{ .Values.image.longhorn.ui.tag }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
volumeMounts:
|
||||
- name: nginx-cache
|
||||
mountPath: /var/cache/nginx/
|
||||
- name: nginx-config
|
||||
mountPath: /var/config/nginx/
|
||||
- name: var-run
|
||||
mountPath: /var/run/
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
name: http
|
||||
env:
|
||||
- name: LONGHORN_MANAGER_IP
|
||||
value: "http://longhorn-backend:9500"
|
||||
- name: LONGHORN_UI_PORT
|
||||
value: "8000"
|
||||
{{- include "longhorn.timezoneEnv" . | nindent 10 }}
|
||||
volumes:
|
||||
{{- if .Values.openshift.enabled }}
|
||||
{{- if .Values.openshift.ui.route }}
|
||||
- name: longhorn-ui-tls
|
||||
secret:
|
||||
secretName: longhorn-ui-tls
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
- emptyDir: {}
|
||||
name: nginx-cache
|
||||
- emptyDir: {}
|
||||
name: nginx-config
|
||||
- emptyDir: {}
|
||||
name: var-run
|
||||
{{- with (coalesce .Values.global.imagePullSecrets .Values.privateRegistry.registrySecret) }}
|
||||
imagePullSecrets:
|
||||
{{- $imagePullSecrets := list }}
|
||||
{{- if kindIs "string" . }}
|
||||
{{- $imagePullSecrets = append $imagePullSecrets (dict "name" .) }}
|
||||
{{- else }}
|
||||
{{- range . }}
|
||||
{{- if kindIs "string" . }}
|
||||
{{- $imagePullSecrets = append $imagePullSecrets (dict "name" .) }}
|
||||
{{- else }}
|
||||
{{- $imagePullSecrets = append $imagePullSecrets . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- toYaml $imagePullSecrets | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.longhornUI.priorityClass }}
|
||||
priorityClassName: {{ .Values.longhornUI.priorityClass | quote }}
|
||||
{{- end }}
|
||||
{{- if or .Values.global.tolerations .Values.longhornUI.tolerations .Values.global.cattle.windowsCluster.enabled }}
|
||||
tolerations:
|
||||
{{- if and .Values.global.cattle.windowsCluster.enabled .Values.global.cattle.windowsCluster.tolerations }}
|
||||
{{ toYaml .Values.global.cattle.windowsCluster.tolerations | indent 6 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.global.tolerations .Values.longhornUI.tolerations }}
|
||||
{{ default .Values.global.tolerations .Values.longhornUI.tolerations | toYaml | indent 6 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if or .Values.global.nodeSelector .Values.longhornUI.nodeSelector .Values.global.cattle.windowsCluster.enabled }}
|
||||
nodeSelector:
|
||||
{{- if and .Values.global.cattle.windowsCluster.enabled .Values.global.cattle.windowsCluster.nodeSelector }}
|
||||
{{ toYaml .Values.global.cattle.windowsCluster.nodeSelector | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.global.nodeSelector .Values.longhornUI.nodeSelector }}
|
||||
{{ default .Values.global.nodeSelector .Values.longhornUI.nodeSelector | toYaml | indent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
---
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
||||
app: longhorn-ui
|
||||
{{- if eq .Values.service.ui.type "Rancher-Proxy" }}
|
||||
kubernetes.io/cluster-service: "true"
|
||||
{{- end }}
|
||||
{{- with .Values.service.ui.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
name: longhorn-frontend
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
{{- with .Values.service.ui.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if eq .Values.service.ui.type "Rancher-Proxy" }}
|
||||
type: ClusterIP
|
||||
{{- else }}
|
||||
type: {{ .Values.service.ui.type }}
|
||||
{{- end }}
|
||||
{{- if and .Values.service.ui.loadBalancerIP (eq .Values.service.ui.type "LoadBalancer") }}
|
||||
loadBalancerIP: {{ .Values.service.ui.loadBalancerIP }}
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.service.ui.type "LoadBalancer") .Values.service.ui.loadBalancerSourceRanges }}
|
||||
loadBalancerSourceRanges: {{- toYaml .Values.service.ui.loadBalancerSourceRanges | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.service.ui.type "LoadBalancer") .Values.service.ui.loadBalancerClass }}
|
||||
loadBalancerClass: {{ .Values.service.ui.loadBalancerClass }}
|
||||
{{- end }}
|
||||
selector:
|
||||
app: longhorn-ui
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: http
|
||||
{{- if .Values.service.ui.nodePort }}
|
||||
nodePort: {{ .Values.service.ui.nodePort }}
|
||||
{{- else }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
@@ -0,0 +1,4 @@
|
||||
{{- range .Values.extraObjects }}
|
||||
---
|
||||
{{- tpl (toYaml . ) $ }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,42 @@
|
||||
{{- if .Values.httproute.enabled -}}
|
||||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: longhorn-httproute
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
||||
app: longhorn-httproute
|
||||
{{- with .Values.httproute.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .Values.httproute.parentRefs }}
|
||||
parentRefs:
|
||||
{{- range . }}
|
||||
- group: {{ .group | default "gateway.networking.k8s.io" }}
|
||||
kind: {{ .kind | default "Gateway" }}
|
||||
name: {{ .name }}
|
||||
{{- with .namespace }}
|
||||
namespace: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .sectionName }}
|
||||
sectionName: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .Values.httproute.hostnames }}
|
||||
hostnames:
|
||||
{{- range . }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
- matches:
|
||||
- path:
|
||||
type: {{ .Values.httproute.pathType | default "PathPrefix" }}
|
||||
value: {{ .Values.httproute.path | default "/" }}
|
||||
backendRefs:
|
||||
- name: longhorn-frontend
|
||||
port: 80
|
||||
{{- end }}
|
||||
@@ -0,0 +1,52 @@
|
||||
{{- if .Values.ingress.enabled }}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: longhorn-ingress
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
||||
app: longhorn-ingress
|
||||
annotations:
|
||||
{{- if .Values.ingress.secureBackends }}
|
||||
ingress.kubernetes.io/secure-backends: "true"
|
||||
{{- end }}
|
||||
{{- range $key, $value := .Values.ingress.annotations }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.ingressClassName }}
|
||||
ingressClassName: {{ .Values.ingress.ingressClassName }}
|
||||
{{- end }}
|
||||
rules:
|
||||
- host: {{ .Values.ingress.host }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ default "" .Values.ingress.path }}
|
||||
pathType: {{ default "ImplementationSpecific" .Values.ingress.pathType }}
|
||||
backend:
|
||||
service:
|
||||
name: longhorn-frontend
|
||||
port:
|
||||
number: 80
|
||||
{{- range .Values.ingress.extraHosts }}
|
||||
- host: {{ . }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ default "" $.Values.ingress.path }}
|
||||
pathType: {{ default "ImplementationSpecific" $.Values.ingress.pathType }}
|
||||
backend:
|
||||
service:
|
||||
name: longhorn-frontend
|
||||
port:
|
||||
number: 80
|
||||
{{- end }}
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
- hosts:
|
||||
- {{ .Values.ingress.host }}
|
||||
{{- range .Values.ingress.extraHosts }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
secretName: {{ .Values.ingress.tlsSecret }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
{{- if .Values.networkPolicies.enabled }}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: backing-image-data-source
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
longhorn.io/component: backing-image-data-source
|
||||
policyTypes:
|
||||
- Ingress
|
||||
ingress:
|
||||
- from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: longhorn-manager
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
longhorn.io/component: instance-manager
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
longhorn.io/component: backing-image-manager
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
longhorn.io/component: backing-image-data-source
|
||||
{{- end }}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
{{- if .Values.networkPolicies.enabled }}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: backing-image-manager
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
longhorn.io/component: backing-image-manager
|
||||
policyTypes:
|
||||
- Ingress
|
||||
ingress:
|
||||
- from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: longhorn-manager
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
longhorn.io/component: instance-manager
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
longhorn.io/component: backing-image-manager
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
longhorn.io/component: backing-image-data-source
|
||||
{{- end }}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
{{- if .Values.networkPolicies.enabled }}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: instance-manager
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
longhorn.io/component: instance-manager
|
||||
policyTypes:
|
||||
- Ingress
|
||||
ingress:
|
||||
- from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: longhorn-manager
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
longhorn.io/component: instance-manager
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
longhorn.io/component: backing-image-manager
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
longhorn.io/component: backing-image-data-source
|
||||
{{- end }}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
{{- if .Values.networkPolicies.enabled }}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: longhorn-manager
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app: longhorn-manager
|
||||
policyTypes:
|
||||
- Ingress
|
||||
ingress:
|
||||
- from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: longhorn-manager
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: longhorn-ui
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: longhorn-csi-plugin
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
longhorn.io/managed-by: longhorn-manager
|
||||
matchExpressions:
|
||||
- { key: recurring-job.longhorn.io, operator: Exists }
|
||||
- podSelector:
|
||||
matchExpressions:
|
||||
- { key: longhorn.io/job-task, operator: Exists }
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: longhorn-driver-deployer
|
||||
{{- end }}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
{{- if .Values.networkPolicies.enabled }}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: longhorn-recovery-backend
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
longhorn.io/recovery-backend: longhorn-recovery-backend
|
||||
policyTypes:
|
||||
- Ingress
|
||||
ingress:
|
||||
- ports:
|
||||
- protocol: TCP
|
||||
port: 9503
|
||||
{{- end }}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
{{- if and .Values.networkPolicies.enabled .Values.ingress.enabled (not (eq .Values.networkPolicies.type "")) }}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: longhorn-ui-frontend
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app: longhorn-ui
|
||||
policyTypes:
|
||||
- Ingress
|
||||
ingress:
|
||||
- from:
|
||||
{{- if eq .Values.networkPolicies.type "rke1"}}
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
kubernetes.io/metadata.name: ingress-nginx
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: controller
|
||||
app.kubernetes.io/instance: ingress-nginx
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
{{- else if eq .Values.networkPolicies.type "rke2" }}
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
kubernetes.io/metadata.name: kube-system
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: controller
|
||||
app.kubernetes.io/instance: rke2-ingress-nginx
|
||||
app.kubernetes.io/name: rke2-ingress-nginx
|
||||
{{- else if eq .Values.networkPolicies.type "k3s" }}
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
kubernetes.io/metadata.name: kube-system
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: traefik
|
||||
ports:
|
||||
- port: 8000
|
||||
protocol: TCP
|
||||
- port: 80
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
{{- if .Values.networkPolicies.enabled }}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: longhorn-admission-webhook
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
longhorn.io/admission-webhook: longhorn-admission-webhook
|
||||
policyTypes:
|
||||
- Ingress
|
||||
ingress:
|
||||
- ports:
|
||||
- protocol: TCP
|
||||
port: 9502
|
||||
{{- end }}
|
||||
@@ -0,0 +1,69 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
annotations:
|
||||
"helm.sh/hook": post-upgrade
|
||||
"helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation
|
||||
name: longhorn-post-upgrade
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
||||
spec:
|
||||
activeDeadlineSeconds: 900
|
||||
backoffLimit: 1
|
||||
template:
|
||||
metadata:
|
||||
name: longhorn-post-upgrade
|
||||
labels: {{- include "longhorn.labels" . | nindent 8 }}
|
||||
spec:
|
||||
containers:
|
||||
- name: longhorn-post-upgrade
|
||||
image: {{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.manager.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command:
|
||||
- longhorn-manager
|
||||
- post-upgrade
|
||||
env:
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
{{- include "longhorn.timezoneEnv" . | nindent 8 }}
|
||||
restartPolicy: OnFailure
|
||||
{{- with (coalesce .Values.global.imagePullSecrets .Values.privateRegistry.registrySecret) }}
|
||||
imagePullSecrets:
|
||||
{{- $imagePullSecrets := list }}
|
||||
{{- if kindIs "string" . }}
|
||||
{{- $imagePullSecrets = append $imagePullSecrets (dict "name" .) }}
|
||||
{{- else }}
|
||||
{{- range . }}
|
||||
{{- if kindIs "string" . }}
|
||||
{{- $imagePullSecrets = append $imagePullSecrets (dict "name" .) }}
|
||||
{{- else }}
|
||||
{{- $imagePullSecrets = append $imagePullSecrets . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- toYaml $imagePullSecrets | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.longhornManager.priorityClass }}
|
||||
priorityClassName: {{ .Values.longhornManager.priorityClass | quote }}
|
||||
{{- end }}
|
||||
serviceAccountName: longhorn-service-account
|
||||
{{- if or .Values.global.tolerations .Values.longhornManager.tolerations .Values.global.cattle.windowsCluster.enabled }}
|
||||
tolerations:
|
||||
{{- if and .Values.global.cattle.windowsCluster.enabled .Values.global.cattle.windowsCluster.tolerations }}
|
||||
{{ toYaml .Values.global.cattle.windowsCluster.tolerations | indent 6 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.global.tolerations .Values.longhornManager.tolerations }}
|
||||
{{ default .Values.global.tolerations .Values.longhornManager.tolerations | toYaml | indent 6 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if or .Values.global.nodeSelector .Values.longhornManager.nodeSelector .Values.global.cattle.windowsCluster.enabled }}
|
||||
nodeSelector:
|
||||
{{- if and .Values.global.cattle.windowsCluster.enabled .Values.global.cattle.windowsCluster.nodeSelector }}
|
||||
{{ toYaml .Values.global.cattle.windowsCluster.nodeSelector | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.global.nodeSelector .Values.longhornManager.nodeSelector }}
|
||||
{{ default .Values.global.nodeSelector .Values.longhornManager.nodeSelector | toYaml | indent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,77 @@
|
||||
{{- if and .Values.preUpgradeChecker.jobEnabled .Values.preUpgradeChecker.upgradeVersionCheck}}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
annotations:
|
||||
"helm.sh/hook": pre-upgrade
|
||||
"helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation,hook-failed
|
||||
name: longhorn-pre-upgrade
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
||||
spec:
|
||||
activeDeadlineSeconds: 900
|
||||
backoffLimit: 1
|
||||
template:
|
||||
metadata:
|
||||
name: longhorn-pre-upgrade
|
||||
labels: {{- include "longhorn.labels" . | nindent 8 }}
|
||||
spec:
|
||||
containers:
|
||||
- name: longhorn-pre-upgrade
|
||||
image: {{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.manager.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
securityContext:
|
||||
privileged: true
|
||||
command:
|
||||
- longhorn-manager
|
||||
- pre-upgrade
|
||||
volumeMounts:
|
||||
- name: proc
|
||||
mountPath: /host/proc/
|
||||
env:
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
{{- include "longhorn.timezoneEnv" . | nindent 8 }}
|
||||
volumes:
|
||||
- name: proc
|
||||
hostPath:
|
||||
path: /proc/
|
||||
restartPolicy: OnFailure
|
||||
{{- with (coalesce .Values.global.imagePullSecrets .Values.privateRegistry.registrySecret) }}
|
||||
imagePullSecrets:
|
||||
{{- $imagePullSecrets := list }}
|
||||
{{- if kindIs "string" . }}
|
||||
{{- $imagePullSecrets = append $imagePullSecrets (dict "name" .) }}
|
||||
{{- else }}
|
||||
{{- range . }}
|
||||
{{- if kindIs "string" . }}
|
||||
{{- $imagePullSecrets = append $imagePullSecrets (dict "name" .) }}
|
||||
{{- else }}
|
||||
{{- $imagePullSecrets = append $imagePullSecrets . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- toYaml $imagePullSecrets | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: longhorn-service-account
|
||||
{{- if or .Values.global.tolerations .Values.longhornManager.tolerations .Values.global.cattle.windowsCluster.enabled }}
|
||||
tolerations:
|
||||
{{- if and .Values.global.cattle.windowsCluster.enabled .Values.global.cattle.windowsCluster.tolerations }}
|
||||
{{ toYaml .Values.global.cattle.windowsCluster.tolerations | indent 6 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.global.tolerations .Values.longhornManager.tolerations }}
|
||||
{{ default .Values.global.tolerations .Values.longhornManager.tolerations | toYaml | indent 6 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if or .Values.global.nodeSelector .Values.longhornManager.nodeSelector .Values.global.cattle.windowsCluster.enabled }}
|
||||
nodeSelector:
|
||||
{{- if and .Values.global.cattle.windowsCluster.enabled .Values.global.cattle.windowsCluster.nodeSelector }}
|
||||
{{ toYaml .Values.global.cattle.windowsCluster.nodeSelector | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.global.nodeSelector .Values.longhornManager.nodeSelector }}
|
||||
{{ default .Values.global.nodeSelector .Values.longhornManager.nodeSelector | toYaml | indent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,9 @@
|
||||
apiVersion: scheduling.k8s.io/v1
|
||||
kind: PriorityClass
|
||||
metadata:
|
||||
name: "longhorn-critical"
|
||||
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
||||
description: "Ensure Longhorn pods have the highest priority to prevent any unexpected eviction by the Kubernetes scheduler under node pressure"
|
||||
globalDefault: false
|
||||
preemptionPolicy: PreemptLowerPriority
|
||||
value: 1000000000
|
||||
@@ -0,0 +1,66 @@
|
||||
{{- if .Values.enablePSP }}
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodSecurityPolicy
|
||||
metadata:
|
||||
name: longhorn-psp
|
||||
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
||||
spec:
|
||||
privileged: true
|
||||
allowPrivilegeEscalation: true
|
||||
requiredDropCapabilities:
|
||||
- NET_RAW
|
||||
allowedCapabilities:
|
||||
- SYS_ADMIN
|
||||
hostNetwork: false
|
||||
hostIPC: false
|
||||
hostPID: true
|
||||
runAsUser:
|
||||
rule: RunAsAny
|
||||
seLinux:
|
||||
rule: RunAsAny
|
||||
fsGroup:
|
||||
rule: RunAsAny
|
||||
supplementalGroups:
|
||||
rule: RunAsAny
|
||||
volumes:
|
||||
- configMap
|
||||
- downwardAPI
|
||||
- emptyDir
|
||||
- secret
|
||||
- projected
|
||||
- hostPath
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: longhorn-psp-role
|
||||
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- policy
|
||||
resources:
|
||||
- podsecuritypolicies
|
||||
verbs:
|
||||
- use
|
||||
resourceNames:
|
||||
- longhorn-psp
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: longhorn-psp-binding
|
||||
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: longhorn-psp-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: longhorn-service-account
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
- kind: ServiceAccount
|
||||
name: default
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,16 @@
|
||||
{{- if .Values.privateRegistry.createSecret }}
|
||||
{{- if .Values.privateRegistry.registrySecret }}
|
||||
{{- if not (kindIs "string" .Values.privateRegistry.registrySecret) }}
|
||||
{{- fail "The privateRegistry.registrySecret value must be a string" }}
|
||||
{{- end }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ .Values.privateRegistry.registrySecret }}
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
||||
type: kubernetes.io/dockerconfigjson
|
||||
data:
|
||||
.dockerconfigjson: {{ template "secret" . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,29 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: {{ include "longhorn.name" . }}
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
labels:
|
||||
{{- include "longhorn.labels" . | nindent 4 }}
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["pods", "pods/log", "events", "secrets", "services", "endpoints", "configmaps", "serviceaccounts", "persistentvolumeclaims", "persistentvolumeclaims/status"]
|
||||
verbs: ["*"]
|
||||
- apiGroups: ["apps"]
|
||||
resources: ["daemonsets", "deployments", "statefulsets", "replicasets"]
|
||||
verbs: ["*"]
|
||||
- apiGroups: ["batch"]
|
||||
resources: ["jobs", "cronjobs"]
|
||||
verbs: ["*"]
|
||||
- apiGroups: ["policy"]
|
||||
resources: ["poddisruptionbudgets"]
|
||||
verbs: ["*"]
|
||||
- apiGroups: ["coordination.k8s.io"]
|
||||
resources: ["leases"]
|
||||
verbs: ["*"]
|
||||
- apiGroups: ["rbac.authorization.k8s.io"]
|
||||
resources: ["roles", "rolebindings"]
|
||||
verbs: ["*"]
|
||||
- apiGroups: ["discovery.k8s.io"]
|
||||
resources: ["endpointslices"]
|
||||
verbs: ["*"]
|
||||
@@ -0,0 +1,13 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: {{ include "longhorn.name" . }}
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ include "longhorn.name" . }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: longhorn-service-account
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
@@ -0,0 +1,40 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: longhorn-service-account
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
||||
{{- with .Values.serviceAccount.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: longhorn-ui-service-account
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
||||
{{- with .Values.serviceAccount.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.openshift.enabled }}
|
||||
{{- if .Values.openshift.ui.route }}
|
||||
{{- if not .Values.serviceAccount.annotations }}
|
||||
annotations:
|
||||
{{- end }}
|
||||
serviceaccounts.openshift.io/oauth-redirectreference.primary: '{"kind":"OAuthRedirectReference","apiVersion":"v1","reference":{"kind":"Route","name":"longhorn-ui"}}'
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: longhorn-support-bundle
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
||||
{{- with .Values.serviceAccount.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,40 @@
|
||||
{{- if .Values.metrics.serviceMonitor.enabled -}}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: longhorn-prometheus-servicemonitor
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
labels:
|
||||
{{- include "longhorn.labels" . | nindent 4 }}
|
||||
name: longhorn-prometheus-servicemonitor
|
||||
{{- with .Values.metrics.serviceMonitor.additionalLabels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.metrics.serviceMonitor.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: longhorn-manager
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ include "release_namespace" . }}
|
||||
endpoints:
|
||||
- port: manager
|
||||
{{- with .Values.metrics.serviceMonitor.interval }}
|
||||
interval: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||
scrapeTimeout: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .Values.metrics.serviceMonitor.relabelings }}
|
||||
relabelings:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.metrics.serviceMonitor.metricRelabelings }}
|
||||
metricRelabelings:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,31 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
||||
app: longhorn-admission-webhook
|
||||
name: longhorn-admission-webhook
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
longhorn.io/admission-webhook: longhorn-admission-webhook
|
||||
ports:
|
||||
- name: admission-webhook
|
||||
port: 9502
|
||||
targetPort: admission-wh
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
||||
app: longhorn-recovery-backend
|
||||
name: longhorn-recovery-backend
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
longhorn.io/recovery-backend: longhorn-recovery-backend
|
||||
ports:
|
||||
- name: recovery-backend
|
||||
port: 9503
|
||||
targetPort: recov-backend
|
||||
@@ -0,0 +1,60 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: longhorn-storageclass
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
||||
data:
|
||||
storageclass.yaml: |
|
||||
kind: StorageClass
|
||||
apiVersion: storage.k8s.io/v1
|
||||
metadata:
|
||||
name: longhorn
|
||||
annotations:
|
||||
storageclass.kubernetes.io/is-default-class: {{ .Values.persistence.defaultClass | quote }}
|
||||
provisioner: driver.longhorn.io
|
||||
allowVolumeExpansion: true
|
||||
reclaimPolicy: "{{ .Values.persistence.reclaimPolicy }}"
|
||||
volumeBindingMode: {{ .Values.persistence.volumeBindingMode | default "Immediate" }}
|
||||
parameters:
|
||||
numberOfReplicas: "{{ .Values.persistence.defaultClassReplicaCount }}"
|
||||
staleReplicaTimeout: "30"
|
||||
fromBackup: ""
|
||||
{{- if .Values.persistence.defaultFsType }}
|
||||
fsType: "{{ .Values.persistence.defaultFsType }}"
|
||||
{{- end }}
|
||||
{{- if .Values.persistence.defaultMkfsParams }}
|
||||
mkfsParams: "{{ .Values.persistence.defaultMkfsParams }}"
|
||||
{{- end }}
|
||||
{{- if .Values.persistence.migratable }}
|
||||
migratable: "{{ .Values.persistence.migratable }}"
|
||||
{{- end }}
|
||||
{{- if .Values.persistence.nfsOptions }}
|
||||
nfsOptions: "{{ .Values.persistence.nfsOptions }}"
|
||||
{{- end }}
|
||||
{{- if .Values.persistence.backingImage.enable }}
|
||||
backingImage: {{ .Values.persistence.backingImage.name }}
|
||||
backingImageDataSourceType: {{ .Values.persistence.backingImage.dataSourceType }}
|
||||
backingImageDataSourceParameters: {{ .Values.persistence.backingImage.dataSourceParameters }}
|
||||
backingImageChecksum: {{ .Values.persistence.backingImage.expectedChecksum }}
|
||||
{{- end }}
|
||||
{{- if .Values.persistence.recurringJobSelector.enable }}
|
||||
recurringJobSelector: '{{ .Values.persistence.recurringJobSelector.jobList }}'
|
||||
{{- end }}
|
||||
dataLocality: {{ .Values.persistence.defaultDataLocality | quote }}
|
||||
{{- if .Values.persistence.defaultDiskSelector.enable }}
|
||||
diskSelector: "{{ .Values.persistence.defaultDiskSelector.selector }}"
|
||||
{{- end }}
|
||||
{{- if .Values.persistence.defaultNodeSelector.enable }}
|
||||
nodeSelector: "{{ .Values.persistence.defaultNodeSelector.selector }}"
|
||||
{{- end }}
|
||||
{{- if .Values.persistence.unmapMarkSnapChainRemoved }}
|
||||
unmapMarkSnapChainRemoved: "{{ .Values.persistence.unmapMarkSnapChainRemoved }}"
|
||||
{{- end }}
|
||||
{{- if .Values.persistence.disableRevisionCounter }}
|
||||
disableRevisionCounter: "{{ .Values.persistence.disableRevisionCounter }}"
|
||||
dataEngine: "{{ .Values.persistence.dataEngine }}"
|
||||
{{- end }}
|
||||
{{- if .Values.persistence.backupTargetName }}
|
||||
backupTargetName: "{{ .Values.persistence.backupTargetName }}"
|
||||
{{- end }}
|
||||
@@ -0,0 +1,16 @@
|
||||
{{- if .Values.ingress.enabled }}
|
||||
{{- range .Values.ingress.secrets }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ .name }}
|
||||
namespace: {{ include "release_namespace" $ }}
|
||||
labels: {{- include "longhorn.labels" $ | nindent 4 }}
|
||||
app: longhorn
|
||||
type: kubernetes.io/tls
|
||||
data:
|
||||
tls.crt: {{ .certificate | b64enc }}
|
||||
tls.key: {{ .key | b64enc }}
|
||||
---
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,70 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
annotations:
|
||||
"helm.sh/hook": pre-delete
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
name: longhorn-uninstall
|
||||
namespace: {{ include "release_namespace" . }}
|
||||
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
||||
spec:
|
||||
activeDeadlineSeconds: 900
|
||||
backoffLimit: 1
|
||||
template:
|
||||
metadata:
|
||||
name: longhorn-uninstall
|
||||
labels: {{- include "longhorn.labels" . | nindent 8 }}
|
||||
spec:
|
||||
containers:
|
||||
- name: longhorn-uninstall
|
||||
image: {{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.manager.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command:
|
||||
- longhorn-manager
|
||||
- uninstall
|
||||
- --force
|
||||
env:
|
||||
- name: LONGHORN_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
{{- include "longhorn.timezoneEnv" . | nindent 8 }}
|
||||
restartPolicy: Never
|
||||
{{- with (coalesce .Values.global.imagePullSecrets .Values.privateRegistry.registrySecret) }}
|
||||
imagePullSecrets:
|
||||
{{- $imagePullSecrets := list }}
|
||||
{{- if kindIs "string" . }}
|
||||
{{- $imagePullSecrets = append $imagePullSecrets (dict "name" .) }}
|
||||
{{- else }}
|
||||
{{- range . }}
|
||||
{{- if kindIs "string" . }}
|
||||
{{- $imagePullSecrets = append $imagePullSecrets (dict "name" .) }}
|
||||
{{- else }}
|
||||
{{- $imagePullSecrets = append $imagePullSecrets . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- toYaml $imagePullSecrets | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.longhornManager.priorityClass }}
|
||||
priorityClassName: {{ .Values.longhornManager.priorityClass | quote }}
|
||||
{{- end }}
|
||||
serviceAccountName: longhorn-service-account
|
||||
{{- if or .Values.global.tolerations .Values.longhornManager.tolerations .Values.global.cattle.windowsCluster.enabled }}
|
||||
tolerations:
|
||||
{{- if and .Values.global.cattle.windowsCluster.enabled .Values.global.cattle.windowsCluster.tolerations }}
|
||||
{{ toYaml .Values.global.cattle.windowsCluster.tolerations | indent 6 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.global.tolerations .Values.longhornManager.tolerations }}
|
||||
{{ default .Values.global.tolerations .Values.longhornManager.tolerations | toYaml | indent 6 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if or .Values.global.nodeSelector .Values.longhornManager.nodeSelector .Values.global.cattle.windowsCluster.enabled }}
|
||||
nodeSelector:
|
||||
{{- if and .Values.global.cattle.windowsCluster.enabled .Values.global.cattle.windowsCluster.nodeSelector }}
|
||||
{{ toYaml .Values.global.cattle.windowsCluster.nodeSelector | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.global.nodeSelector .Values.longhornManager.nodeSelector }}
|
||||
{{ default .Values.global.nodeSelector .Values.longhornManager.nodeSelector | toYaml | indent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,53 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: "longhorn-admin"
|
||||
labels:
|
||||
rbac.authorization.k8s.io/aggregate-to-admin: "true"
|
||||
rules:
|
||||
- apiGroups: [ "longhorn.io" ]
|
||||
resources: ["volumes", "volumes/status", "engines", "engines/status", "replicas", "replicas/status", "settings", "settings/status",
|
||||
"engineimages", "engineimages/status", "nodes", "nodes/status", "instancemanagers", "instancemanagers/status",
|
||||
"sharemanagers", "sharemanagers/status", "backingimages", "backingimages/status",
|
||||
"backingimagemanagers", "backingimagemanagers/status", "backingimagedatasources", "backingimagedatasources/status", "backupbackingimages", "backupbackingimages/status",
|
||||
"backuptargets", "backuptargets/status", "backupvolumes", "backupvolumes/status", "backups", "backups/status",
|
||||
"recurringjobs", "recurringjobs/status", "orphans", "orphans/status", "snapshots", "snapshots/status",
|
||||
"supportbundles", "supportbundles/status", "systembackups", "systembackups/status", "systemrestores", "systemrestores/status",
|
||||
"volumeattachments", "volumeattachments/status"]
|
||||
verbs: [ "*" ]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: "longhorn-edit"
|
||||
labels:
|
||||
rbac.authorization.k8s.io/aggregate-to-edit: "true"
|
||||
rules:
|
||||
- apiGroups: [ "longhorn.io" ]
|
||||
resources: ["volumes", "volumes/status", "engines", "engines/status", "replicas", "replicas/status", "settings", "settings/status",
|
||||
"engineimages", "engineimages/status", "nodes", "nodes/status", "instancemanagers", "instancemanagers/status",
|
||||
"sharemanagers", "sharemanagers/status", "backingimages", "backingimages/status",
|
||||
"backingimagemanagers", "backingimagemanagers/status", "backingimagedatasources", "backingimagedatasources/status", "backupbackingimages", "backupbackingimages/status",
|
||||
"backuptargets", "backuptargets/status", "backupvolumes", "backupvolumes/status", "backups", "backups/status",
|
||||
"recurringjobs", "recurringjobs/status", "orphans", "orphans/status", "snapshots", "snapshots/status",
|
||||
"supportbundles", "supportbundles/status", "systembackups", "systembackups/status", "systemrestores", "systemrestores/status",
|
||||
"volumeattachments", "volumeattachments/status"]
|
||||
verbs: [ "*" ]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: "longhorn-view"
|
||||
labels:
|
||||
rbac.authorization.k8s.io/aggregate-to-view: "true"
|
||||
rules:
|
||||
- apiGroups: [ "longhorn.io" ]
|
||||
resources: ["volumes", "volumes/status", "engines", "engines/status", "replicas", "replicas/status", "settings", "settings/status",
|
||||
"engineimages", "engineimages/status", "nodes", "nodes/status", "instancemanagers", "instancemanagers/status",
|
||||
"sharemanagers", "sharemanagers/status", "backingimages", "backingimages/status",
|
||||
"backingimagemanagers", "backingimagemanagers/status", "backingimagedatasources", "backingimagedatasources/status", "backupbackingimages", "backupbackingimages/status",
|
||||
"backuptargets", "backuptargets/status", "backupvolumes", "backupvolumes/status", "backups", "backups/status",
|
||||
"recurringjobs", "recurringjobs/status", "orphans", "orphans/status", "snapshots", "snapshots/status",
|
||||
"supportbundles", "supportbundles/status", "systembackups", "systembackups/status", "systemrestores", "systemrestores/status",
|
||||
"volumeattachments", "volumeattachments/status"]
|
||||
verbs: [ "get", "list", "watch" ]
|
||||
@@ -0,0 +1,35 @@
|
||||
#{{- if gt (len (lookup "rbac.authorization.k8s.io/v1" "ClusterRole" "" "")) 0 -}}
|
||||
# {{- $found := dict -}}
|
||||
# {{- set $found "longhorn.io/v1beta2/BackingImageDataSource" false -}}
|
||||
# {{- set $found "longhorn.io/v1beta2/BackingImageManager" false -}}
|
||||
# {{- set $found "longhorn.io/v1beta2/BackingImage" false -}}
|
||||
# {{- set $found "longhorn.io/v1beta2/BackupBackingImage" false -}}
|
||||
# {{- set $found "longhorn.io/v1beta2/Backup" false -}}
|
||||
# {{- set $found "longhorn.io/v1beta2/BackupTarget" false -}}
|
||||
# {{- set $found "longhorn.io/v1beta2/BackupVolume" false -}}
|
||||
# {{- set $found "longhorn.io/v1beta2/EngineImage" false -}}
|
||||
# {{- set $found "longhorn.io/v1beta2/Engine" false -}}
|
||||
# {{- set $found "longhorn.io/v1beta2/InstanceManager" false -}}
|
||||
# {{- set $found "longhorn.io/v1beta2/Node" false -}}
|
||||
# {{- set $found "longhorn.io/v1beta2/Orphan" false -}}
|
||||
# {{- set $found "longhorn.io/v1beta2/RecurringJob" false -}}
|
||||
# {{- set $found "longhorn.io/v1beta2/Replica" false -}}
|
||||
# {{- set $found "longhorn.io/v1beta2/Setting" false -}}
|
||||
# {{- set $found "longhorn.io/v1beta2/ShareManager" false -}}
|
||||
# {{- set $found "longhorn.io/v1beta2/Snapshot" false -}}
|
||||
# {{- set $found "longhorn.io/v1beta2/SupportBundle" false -}}
|
||||
# {{- set $found "longhorn.io/v1beta2/SystemBackup" false -}}
|
||||
# {{- set $found "longhorn.io/v1beta2/SystemRestore" false -}}
|
||||
# {{- set $found "longhorn.io/v1beta2/VolumeAttachment" false -}}
|
||||
# {{- set $found "longhorn.io/v1beta2/Volume" false -}}
|
||||
# {{- range .Capabilities.APIVersions -}}
|
||||
# {{- if hasKey $found (toString .) -}}
|
||||
# {{- set $found (toString .) true -}}
|
||||
# {{- end -}}
|
||||
# {{- end -}}
|
||||
# {{- range $_, $exists := $found -}}
|
||||
# {{- if (eq $exists false) -}}
|
||||
# {{- required "Required CRDs are missing. Please install the corresponding CRD chart before installing this chart." "" -}}
|
||||
# {{- end -}}
|
||||
# {{- end -}}
|
||||
#{{- end -}}
|
||||
@@ -0,0 +1,7 @@
|
||||
#{{- if gt (len (lookup "rbac.authorization.k8s.io/v1" "ClusterRole" "" "")) 0 -}}
|
||||
#{{- if .Values.enablePSP }}
|
||||
#{{- if not (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }}
|
||||
#{{- fail "The target cluster does not have the PodSecurityPolicy API resource. Please disable PSPs in this chart before proceeding." -}}
|
||||
#{{- end }}
|
||||
#{{- end }}
|
||||
#{{- end }}
|
||||
Reference in New Issue
Block a user