Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document Use of falcosidekick.config.existingSecret In Values File #722

Open
Benjamin-Day opened this issue Aug 6, 2024 · 2 comments
Open
Assignees
Labels
kind/documentation Improvements or additions to documentation

Comments

@Benjamin-Day
Copy link

Benjamin-Day commented Aug 6, 2024

After a lot of searching I have been unable to find documentation or examples for the use of the falcosidekick.config.existingSecret value. I may have missed it, but I think this would be excellent area to provide an example or two. I would like to be able to reference my slack webhook url (falcosidekick.config.slack.webhookurl) from an existing secret to avoid having to put it in my values file or configure it manually each time. I have found others online with similar desires but have yet to find a solution. Any feedback or links to existing documentation I may have missed are more than welcome. Thanks!

@Benjamin-Day Benjamin-Day added the kind/documentation Improvements or additions to documentation label Aug 6, 2024
@Issif Issif self-assigned this Aug 17, 2024
@Issif
Copy link
Member

Issif commented Aug 22, 2024

Hi,

The secrets are used as env vars, and these env vars are used to configure falcosidekick:

          envFrom:
            - secretRef:
                name: {{ include "falcosidekick.fullname" . }}
            {{- if .Values.config.existingSecret }}
            - secretRef:
                name: {{ .Values.config.existingSecret }}
            {{- end }}

A secret file is created by the chart and populated with the values from the values.yaml:

data:
  # Slack Output
  SLACK_WEBHOOKURL: "{{ .Values.config.slack.webhookurl | b64enc }}"
  SLACK_CHANNEL: "{{ .Values.config.slack.channel | b64enc }}"
  SLACK_OUTPUTFORMAT: "{{ .Values.config.slack.outputformat | b64enc }}"
  SLACK_FOOTER: "{{ .Values.config.slack.footer | b64enc }}"
  SLACK_ICON: "{{ .Values.config.slack.icon | b64enc }}"
  SLACK_USERNAME: "{{ .Values.config.slack.username | b64enc }}"
  SLACK_MINIMUMPRIORITY: "{{ .Values.config.slack.minimumpriority | b64enc }}"
  SLACK_MESSAGEFORMAT: "{{ .Values.config.slack.messageformat | b64enc }}"

You can also, create a secret by yourself and use it here. Just respect the same syntax by specifying the env vars. You can find them all in the docs of each output.

As you can see, first are used the "default" env vars from the secret file created by the chart, then those from the secret file you specify, it means the env vars from your file will override the previous ones.

Is it clearer?

@Issif
Copy link
Member

Issif commented Sep 17, 2024

Can we close this issue? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants