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

feat(helm-chart): support adding providers/plugins #310

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

GMartinez-Sisti
Copy link
Member

@GMartinez-Sisti GMartinez-Sisti commented Jul 8, 2023

what

  • Closes Helm chart: support adding providers/plugins #227
  • Add init container to install providers/plugins in a directory shared with atlantis,
  • The implementation is simple, enabling chart users to personalize/customize it, to prevent breaking changes I haven't reused the existing initContainers key
  • Add new ci config file ci-init-config-values.yaml to ensure the feature works

tests

Prepare environment (click to expand)
→ kind create cluster --name test-atlantis
Creating cluster "test-atlantis" ...
 ✓ Ensuring node image (kindest/node:v1.27.3) 🖼
 ✓ Preparing nodes 📦
 ✓ Writing configuration 📜
 ✓ Starting control-plane 🕹️
 ✓ Installing CNI 🔌
 ✓ Installing StorageClass 💾
Set kubectl context to "kind-test-atlantis"
You can now use your cluster with:

kubectl cluster-info --context kind-test-atlantis

Have a nice day! 👋

→ cd charts/atlantis

→ helm upgrade -i atlantis-test . -f ci/ci-values-init-config.yaml
Release "atlantis-test" does not exist. Installing it now.
NAME: atlantis-test
LAST DEPLOYED: Sat Jul  8 18:47:12 2023
NAMESPACE: default
STATUS: deployed
REVISION: 1
NOTES:
1. Get the application URL by running these commands:
2. Atlantis will not start successfully unless at least one of the following sets of credentials are specified (see values.yaml for detailed usage):
  - github
  - githubApp
  - gitlab
  - bitbucket
Init-config container logs (click to expand)
→ kubectl logs atlantis-test-0 -c init-config
+ TG_VERSION=v0.47.0
+ TG_SHA256_SUM=98d45f6bfbfae84b51364c1ad6920f09ecb4d834908b0535e4e331a9fc6fc75b
+ TG_FILE=/plugins/terragrunt
+ wget https://github.com/gruntwork-io/terragrunt/releases/download/v0.47.0/terragrunt_linux_amd64 -O /plugins/terragrunt
Connecting to github.com (140.82.121.4:443)
Connecting to objects.githubusercontent.com (185.199.109.133:443)
saving to '/plugins/terragrunt'
terragrunt            30% |*********                       | 13.2M  0:00:02 ETA
terragrunt           100% |********************************| 43.7M  0:00:00 ETA
'/plugins/terragrunt' saved
+ echo '98d45f6bfbfae84b51364c1ad6920f09ecb4d834908b0535e4e331a9fc6fc75b  /plugins/terragrunt'
+ sha256sum -c
/plugins/terragrunt: OK
+ chmod 755 /plugins/terragrunt
+ terragrunt -v
terragrunt version v0.47.0
+ TAC_VERSION=1.16.0
+ TAC_SHA256_SUM=fc3b069cf4ae51e9b7a7d01f09862d1974b260fffb3ec857d661d7b1756fe26f
+ TAC_FILE=/plugins/terragrunt-atlantis-config
+ wget https://github.com/transcend-io/terragrunt-atlantis-config/releases/download/v1.16.0/terragrunt-atlantis-config_1.16.0_linux_amd64.tar.gz
Connecting to github.com (140.82.121.4:443)
Connecting to objects.githubusercontent.com (185.199.108.133:443)
saving to 'terragrunt-atlantis-config_1.16.0_linux_amd64.tar.gz'
terragrunt-atlantis- 100% |********************************| 16.6M  0:00:00 ETA
'terragrunt-atlantis-config_1.16.0_linux_amd64.tar.gz' saved
+ sha256sum -c
+ echo 'fc3b069cf4ae51e9b7a7d01f09862d1974b260fffb3ec857d661d7b1756fe26f  terragrunt-atlantis-config_1.16.0_linux_amd64.tar.gz'
terragrunt-atlantis-config_1.16.0_linux_amd64.tar.gz: OK
+ tar xf terragrunt-atlantis-config_1.16.0_linux_amd64.tar.gz
+ cp -fv terragrunt-atlantis-config_1.16.0_linux_amd64/terragrunt-atlantis-config_1.16.0_linux_amd64 /plugins/terragrunt-atlantis-config
'terragrunt-atlantis-config_1.16.0_linux_amd64/terragrunt-atlantis-config_1.16.0_linux_amd64' -> '/plugins/terragrunt-atlantis-config'
+ chmod 755 /plugins/terragrunt
+ terragrunt-atlantis-config version
terragrunt-atlantis-config '1.16.0'
→ kubectl exec atlantis-test-0 -it -c atlantis -- terragrunt -v
terragrunt version v0.47.0
→ kubectl exec atlantis-test-0 -it -c atlantis -- terragrunt-atlantis-config version
terragrunt-atlantis-config '1.16.0'

@GMartinez-Sisti GMartinez-Sisti requested a review from a team as a code owner July 8, 2023 18:30
@GMartinez-Sisti GMartinez-Sisti marked this pull request as draft July 8, 2023 18:32
@GMartinez-Sisti GMartinez-Sisti marked this pull request as ready for review July 8, 2023 18:39
GenPage
GenPage previously approved these changes Sep 11, 2023
Copy link
Member

@GenPage GenPage left a comment

Choose a reason for hiding this comment

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

Just need to dance chart version bumps with other pending approved PRs

@GMartinez-Sisti
Copy link
Member Author

Merged main into branch to fix conflict.

@jamengual
Copy link
Contributor

@GMartinez-Sisti could you fix the conflict please?

@jamengual jamengual added the waiting-on-response Waiting for a response from the user label Nov 16, 2023
@GMartinez-Sisti
Copy link
Member Author

@GMartinez-Sisti could you fix the conflict please?

Done. My linter updated the README.md file please let me know if this is ok.

Also, I had to manually update the README.md file 😕 can we implement something like helm-docs to make it easier and standard?

@GMartinez-Sisti
Copy link
Member Author

I'll fix the issues later. They are related to the schema check implementation. Related discussion on slack: https://atlantis-community.slack.com/archives/C04ES70Q6E8/p1700141493558409. TL;DR: we need guidelines on what to do when this happens.

@GMartinez-Sisti
Copy link
Member Author

ℹ️ Push force to update the commit email.

@jamengual jamengual merged commit de42379 into runatlantis:main Nov 16, 2023
2 checks passed
@GMartinez-Sisti GMartinez-Sisti deleted the 227-plugins-init branch November 16, 2023 23:50
@alaa-ledger
Copy link

alaa-ledger commented Nov 28, 2023

Hey

are there any prerequisites to use initConfig that was introduced in this PR ? I keep getting atlantis: - (root): Additional property initConfig is not allowed when trying to use it.

here's an open issue describing the same thing I'm going through #340

EDIT: I had an outdated chart version, updating it fixed the error and I could run custom scripts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-on-response Waiting for a response from the user
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Helm chart: support adding providers/plugins
4 participants