helmfile.yaml 1.37 KB
bases:
  - ../common/environments.yaml

---
releases:

  - name: {{ .Values.namePrefix }}redis-server
    namespace: {{ .Values.namespace }}
    chart: charts/redis-server
    values:
      - set-common-values.yaml.gotmpl
    jsonPatches:
      {{- if not (empty (.Values.redisServer.jsonPatches)) }}
      {{- .Values.redisServer.jsonPatches | toYaml | indent 6 }}
      {{- end }}
    strategicMergePatches:
      - apiVersion: apps/v1
        kind: Deployment
        metadata:
          name: {{ .Values.namePrefix }}redis-server
          namespace: {{ .Values.namespace }}
        spec:
          selector:
            matchLabels:
              app: {{ .Values.namePrefix }}redis-server
          template:
            metadata:
              labels:
                app: {{ .Values.namePrefix }}redis-server
            spec:
              volumes:
                - name: redis-data
                  persistentVolumeClaim:
                    claimName: {{ .Values.namePrefix }}redis-data
      - apiVersion: v1
        kind: Service
        metadata:
          name: {{ .Values.namePrefix }}redis
          namespace: {{ .Values.namespace }}
        spec:
          selector:
            app: {{ .Values.namePrefix }}redis-server
      {{- if not (empty (.Values.redisServer.strategicMergePatches)) }}
      {{- .Values.redisServer.strategicMergePatches | toYaml | indent 6 }}
      {{- end }}