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

Allow webhook server env to be set individually #2377

Merged
merged 5 commits into from
Mar 28, 2023
Merged

Allow webhook server env to be set individually #2377

merged 5 commits into from
Mar 28, 2023

Conversation

jonathanwiemers
Copy link
Contributor

Similar to #1565

Problem

We are using a CSI Provder to sync secrets between AWS and EKS. The way that secrets are bound into the controller deployment doesn't really fit our workflow, so I'd be happy to specify my own environment variables from secrets, kind of the same way as I can specify additional volumes and mounts.

This PR would allow something like this:

githubWebhookServer:
  env:
    - name: GITHUB_WEBHOOK_SECRET_TOKEN
      valueFrom:
        secretKeyRef:
          key: GITHUB_WEBHOOK_SECRET_TOKEN
          name: prod-gha-controller-webhook-token
          optional: true

The last reference in the env variables should be the one, that's taken by k8s to populate the env variable.

@jonathanwiemers jonathanwiemers marked this pull request as ready for review March 8, 2023 08:59
@jonathanwiemers
Copy link
Contributor Author

@mumoshu any objections?

@Link- Link- added needs triage Requires review from the maintainers community Community contribution labels Mar 21, 2023
Copy link
Collaborator

@mumoshu mumoshu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry it took some time for me to verify this doesn't break anything and the added feature works! It's all green now.
Thank you for your contribution @jonathanwiemers!

@mumoshu mumoshu merged commit 4536707 into actions:master Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contribution needs triage Requires review from the maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants