logdna / logdna-agent-v2

The blazingly fast, resource efficient log collection client
https://logdna.com
MIT License
63 stars 46 forks source link

Helm Chart: Do not set agent key secret in values #234

Open karrth opened 2 years ago

karrth commented 2 years ago

I was able to avoid committing our agent key to our version controlled kubernetes configuration by overriding the key location variable and providing a false value in logdna.key, following the older v2 documentation:

  values:
    logdna:
      key: 'true'
    extraEnv:
      - name: LOGDNA_AGENT_KEY
        valueFrom:
          secretKeyRef:
            name: logdna-agent-key
            key: logdna-agent-key

While I understand requiring the key for the daemonset ot be spawned, I'm not sure why you'd deploy this chart unless deploying the daemonset is your objective. Ideally, one could specify the secret to be used for value retrevial, and the chart wouldn't try to create a secret if that value is specified. One way would be to:

  1. Removing this if statement from the beginning of daemon_set.yaml: {{- if .Values.logdna.key -}}
  2. Set an if statement around the secret creation to not create it if the LOGDNA_AGENT_KEY env variable exists
inductor commented 2 years ago

This is very important... please do not ignore :(