-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Helm chart - move sensitive data to secret, refactor hard coded names #11020
Helm chart - move sensitive data to secret, refactor hard coded names #11020
Conversation
Eventually the CLA worked. There is an open issue here that maybe related: cla-assistant/cla-assistant#829 |
Hi @georgekaz thank you for this needed contribution 😄 I'll go for a review asap. |
Hi @alafanechere .Yes, I can confirm I've deployed it and I'm using the new feature of passing the json creds as a value too. It's all working fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @georgekaz , I went for a first review. Thank you for this awesome work. I made a suggestion that could reduce a bit the clunkiness of the deployment.yaml files.
a134fd1
to
0610b91
Compare
@alafanechere I've made the changes we discussed on my last commit and rebased. It helm lints and templates ok and I'm going to test a deployment into my own cluster shortly. Let me know your thoughts on the changes though please. This chart now requires helm >= 3.7.0 due to the use of the .Subcharts function
|
I can confirm that I've now deployed this chart in a cluster and it's working fine. As an aside, I have some other thoughts about the helm chart that I thought I'd share. Although I understand the reason for trying to control the order of component deployment, I'm not keen on the helm hook annotations i.e.
When these are used, the components they deploy are considered outside the scope of normal helm management, see: https://helm.sh/docs/topics/charts_hooks/#hook-resources-are-not-managed-with-corresponding-releases We use argocd and this means that if these manifests change, they may not be correctly kept in sync. What are your thoughts on it? The deployment can work without these annotations. |
Thank you for the refactoring. I think it significantly increased the chart readability!
|
{{- else }} | ||
{{- if .Values.externalDatabase.existingSecret -}} | ||
{{- printf "%s" .Values.externalDatabase.existingSecret -}} | ||
{{- else -}} | ||
{{ printf "%s-%s" .Release.Name "externaldb" }} | ||
{{ printf "%s-%s" (include "common.names.fullname" .) "secrets" }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not too familiar with this template helper - how is this set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is being included as a chart dependency https://github.com/airbytehq/airbyte/blob/master/charts/airbyte/Chart.yaml#L27-L30
It's not something I initially added but as it was there I've standardised it's use across this chart when it comes to resource names. You can see its use in other charts' helpers such as bitnami postgres https://github.com/bitnami/charts/blob/master/bitnami/postgresql/templates/_helpers.tpl#L11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Makes sense. Thanks!
@georgekaz thanks for the contribution! IIRC the pre-hooks are needed since 1) the bootloader needs to run first 2) this is a one time run as a Pod and Helm does not recognise the 'completed' status on the pod. Since this isn't a deployment, I think it's fine if it's not governed by Helm. Does that make sense? |
I think that's fine, but because the bootloader has a dependency on postgres (if enabled), the service account, the configmap and the secret, those all now also have these hooks, so are also not governed by Helm. We can leave it for now, I wouldn't want to delay this PR because of it, but maybe we can find a better way of managing the dependency on the bootloader pod in future. |
@alafanechere I'll let you merge this in as appropriate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you again @georgekaz for this improvement + your patience and availability to make it to the finish line! Feel free to open other PR on this chart, especially on the hook topic if you have some suggestions.
Great, thanks for merging. I'm happy to help out and will add what I can to the project |
What
How
Via updates to the helm chart
Recommended reading order
N/A
🚨 User Impact 🚨
I don't think there are any breaking changes
Pre-merge Checklist
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/SUMMARY.md
docs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampledocs/integrations/README.md
airbyte-integrations/builds.md
Airbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing/publish
command described hereUpdating a connector
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampleAirbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing/publish
command described hereConnector Generator
-scaffold
in their name) have been updated with the latest scaffold by running./gradlew :airbyte-integrations:connector-templates:generator:testScaffoldTemplates
then checking in your changesTests
Unit
Integration
Helm template works but is too long to post here
Acceptance
Put your acceptance tests output here.