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 configuring of basic authentication #98

Merged
merged 3 commits into from
Nov 24, 2021
Merged

Allow configuring of basic authentication #98

merged 3 commits into from
Nov 24, 2021

Conversation

valentindeaconu
Copy link
Contributor

@valentindeaconu valentindeaconu commented Nov 19, 2021

With the runatlantis/atlantis v0.17.5 release, users are allowed to configure a basic authentication. The helm chart does not allow the livenessProbe and readinessProbe to add custom headers, so this PR adds support for both the creation of credentials and probes.

In this PR you will find:

  • Updated values
  • Updated README
  • A secret resource holding credentials
  • Modified StatefulSet resource to inject the environments required by the basic authentication configuration (ATLANTIS_WEB_BASIC_AUTH, ATLANTIS_WEB_USERNAME, ATLANTIS_WEB_PASSWORD)
  • [Removed] Modified livenessProbe and readinessProbe to add a basic authorization header

Tested it manually, deploying atlantis in an EKS cluster.

Edit:
There's no need for livenessProbe and readinessProbe to add a basic authorization header since the bug was fixed in atlantis source code #1896, so the code was removed.

@JeffreyVdb
Copy link

Looks good to me. We are also in need of this configuration. environmentSecrets isn't something that can help us because that would mean we have to create a secret outside of the helm installation, which means that secret will not go away automatically when we helm chart is uninstalled.

@valentindeaconu
Copy link
Contributor Author

Looks good to me. We are also in need of this configuration. environmentSecrets isn't something that can help us because that would mean we have to create a secret outside of the helm installation, which means that secret will not go away automatically when we helm chart is uninstalled.

You can avoid that by using the extraManifests field already supported by this chart. That's the way I deployed in the first place this feature, before creating this PR.

@lkysow lkysow merged commit b794510 into runatlantis:main Nov 24, 2021
@JeffreyVdb
Copy link

Looks good to me. We are also in need of this configuration. environmentSecrets isn't something that can help us because that would mean we have to create a secret outside of the helm installation, which means that secret will not go away automatically when we helm chart is uninstalled.

You can avoid that by using the extraManifests field already supported by this chart. That's the way I deployed in the first place this feature, before creating this PR.

My colleague and I both missed that one 😅 Thanks for clearing that up, that's extremely useful to know for future reference. And thanks for the changes, that'll make our configuration a lot easier as well!

@valentindeaconu valentindeaconu deleted the configure_basic_auth branch December 14, 2021 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants