-
Notifications
You must be signed in to change notification settings - Fork 27
✨ Implement Helm chart + add Makefile for command shortcuts + update README #12
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
base: master
Are you sure you want to change the base?
Conversation
|
Oh, one thing which I just realised is that it would probably be useful to link the versions of the Helm chart to the versions of the binary so that people can easily understand and manage the upgrade process. In that case, the Helm chart archives could also be stored on Github Releases and linked from there, though I haven't quite figured out where to store and update the repo index YAML in that case. |
|
Hey @wichert, do you think you'll have time to review and comment on this? It's fine if you don't, I can also spin this out into a separate repo, just let me know. |
|
You will need a name for the helm install command, like: |
|
Btw. if you want to try the helm chart right now, you have to add the replo like this: |
|
Ah, thanks @frankyhun, I'm using the chart via Helmfile so was just typing the Helm commands into the readme directly 😳 Will update in a minute. |
|
I'm not sure, but looks a bit ambiguous, that somewhere SENTRY_DSN environment value is written, in somewhere sentry.dsn, in the yaml it is in sentry: dsn: format. Which one is the used one? I tried it with aws cdk, set the SENTRY_DSN variable, but then it failed to start up. |
|
That is because while internally the Kubernetes template and application code is using You can see in the source code how it's used: https://github.com/wichert/k8s-sentry/pull/12/files#diff-783271f5d9de279f32ef356eb2db9be73fc29e7ba25d6137c62a6185508b4b34R20 This is an unfortunate limitation of Helm, it doesn't play well with environment variables, this is one of the reasons why we use Helmfile. You can take the value from an env var though, so you can: helm install sentry k8s-sentry/helm-k8s-sentry --set sentry.dsn=$SENTRY_DSNThis is still nicer than having to manually edit the Kubernetes templates though! |
|
Maybe we can use github page as chartmuseum? https://github.com/marketplace/actions/helm-chart-releaser Example use: https://github.com/grafana/helm-charts/blob/main/.github/workflows/release.yaml |
|
just chiming in to say I'm looking forward to this, thanks for the work everyone 👍 |
|
Any plan to push this further? |
|
I'm really sorry, but I don't think I'll have time in the near future so if anyone has some time to take over, please do! |
Fixes #11
NOTE: will need Github Pages enabled on
/docsinmaster!I'm ready with the first draft, I just deployed it in our test cluster for all namespaces and seems to be working nicely.
I've temporarily changed the URL to point to my fork to make it possible for Helm to download, but will change this once we're ready to merge.
So to try it right now, you can use these commands:
The default is all namespaces and no environment so it will do that if you only pass the DSN, otherwise can customise by changing values with
--set. I haven't tried all combinations of options yet.As for the Helm repo hosting, I went with the absolute simplest solution which is to package the chart locally and commit the repo index YAML and chart archives in git. The chart archive is currently ~1KB so even though it's binary, the size is tiny so I don't see any issue storing it in git. So this is the most transparent and least setup way to do it, but the trade-off is having to remember to package the chart with
make helm_packagewhenever it's updated. This could also be done in a Github Action, but that would need to commit on agh-pagesbranch which needs a bit more setup.Also, I've duplicated the templates from the
deploydirectory, but it would be nicer to somehow reuse them. There is already amake helm_templatecommand which renders the templates to stdout, so that could easily be developed into a way to programmatically write all different versions of the k8s templates indeployby changing the options passed and the output directories.Let me know what you think!