Overview

https://fluxcd.io/flux/components/helm/helmreleases/#post-renderers


HelmRelease resources has a built-in Kustomize compatible Post Renderer, which provides the following Kustomize directives:

Example

Example of using a postRender to pass additional environment variables to pod:

---
# set $patch: delete to exclude from installation
#$patch: delete

apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
  name: kafka-azure-sink
  namespace: ncyd-flux
spec:
  values:
    repository: "ncydacrreleases.azurecr.io/"
#    hostAliases:
#    - ip: "172.28.21.136"
#      hostnames:
#        - "26c833f7-85ae-45e7-95a3-3003b2a01443.ods.opinsights.azure.com"
#      # - "26c833f7-85aed-45e7-95a3-3003b2a01443.ods.opinsights.azure.com"
    kafka:
      topics: "ncyd_kubernetes,etlflow_7977_nedr_alerts_3164,etlflow_7977_nedr_alerts_31648,etlflow_7977_nedr_alerts,etlflow_8333_nes_alerts_tcp,etlflow_8333_nes_alerts"
    azure:
      workspace:
        name: ncyd-lannion1-logs-uc
        id: 26c833f7-85ae-45e7-95a3-3003b2a01443
        key: 2/+pyKBwbOVWS3lX7U9TvsLBZltrsLnS4XaKuuhO+9lnsD7po6va0C6yQc4cXuquH/9/I+G/YwCh5yFC8whpmw==
##      endpointUrlPattern: "https://%s.ods.opinsights.azure.com/api/logs?api-version=2016-04-01"
  postRenderers:
    - kustomize:
        patchesStrategicMerge:
          - apiVersion: apps/v1
            kind: Deployment
            metadata:
              name: kafka-azure-sink
            spec:
              template:
                spec:
                  containers:
                    - name: kafka-azure-sink
                      env:
                        - name: "http_proxy"
                          value: "http://squid-service.ncyd.svc.cluster.local:3128"
                        - name: "https_proxy"
                          value: "http://squid-service.ncyd.svc.cluster.local:3128"
                        - name: "no_proxy"
                          value: "127.0.0.1,localhost,.local,.internal"
  • No labels