Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storage resizing doesn't work with SingleBinary deployment. #12854

Open
mindthecap opened this issue May 2, 2024 · 1 comment
Open

Storage resizing doesn't work with SingleBinary deployment. #12854

mindthecap opened this issue May 2, 2024 · 1 comment
Labels
area/helm type/bug Somehing is not working as expected

Comments

@mindthecap
Copy link

Storage resize in SingleBinary deployment is impossible because it's created with StatefulSets, which prohibits changing the manifest after deployment.
The affected line in code:

{{- if .Values.singleBinary.persistence.enabled }}
volumeClaimTemplates:
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: storage
spec:
accessModes:
- ReadWriteOnce
{{- 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 }}

SingleBinary deployment should create separate PVC and reference it in the StatefulSet.

@mindthecap
Copy link
Author

mindthecap commented May 2, 2024

A workaround for this:

  1. Resize the PVC and PV.
  2. Delete the statefulset but keep the pod kubectl delete sts --cascade=orphan loki.
  3. Redeploy Loki with helm.
  4. Delete the pod to trigger volume resizing.

More info in here: https://serverfault.com/questions/955293/how-to-increase-disk-size-in-a-stateful-set

@JStickler JStickler added area/helm type/bug Somehing is not working as expected labels May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/helm type/bug Somehing is not working as expected
Projects
None yet
Development

No branches or pull requests

2 participants