existingClaim at persistence has got problems with namespace variable in the name #203

Closed
opened 2021-07-07 12:25:25 +00:00 by skriesch · 3 comments
Contributor

We are using the gitea helm-chart with Jenkins deployments.
Therefore, we identify PVCs additionally with the namespace name/variable:

persistence:
## Enable persistence using Persistent Volume Claims
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
  enabled: true
  existingClaim: gitea-gitea-**{{.Release.Namespace}}**
  size: 10Gi
  storageClass: gitea-manual
  accessModes:
    - ReadWriteOnce
  labels: {}
  annotations: 
    "helm.sh/resource-policy": keep
volumePermissions:
  enabled: true

That will be accepted by the PostgreSQL sub-helm-chart, but not by the gitea helm-chart.

We are using the solution of the PostgreSQL helm-chart in the gitea helm-chart now.

Before in templates/gitea/statefulset.yaml:
line 171: claimName: {{ .Values.persistence.existingClaim }}

Solution:

{{- with .Values.persistence.existingClaim }}
            claimName: {{ tpl . $ }}
{{- end }}
We are using the gitea helm-chart with Jenkins deployments. Therefore, we identify PVCs additionally with the namespace name/variable: ``` persistence: ## Enable persistence using Persistent Volume Claims ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ enabled: true existingClaim: gitea-gitea-**{{.Release.Namespace}}** size: 10Gi storageClass: gitea-manual accessModes: - ReadWriteOnce labels: {} annotations: "helm.sh/resource-policy": keep volumePermissions: enabled: true ``` That will be accepted by the PostgreSQL sub-helm-chart, but not by the gitea helm-chart. We are using the solution of the PostgreSQL helm-chart in the gitea helm-chart now. Before in templates/gitea/statefulset.yaml: line 171: `claimName: {{ .Values.persistence.existingClaim }}` Solution: ``` {{- with .Values.persistence.existingClaim }} claimName: {{ tpl . $ }} {{- end }} ```
Member

If you like, you can open a PR for these changes. They are always welcome and appreciated. ?

If you like, you can open a PR for these changes. They are always welcome and appreciated. ?
Author
Contributor

PR is available. :)

PR is available. :)
justusbunsi added the
kind
enhancement
label 2021-07-08 05:27:21 +00:00
Member

Released with v4.0.1

Released with v4.0.1
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitea/helm-chart#203
No description provided.