helmfile.yaml 1.61 KB
environments:
  default:
    values:
      - namespace: nfs-server
        namePrefix: "test-"
        images:
          debian: "debian:bullseye-20211220"
          volume-nfs: k8s.gcr.io/volume-nfs:0.8
        nfs_server:
          jsonPatches: []
          strategicMergePatches: []
          service:
            nfs_server:
              clusterIP: 0
---

releases:
  - name: {{ .Values.namePrefix }}nfs-server
    namespace: {{ .Values.namespace }}
    chart: charts/nfs-server
    values:
      - set-common-values.yaml.gotmpl
    jsonPatches:
      {{- if .Values.nfs_server.service.nfs_server.clusterIP }}
      - target:
          kind: Service
          name: {{ .Values.namePrefix }}nfs_server
          namespace: {{ .Values.namespace }}
          version: v1
        patch:
          - op: add
            path: /spec/clusterIP
            value: {{ .Values.nfs_server.service.nfs_server.clusterIP }}
      {{- end }}
      {{- if not (empty (.Values.nfs_server.jsonPatches)) }}
      {{- .Values.nfs_server.jsonPatches | toYaml | indent 6 }}
      {{- end }}
    strategicMergePatches:
      - apiVersion: v1
        kind: ReplicationController
        metadata:
          name: {{ .Values.namePrefix }}nfs-server
          namespace: {{ .Values.namespace }}
        spec:
          template:
            spec:
              volumes:
                - name: nfs-data
                  persistentVolumeClaim:
                    claimName: {{ .Values.namePrefix }}nfs-data
      {{- if not (empty (.Values.nfs_server.strategicMergePatches)) }}
      {{- .Values.nfs_server.strategicMergePatches | toYaml | indent 6 }}
      {{- end }}