fix: vendor observability charts
Deploy Cluster / Terraform (push) Waiting to run
Deploy Cluster / Ansible (push) Blocked by required conditions

This commit is contained in:
2026-05-04 10:49:46 +00:00
parent f5473a9bec
commit a04b8ad865
325 changed files with 46640 additions and 40 deletions
@@ -0,0 +1,41 @@
{{/*
singleBinary common labels
*/}}
{{- define "loki.singleBinaryLabels" -}}
{{ include "loki.labels" . }}
app.kubernetes.io/component: single-binary
{{- end }}
{{/* singleBinary selector labels */}}
{{- define "loki.singleBinarySelectorLabels" -}}
{{ include "loki.selectorLabels" . }}
app.kubernetes.io/component: single-binary
{{- end }}
{{/*
singleBinary priority class name
*/}}
{{- define "loki.singleBinaryPriorityClassName" -}}
{{- $pcn := coalesce .Values.global.priorityClassName .Values.singleBinary.priorityClassName -}}
{{- if $pcn }}
priorityClassName: {{ $pcn }}
{{- end }}
{{- end }}
{{/* singleBinary replicas calculation */}}
{{- define "loki.singleBinaryReplicas" -}}
{{- $replicas := 1 }}
{{- $usingObjectStorage := eq (include "loki.isUsingObjectStorage" .) "true" }}
{{- if and $usingObjectStorage (gt (int .Values.singleBinary.replicas) 1)}}
{{- $replicas = int .Values.singleBinary.replicas -}}
{{- end }}
{{- printf "%d" $replicas }}
{{- end }}
{{/*
singleBinary target
*/}}
{{- define "loki.singleBinaryTarget" -}}
{{- .Values.singleBinary.targetModule -}}{{- if .Values.loki.ui.enabled -}},ui{{- end -}}
{{- end -}}
@@ -0,0 +1,52 @@
{{- $isSingleBinary := eq (include "loki.deployment.isSingleBinary" .) "true" -}}
{{- $usingObjectStorage := eq (include "loki.isUsingObjectStorage" .) "true" }}
{{- $autoscalingv2 := .Capabilities.APIVersions.Has "autoscaling/v2" -}}
{{- if and $isSingleBinary $usingObjectStorage ( .Values.singleBinary.autoscaling.enabled ) }}
{{- if $autoscalingv2 }}
apiVersion: autoscaling/v2
{{- else }}
apiVersion: autoscaling/v2beta1
{{- end }}
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "loki.singleBinaryFullname" . }}
namespace: {{ include "loki.namespace" . }}
labels:
{{- include "loki.singleBinaryLabels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: StatefulSet
name: {{ include "loki.singleBinaryFullname" . }}
minReplicas: {{ .Values.singleBinary.autoscaling.minReplicas }}
maxReplicas: {{ .Values.singleBinary.autoscaling.maxReplicas }}
{{- with .Values.singleBinary.autoscaling.behavior }}
behavior:
{{- toYaml . | nindent 4 }}
{{- end }}
metrics:
{{- with .Values.singleBinary.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
{{- if $autoscalingv2 }}
target:
type: Utilization
averageUtilization: {{ . }}
{{- else }}
targetAverageUtilization: {{ . }}
{{- end }}
{{- end }}
{{- with .Values.singleBinary.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
{{- if $autoscalingv2 }}
target:
type: Utilization
averageUtilization: {{ . }}
{{- else }}
targetAverageUtilization: {{ . }}
{{- end }}
{{- end }}
{{- end }}
@@ -0,0 +1,16 @@
{{- $isSingleBinary := eq (include "loki.deployment.isSingleBinary" .) "true" -}}
{{- if and .Values.podDisruptionBudget $isSingleBinary -}}
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ template "loki.fullname" . }}
namespace: {{ include "loki.namespace" . }}
labels:
{{- include "loki.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
{{- include "loki.singleBinarySelectorLabels" . | nindent 6 }}
{{ toYaml .Values.podDisruptionBudget | indent 2 }}
{{- end }}
@@ -0,0 +1,35 @@
{{- $isSingleBinary := eq (include "loki.deployment.isSingleBinary" .) "true" -}}
{{- if $isSingleBinary }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ include "loki.name" . }}-headless
namespace: {{ include "loki.namespace" . }}
labels:
{{- include "loki.labels" . | nindent 4 }}
{{- with .Values.loki.serviceLabels }}
{{- toYaml . | nindent 4}}
{{- end }}
{{- with .Values.singleBinary.service.labels }}
{{- toYaml . | nindent 4}}
{{- end }}
variant: headless
prometheus.io/service-monitor: "false"
annotations:
{{- with .Values.loki.serviceAnnotations }}
{{- toYaml . | nindent 4}}
{{- end }}
{{- with .Values.singleBinary.service.annotations }}
{{- toYaml . | nindent 4}}
{{- end }}
spec:
clusterIP: None
ports:
- name: http-metrics
port: {{ .Values.loki.server.http_listen_port }}
targetPort: http-metrics
protocol: TCP
selector:
{{- include "loki.selectorLabels" . | nindent 4 }}
{{- end }}
@@ -0,0 +1,40 @@
{{- $isSingleBinary := eq (include "loki.deployment.isSingleBinary" .) "true" -}}
{{- if $isSingleBinary }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ include "loki.singleBinaryFullname" . }}
namespace: {{ include "loki.namespace" . }}
labels:
{{- include "loki.labels" . | nindent 4 }}
{{- with .Values.loki.serviceLabels }}
{{- toYaml . | nindent 4}}
{{- end }}
{{- with .Values.singleBinary.service.labels }}
{{- toYaml . | nindent 4}}
{{- end }}
annotations:
{{- with .Values.loki.serviceAnnotations }}
{{- toYaml . | nindent 4}}
{{- end }}
{{- with .Values.singleBinary.service.annotations }}
{{- toYaml . | nindent 4}}
{{- end }}
spec:
type: {{ .Values.singleBinary.service.type }}
ports:
- name: http-metrics
port: {{ .Values.loki.server.http_listen_port }}
targetPort: http-metrics
protocol: TCP
- name: grpc
port: {{ .Values.loki.server.grpc_listen_port }}
targetPort: grpc
protocol: TCP
selector:
{{- include "loki.singleBinarySelectorLabels" . | nindent 4 }}
{{- with .Values.singleBinary.selectorLabels }}
{{- tpl (toYaml .) $ | nindent 4 }}
{{- end }}
{{- end }}
@@ -0,0 +1,147 @@
{{- if and .Values.singleBinary.persistence.enabled .Values.singleBinary.persistence.enableStatefulSetRecreationForSizeChange -}}
{{- $newStatefulSet := include (print $.Template.BasePath "/single-binary/statefulset.yaml") . | fromYaml -}}
{{- $currentStatefulset := dict -}}
{{- if $newStatefulSet -}}
{{- $currentStatefulset = lookup $newStatefulSet.apiVersion $newStatefulSet.kind $newStatefulSet.metadata.namespace $newStatefulSet.metadata.name -}}
{{- $needsRecreation := false -}}
{{- $templates := dict -}}
{{- if $currentStatefulset -}}
{{- if ne (len $newStatefulSet.spec.volumeClaimTemplates) (len $currentStatefulset.spec.volumeClaimTemplates) -}}
{{- $needsRecreation = true -}}
{{- end -}}
{{- range $index, $newVolumeClaimTemplate := $newStatefulSet.spec.volumeClaimTemplates -}}
{{- $currentVolumeClaimTemplateSpec := dict -}}
{{- range $oldVolumeClaimTemplate := $currentStatefulset.spec.volumeClaimTemplates -}}
{{- if eq $oldVolumeClaimTemplate.metadata.name $newVolumeClaimTemplate.metadata.name -}}
{{- $currentVolumeClaimTemplateSpec = $oldVolumeClaimTemplate.spec -}}
{{- end -}}
{{- end -}}
{{- $newVolumeClaimTemplateStorageSize := $newVolumeClaimTemplate.spec.resources.requests.storage -}}
{{- if not $currentVolumeClaimTemplateSpec -}}
{{- $needsRecreation = true -}}
{{- else -}}
{{- if ne $newVolumeClaimTemplateStorageSize $currentVolumeClaimTemplateSpec.resources.requests.storage -}}
{{- $needsRecreation = true -}}
{{- $templates = set $templates $newVolumeClaimTemplate.metadata.name $newVolumeClaimTemplateStorageSize -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- if $needsRecreation -}}
apiVersion: batch/v1
kind: Job
metadata:
name: {{ $newStatefulSet.metadata.name }}-recreate
namespace: {{ $newStatefulSet.metadata.namespace }}
labels:
{{- include "loki.singleBinaryLabels" . | nindent 4 }}
app.kubernetes.io/component: statefulset-recreate-job
annotations:
"helm.sh/hook": pre-upgrade
"helm.sh/hook-weight": "-5"
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
spec:
ttlSecondsAfterFinished: 300
template:
metadata:
labels:
{{- include "loki.singleBinarySelectorLabels" . | nindent 8 }}
app.kubernetes.io/component: statefulset-recreate-job
spec:
restartPolicy: Never
serviceAccountName: {{ $newStatefulSet.metadata.name }}-recreate
containers:
- name: recreate-statefulset
image: {{ include "loki.baseImage" (dict "service" (dict "registry" "docker.io" "repository" "rancher/kubectl" "tag" (.Capabilities.KubeVersion.Version | default "v1.33.0")) "global" .Values.global.image) }}
command:
- delete
- statefulset
- --namespace={{ $newStatefulSet.metadata.namespace }}
- --cascade=orphan
- {{ $newStatefulSet.metadata.name }}
{{- range $index := until (int $currentStatefulset.spec.replicas) }}
{{- range $template, $size := $templates }}
- name: patch-pvc-{{ $template }}-{{ $index }}
image: {{ include "loki.baseImage" (dict "service" (dict "registry" "docker.io" "repository" "rancher/kubectl" "tag" ($.Capabilities.KubeVersion.Version | default "v1.33.0")) "global" $.Values.global.image) }}
command:
- patch
- pvc
- --namespace={{ $newStatefulSet.metadata.namespace }}
- {{ printf "%s-%s-%d" $template $newStatefulSet.metadata.name $index }}
- --type='json'
- '-p=[{"op": "replace", "path": "/spec/resources/requests/storage", "value": "{{ $size }}"}]'
{{- end }}
{{- end }}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ $newStatefulSet.metadata.name }}-recreate
namespace: {{ $newStatefulSet.metadata.namespace }}
labels:
{{- include "loki.singleBinaryLabels" . | nindent 4 }}
app.kubernetes.io/component: statefulset-recreate-job
annotations:
"helm.sh/hook": pre-upgrade
"helm.sh/hook-weight": "-10"
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ $newStatefulSet.metadata.name }}-recreate
namespace: {{ $newStatefulSet.metadata.namespace }}
labels:
{{- include "loki.singleBinaryLabels" . | nindent 4 }}
app.kubernetes.io/component: statefulset-recreate-job
annotations:
"helm.sh/hook": pre-upgrade
"helm.sh/hook-weight": "-10"
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
rules:
- apiGroups:
- apps
resources:
- statefulsets
resourceNames:
- {{ $newStatefulSet.metadata.name }}
verbs:
- delete
{{- if $templates }}
- apiGroups:
- v1
resources:
- persistentvolumeclaims
resourceNames:
{{- range $index := until (int $currentStatefulset.spec.replicas) }}
{{- range $template := $templates | keys }}
- {{ printf "%s-%s-%d" $template $newStatefulSet.metadata.name $index }}
{{- end }}
{{- end }}
verbs:
- patch
{{- end }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ $newStatefulSet.metadata.name }}-recreate
namespace: {{ $newStatefulSet.metadata.namespace }}
labels:
{{- include "loki.singleBinaryLabels" . | nindent 4 }}
app.kubernetes.io/component: statefulset-recreate-job
annotations:
"helm.sh/hook": pre-upgrade
"helm.sh/hook-weight": "-10"
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
subjects:
- kind: ServiceAccount
name: {{ $newStatefulSet.metadata.name }}-recreate
namespace: {{ $newStatefulSet.metadata.namespace }}
roleRef:
kind: Role
name: {{ $newStatefulSet.metadata.name }}-recreate
apiGroup: rbac.authorization.k8s.io
{{- end -}}
{{- end -}}
{{- end -}}
@@ -0,0 +1,308 @@
{{- $isSingleBinary := eq (include "loki.deployment.isSingleBinary" .) "true" -}}
{{- if $isSingleBinary }}
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "loki.singleBinaryFullname" . }}
namespace: {{ include "loki.namespace" . }}
labels:
{{- include "loki.singleBinaryLabels" . | nindent 4 }}
app.kubernetes.io/part-of: memberlist
{{- if or (not (empty .Values.loki.annotations)) (not (empty .Values.singleBinary.annotations))}}
annotations:
{{- with .Values.loki.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.singleBinary.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
spec:
replicas: {{ include "loki.singleBinaryReplicas" . }}
podManagementPolicy: Parallel
updateStrategy:
rollingUpdate:
partition: 0
serviceName: {{ include "loki.singleBinaryFullname" . }}-headless
revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }}
{{- if and (semverCompare ">= 1.23-0" (include "loki.kubeVersion" .)) (.Values.singleBinary.persistence.enableStatefulSetAutoDeletePVC) (.Values.singleBinary.persistence.enabled) }}
{{/*
Data on the singleBinary nodes is easy to replace, so we want to always delete PVCs to make
operation easier, and will rely on re-fetching data when needed.
*/}}
persistentVolumeClaimRetentionPolicy:
whenDeleted: {{ .Values.singleBinary.persistence.whenDeleted }}
whenScaled: {{ .Values.singleBinary.persistence.whenScaled }}
{{- end }}
selector:
matchLabels:
{{- include "loki.singleBinarySelectorLabels" . | nindent 6 }}
template:
metadata:
annotations:
checksum/config: {{ include "loki.configMapOrSecretContentHash" (dict "ctx" . "name" "/config.yaml") }}
{{- if .Values.singleBinary.persistence.enabled }}
storage/size: {{ .Values.singleBinary.persistence.size | quote }}
{{- end }}
{{- with .Values.loki.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.singleBinary.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
kubectl.kubernetes.io/default-container: "loki"
labels:
{{- include "loki.singleBinarySelectorLabels" . | nindent 8 }}
{{- with .Values.loki.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.singleBinary.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.singleBinary.selectorLabels }}
{{- tpl (toYaml .) $ | nindent 8 }}
{{- end }}
app.kubernetes.io/part-of: memberlist
spec:
{{- with .Values.singleBinary.topologySpreadConstraints }}
topologySpreadConstraints:
{{- tpl ( . | toYaml) $ | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "loki.serviceAccountName" . }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
{{ include "loki.enableServiceLinks" . }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "loki.singleBinaryPriorityClassName" . | nindent 6 }}
securityContext:
{{- toYaml .Values.loki.podSecurityContext | nindent 8 }}
terminationGracePeriodSeconds: {{ .Values.singleBinary.terminationGracePeriodSeconds }}
{{- if and (semverCompare ">=1.33-0" (include "loki.kubeVersion" .)) (kindIs "bool" .Values.singleBinary.hostUsers) }}
hostUsers: {{ .Values.singleBinary.hostUsers }}
{{- end }}
{{- if .Values.singleBinary.initContainers }}
initContainers:
{{- with .Values.singleBinary.initContainers }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
containers:
- name: loki
image: {{ include "loki.image" . }}
imagePullPolicy: {{ .Values.loki.image.pullPolicy }}
args:
- -config.file=/etc/loki/config/config.yaml
- -target={{ include "loki.singleBinaryTarget" . }}
{{- with .Values.singleBinary.extraArgs }}
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- name: http-metrics
containerPort: {{ .Values.loki.server.http_listen_port }}
protocol: TCP
- name: grpc
containerPort: {{ .Values.loki.server.grpc_listen_port }}
protocol: TCP
- name: http-memberlist
containerPort: 7946
protocol: TCP
{{- with .Values.singleBinary.extraEnv }}
env:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.singleBinary.extraEnvFrom }}
envFrom:
{{- toYaml . | nindent 12 }}
{{- end }}
securityContext:
{{- toYaml .Values.loki.containerSecurityContext | nindent 12 }}
{{- with .Values.loki.readinessProbe }}
readinessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.loki.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.loki.startupProbe }}
startupProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
- name: tmp
mountPath: /tmp
- name: config
mountPath: /etc/loki/config
- name: runtime-config
mountPath: /etc/loki/runtime-config
{{- if .Values.singleBinary.persistence.enabled }}
- name: storage
mountPath: /var/loki
{{- end }}
{{- if .Values.enterprise.enabled }}
- name: license
mountPath: /etc/loki/license
{{- end }}
{{- if .Values.sidecar.rules.enabled }}
- name: sc-rules-volume
mountPath: {{ .Values.sidecar.rules.folder | quote }}
{{- end}}
{{- with .Values.singleBinary.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.singleBinary.resources | nindent 12 }}
{{- if .Values.sidecar.rules.enabled }}
- name: loki-sc-rules
{{- $dict := dict "service" .Values.sidecar.image "global" .Values.global }}
{{- if .Values.sidecar.image.sha }}
image: "{{ include "loki.baseImage" $dict }}@sha256:{{ .Values.sidecar.image.sha }}"
{{- else }}
image: {{ include "loki.baseImage" $dict }}
{{- end }}
imagePullPolicy: {{ .Values.sidecar.image.pullPolicy }}
env:
- name: METHOD
value: {{ .Values.sidecar.rules.watchMethod }}
- name: LABEL
value: "{{ .Values.sidecar.rules.label }}"
{{- if .Values.sidecar.rules.labelValue }}
- name: LABEL_VALUE
value: {{ quote .Values.sidecar.rules.labelValue }}
{{- end }}
- name: FOLDER
value: "{{ .Values.sidecar.rules.folder }}"
- name: RESOURCE
value: {{ quote .Values.sidecar.rules.resource }}
{{- if .Values.sidecar.enableUniqueFilenames }}
- name: UNIQUE_FILENAMES
value: "{{ .Values.sidecar.enableUniqueFilenames }}"
{{- end }}
{{- if .Values.sidecar.rules.searchNamespace }}
- name: NAMESPACE
value: "{{ .Values.sidecar.rules.searchNamespace | join "," }}"
{{- end }}
{{- if .Values.sidecar.skipTlsVerify }}
- name: SKIP_TLS_VERIFY
value: "{{ .Values.sidecar.skipTlsVerify }}"
{{- end }}
{{- if .Values.sidecar.rules.script }}
- name: SCRIPT
value: "{{ .Values.sidecar.rules.script }}"
{{- end }}
{{- if .Values.sidecar.rules.watchServerTimeout }}
- name: WATCH_SERVER_TIMEOUT
value: "{{ .Values.sidecar.rules.watchServerTimeout }}"
{{- end }}
{{- if .Values.sidecar.rules.watchClientTimeout }}
- name: WATCH_CLIENT_TIMEOUT
value: "{{ .Values.sidecar.rules.watchClientTimeout }}"
{{- end }}
{{- if .Values.sidecar.rules.logLevel }}
- name: LOG_LEVEL
value: "{{ .Values.sidecar.rules.logLevel }}"
{{- end }}
{{- if .Values.sidecar.livenessProbe }}
livenessProbe:
{{- toYaml .Values.sidecar.livenessProbe | nindent 12 }}
{{- end }}
{{- if .Values.sidecar.readinessProbe }}
readinessProbe:
{{- toYaml .Values.sidecar.readinessProbe | nindent 12 }}
{{- end }}
{{- if .Values.sidecar.startupProbe }}
startupProbe:
{{- toYaml .Values.sidecar.startupProbe | nindent 12 }}
{{- end }}
{{- if .Values.sidecar.resources }}
resources:
{{- toYaml .Values.sidecar.resources | nindent 12 }}
{{- end }}
{{- if .Values.sidecar.securityContext }}
securityContext:
{{- toYaml .Values.sidecar.securityContext | nindent 12 }}
{{- end }}
volumeMounts:
- name: sc-rules-volume
mountPath: {{ .Values.sidecar.rules.folder | quote }}
{{- end}}
{{- with .Values.singleBinary.extraContainers }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.singleBinary.affinity }}
affinity:
{{- tpl ( . | toYaml) $ | nindent 8 }}
{{- end }}
{{- with .Values.singleBinary.dnsConfig | default .Values.loki.dnsConfig }}
dnsConfig:
{{- tpl . $ | nindent 8 }}
{{- end }}
{{- with .Values.singleBinary.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.singleBinary.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: tmp
emptyDir: {}
- name: config
{{- include "loki.configVolume" . | nindent 10 }}
- name: runtime-config
configMap:
name: {{ template "loki.name" . }}-runtime
{{- if .Values.enterprise.enabled }}
- name: license
secret:
{{- if .Values.enterprise.useExternalLicense }}
secretName: {{ .Values.enterprise.externalLicenseName }}
{{- else }}
secretName: enterprise-logs-license
{{- end }}
{{- end }}
{{- if .Values.sidecar.rules.enabled }}
- name: sc-rules-volume
{{- if .Values.sidecar.rules.sizeLimit }}
emptyDir:
sizeLimit: {{ .Values.sidecar.rules.sizeLimit }}
{{- else }}
emptyDir: {}
{{- end -}}
{{- end -}}
{{- with .Values.singleBinary.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.singleBinary.persistence.enabled }}
volumeClaimTemplates:
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: storage
{{- with .Values.singleBinary.persistence.annotations }}
annotations:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.singleBinary.persistence.labels }}
labels:
{{- toYaml . | nindent 10 }}
{{- end }}
spec:
accessModes:
{{- toYaml .Values.singleBinary.persistence.accessModes | nindent 10 }}
{{- with .Values.singleBinary.persistence.storageClass }}
storageClassName: {{ if (eq "-" .) }}""{{ else }}{{ . }}{{ end }}
{{- end }}
resources:
requests:
storage: {{ .Values.singleBinary.persistence.size | quote }}
{{- with .Values.singleBinary.persistence.selector }}
selector:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- end }}
{{- end }}