Add OpenEBS v4.6.1 with images repointed to ghcr.io/wrktalk-tech - Loki and Alloy disabled

This commit is contained in:
2026-10-01 13:22:53 +05:30
commit a14a568465
912 changed files with 135387 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
Successfully installed OpenEBS.
Check the status by running: kubectl get pods -n {{ .Release.Namespace }}
The default values will install both Local PV and Replicated PV. However,
the Replicated PV will require additional configuration to be functional.
The Local PV offers non-replicated local storage using 3 different storage
backends i.e Hostpath, LVM and ZFS, while the Replicated PV provides one replicated highly-available
storage backend i.e Mayastor.
For more information,
- view the online documentation at https://openebs.io/docs
- connect with an active community on our Kubernetes slack channel.
- Sign up to Kubernetes slack: https://slack.k8s.io
- #openebs channel: https://kubernetes.slack.com/messages/openebs
+140
View File
@@ -0,0 +1,140 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "openebs.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "openebs.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "openebs.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "openebs.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "openebs.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}
{{/*
Define meta labels for openebs components
*/}}
{{- define "openebs.common.metaLabels" -}}
chart: {{ template "openebs.chart" . }}
heritage: {{ .Release.Service }}
openebs.io/version: {{ .Values.release.version | quote }}
{{- end -}}
{{/*
Returns matched if the Hostpath Localpv Deployment is of v3.x
Usage:
{{- if include "hostpath_is_v3" . }}
Do something
{{- end }}
*/}}
{{- define "hostpath_is_v3" -}}
{{/* Name from https://github.com/openebs/charts/blob/openebs-3.10.0/charts/openebs/templates/localprovisioner/deployment-local-provisioner.yaml#L8 */}}
{{- $name1 := printf "%s-localpv-provisioner" (include "openebs.fullname" .) -}}
{{/* Name from https://github.com/openebs/dynamic-localpv-provisioner/blob/v4.3.0/deploy/helm/charts/templates/deployment.yaml#L5 */}}
{{- $sub := index .Subcharts "localpv-provisioner" -}}
{{- $name2 := include "localpv.fullname" $sub -}}
{{/* Lookup Deployment by name1, fallback to name2 */}}
{{- $deploy := lookup "apps/v1" "Deployment" .Release.Namespace $name1 -}}
{{- if not $deploy -}}
{{- $deploy = lookup "apps/v1" "Deployment" .Release.Namespace $name2 -}}
{{- end -}}
{{- if not $deploy -}}
{{/* There just is no localpv-provisioner deployment. This is unexpected. We err on the side of caution and match */}}
matched
{{- else -}}
{{/* Validate chart label matches v3.x.y */}}
{{- if and $deploy.metadata $deploy.metadata.labels -}}
{{- $chart := index $deploy.metadata.labels "chart" | default "" -}}
{{- if regexMatch "^(openebs|localpv-provisioner)-3\\.[0-9]+\\.[0-9]+.*$" $chart -}}
matched
{{- end -}}
{{- else -}}
{{/*
Localpv deployment exists, but doesn't have .metadata or .metadata.labels for some reason.
This may happen in a dry-run due to how lookup behaves. Erring on the side of caution and matching.
*/}}
matched
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Concatenates imagepullsecrets and handles different formats (example - secret or - name: secret)
*/}}
{{- define "openebs.common.pullSecrets" -}}
{{- $names := list -}}
{{- range ((.global).imagePullSecrets) -}}
{{- if kindIs "map" . }}
{{- if and (hasKey . "name") (not (empty .name)) -}}
{{ $names = append $names .name }}
{{- end -}}
{{- else if not (empty .) -}}
{{ $names = append $names . -}}
{{- end -}}
{{- end -}}
{{- range .images -}}
{{- range .imagePullSecrets }}
{{- if kindIs "map" . -}}
{{- if and (hasKey . "name") (not (empty .name)) -}}
{{- $names = append $names .name }}
{{- end -}}
{{- else if not (empty .) -}}
{{- $names = append $names . -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- $names = uniq $names -}}
{{- if $names -}}
{{- range $names }}
- name: {{ . }}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Creates the image URL ie registry/repository:tag
*/}}
{{- define "openebs.common.image" -}}
{{- $registryName := default .imageRoot.registry ((.global).imageRegistry) | trimSuffix "/" -}}
{{- $repositoryName := .imageRoot.repo -}}
{{- $termination := .imageRoot.tag | toString -}}
{{- if $registryName }}
{{- printf "%s/%s:%s" $registryName $repositoryName $termination -}}
{{- else -}}
{{- printf "%s:%s" $repositoryName $termination -}}
{{- end -}}
{{- end -}}
+48
View File
@@ -0,0 +1,48 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Validate that localpv-dependent components are not configured to create
StorageClasses when the Dynamic LocalPV Provisioner is disabled.
Usage:
{{ include "openebs.validate.localpv" . }}
*/}}
{{- define "openebs.validate.localpv" -}}
{{- if not .Values.engines.local.hostpath.enabled -}}
{{- if and .Values.loki.enabled .Values.loki.localpvScConfig.enabled -}}
{{- fail `
CONFIGURATION ERROR: engines.local.hostpath.enabled=false but loki.localpvScConfig.enabled=true
The Dynamic LocalPV Provisioner is disabled, but Loki's localpv
StorageClass configuration is enabled. This would create StorageClasses
with provisioner "openebs.io/local" that cannot be fulfilled.
To fix, choose one of:
1. Enable the provisioner:
--set engines.local.hostpath.enabled=true
2. Disable localpv StorageClass creation and provide alternate storage classes:
--set loki.localpvScConfig.enabled=false
--set loki.singleBinary.persistence.storageClass=<your-storage-class>
--set loki.minio.persistence.storageClass=<your-storage-class>
` -}}
{{- end -}}
{{- if and .Values.engines.replicated.mayastor.enabled .Values.mayastor.etcd.localpvScConfig.enabled -}}
{{- fail `
CONFIGURATION ERROR: engines.local.hostpath.enabled=false but mayastor.etcd.localpvScConfig.enabled=true
The Dynamic LocalPV Provisioner is disabled, but Mayastor's etcd localpv
StorageClass configuration is enabled. This would create a StorageClass
with provisioner "openebs.io/local" that cannot be fulfilled.
To fix, choose one of:
1. Enable the provisioner:
--set engines.local.hostpath.enabled=true
2. Disable localpv StorageClass creation and provide an alternate storage class:
--set mayastor.etcd.localpvScConfig.enabled=false
--set mayastor.etcd.persistence.storageClass=<your-storage-class>
` -}}
{{- end -}}
{{- end -}}
{{- end -}}
@@ -0,0 +1,33 @@
{{- if and (.Values.engines.local.hostpath.enabled) (.Values.loki.localpvScConfig.enabled) (.Values.loki.singleBinary.persistence.enabled) (.Values.loki.enabled) }}
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
annotations:
cas.openebs.io/config: |
- name: StorageType
value: "hostpath"
- name: BasePath
value: {{ tpl ( .Values.loki.localpvScConfig.loki.basePath | quote ) . }}
openebs.io/cas-type: local
name: {{ tpl .Values.loki.localpvScConfig.loki.name . | required "StorageClass name for loki localpv storage cannot be empty" }}
provisioner: openebs.io/local
reclaimPolicy: {{ .Values.loki.localpvScConfig.loki.reclaimPolicy }}
volumeBindingMode: {{ .Values.loki.localpvScConfig.loki.volumeBindingMode }}
{{- end }}
---
{{- if and (.Values.engines.local.hostpath.enabled) (.Values.loki.localpvScConfig.enabled) (.Values.loki.minio.persistence.enabled) (.Values.loki.enabled) }}
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
annotations:
cas.openebs.io/config: |
- name: StorageType
value: "hostpath"
- name: BasePath
value: {{ tpl ( .Values.loki.localpvScConfig.minio.basePath | quote ) . }}
openebs.io/cas-type: local
name: {{ tpl .Values.loki.localpvScConfig.minio.name . | required "StorageClass name for loki localpv storage cannot be empty" }}
provisioner: openebs.io/local
reclaimPolicy: {{ .Values.loki.localpvScConfig.minio.reclaimPolicy }}
volumeBindingMode: {{ .Values.loki.localpvScConfig.minio.volumeBindingMode }}
{{- end }}
+116
View File
@@ -0,0 +1,116 @@
{{- if and .Values.preUpgradeHook.enabled .Values.engines.local.hostpath.enabled }}
{{- if .Release.IsUpgrade }}
{{- if include "hostpath_is_v3" . }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: openebs-pre-upgrade-hook
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io/instance: {{ .Release.Name | quote }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
annotations:
"helm.sh/hook": pre-upgrade
"helm.sh/hook-weight": "-2"
{{- with .Values.preUpgradeHook.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: openebs-pre-upgrade-hook
labels:
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io/instance: {{ .Release.Name | quote }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
annotations:
"helm.sh/hook": pre-upgrade
"helm.sh/hook-weight": "-2"
{{- with .Values.preUpgradeHook.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
verbs: ["get", "patch"]
- apiGroups: ["apps"]
resources: ["deployments"]
verbs: ["delete", "list"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: openebs-pre-upgrade-hook
labels:
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io/instance: {{ .Release.Name | quote }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
annotations:
"helm.sh/hook": pre-upgrade
"helm.sh/hook-weight": "-1"
{{- with .Values.preUpgradeHook.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
subjects:
- kind: ServiceAccount
name: openebs-pre-upgrade-hook
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: openebs-pre-upgrade-hook
apiGroup: rbac.authorization.k8s.io
---
apiVersion: batch/v1
kind: Job
metadata:
name: "openebs-pre-upgrade-hook"
labels:
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io/instance: {{ .Release.Name | quote }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
annotations:
"helm.sh/hook": pre-upgrade
"helm.sh/hook-weight": "0"
{{- with .Values.preUpgradeHook.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
template:
metadata:
name: "openebs-pre-upgrade-hook"
labels:
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io/instance: {{ .Release.Name | quote }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
{{- with .Values.preUpgradeHook.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
serviceAccountName: "openebs-pre-upgrade-hook"
{{- with .Values.preUpgradeHook.tolerations }}
tolerations:
{{- toYaml . | nindent 6 }}
{{- end }}
restartPolicy: Never
containers:
- name: pre-upgrade-job
image: {{ include "openebs.common.image" (dict "imageRoot" .Values.preUpgradeHook.image "global" .Values.global) }}
imagePullPolicy: {{ default .Values.preUpgradeHook.image.pullPolicy .Values.global.imagePullPolicy }}
command:
- "/bin/sh"
- "-c"
args:
- "(kubectl annotate --overwrite crd volumesnapshots.snapshot.storage.k8s.io volumesnapshotclasses.snapshot.storage.k8s.io volumesnapshotcontents.snapshot.storage.k8s.io helm.sh/resource-policy=keep || true) && (kubectl -n {{ .Release.Namespace }} delete deploy -l openebs.io/component-name=openebs-localpv-provisioner --ignore-not-found)"
{{- if or .Values.global.imagePullSecrets .Values.preUpgradeHook.imagePullSecrets }}
imagePullSecrets:
{{- include "openebs.common.pullSecrets" (dict "images" (list .Values.preUpgradeHook) "global" .Values.global) | indent 6 }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
+1
View File
@@ -0,0 +1 @@
{{- include "openebs.validate.localpv" . -}}