-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Refactor OSS Helm Charts #14794
Refactor OSS Helm Charts #14794
Conversation
- name: "Helm package main chart" | ||
shell: bash | ||
run: | | ||
sleep 120 |
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.
what is this sleep for?
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.
Since in main chart I'm referencing charts from our new repo, we need to wait for changes to be indexed, that's why I added bash sleep there
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.
can we add an echo telling the user that so they know they should expect to wait 2 minutes?
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.
Yep, already added it
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.
kyrylo, can we also add a comment here to make clear what this sleep is for
sleep 120 | ||
declare -a StringArray=("airbyte") | ||
for val in ${StringArray[@]}; do | ||
cd ./airbyte/charts/${val} && cat Chart.yaml && helm dep update && cd $GITHUB_WORKSPACE |
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.
to make sure i understand, helm dep update
means we always update our chart dependencies before publishing?
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.
We need to update and download dependencies of chart before publishing it(it packages everything into single tarball archive)
mkver.conf
Outdated
@@ -0,0 +1,80 @@ | |||
tagPrefix: v |
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 very familiar with mkver. can you write a short summary explaining this?
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.
Basically mkver just doing semantic versioning for us, its using conventional commits for it. This config specifies settings for semantic gersioning like tag format, version format, files to automatically patch.
In short words, same thing as bumpversion. Actually we might use bumpversion instead of mkver, but need to tune it, so helm charts will have it's own versioning
@@ -154,61 +142,50 @@ Add environment variables to configure database values | |||
{{- printf "jdbc:postgresql://%s:%s/%s" $host $port $dbName -}} | |||
{{- end -}} | |||
|
|||
{{/* |
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.
what happened to these templates?
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.
Strange that PullSecrets got deleted, let me check on that.
About temporal, since I moved it into it's own chart, this template won't work as expected, I did it in much faster manner, simply by explicit editing of the configmap.yaml file. (New services will have following format: {{ .Release.Name }}-{{ .Chart.Name }}
e.g aribyte-worker
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.
Reverted changes done to PullSecrets
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.
Looks great @xpuska513 !
I have some questions for my understanding since I haven't used some of these bits and it's been a while since I've set up helm publishing.
Questions:
- It looks like because we added the charts to the bumpversion.cfg, upgrading airbyte will also upgrade the helm charts (assuming there aren't any changes to the helm charts) and there isn't more work to do. Is that right?
- Can I confirm that hosting the helm charts in the Airbyte OSS repo means a user can do
helm add repo
and no longer needs to git checkout the airbyte repo to use our helm charts? - How are we authenticating to publish Helm charts? Am I missing something?
- When publishing new helm charts, do the commits needs to follow the conventional commits due to the mkver configuration?
Since this is a big PR, I'm okay merging this as in and refining different parts further.
|
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.
Looks great, nothing but nits
thanks @xpuska513
run: | | ||
declare -a StringArray=("airbyte-bootloader" "airbyte-server" "airbyte-temporal" "airbyte-webapp" "airbyte-pod-sweeper" "airbyte-worker") | ||
for val in ${StringArray[@]}; do | ||
cd ./airbyte/charts/${val} && helm dep update && cd $GITHUB_WORKSPACE |
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.
why are these commands linked with &&
?
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.
Just an old habit, like to do oneliner if we won't need to do anything in directory anymore
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.
works for me, thanks for explaining
- name: "Helm package main chart" | ||
shell: bash | ||
run: | | ||
sleep 120 |
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.
can we add an echo telling the user that so they know they should expect to wait 2 minutes?
## @param bootloader.resources.limits [object] The resources limits for the airbyte bootloader image | ||
## @param bootloader.resources.requests [object] The requested resources for the airbyte bootloader image | ||
resources: | ||
## Example: |
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.
nice to have the examples 👍
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.
Also updated the docs using helm-docs
…re sensable. Update workflow
@davinchia, so I updated the workflow, now it doesn't need mkversion at all and potentially it shouldn't screw up sem ver of your main applications. |
{{- end }} | ||
containers: | ||
- name: airbyte-server-container | ||
image: {{ printf "%s:%s" .Values.image.repository (default .Chart.AppVersion .Values.image.tag) }} |
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.
Now we also can forget about manually setting the image tag, it'll now use .Chart.AppVersion (that automatically should bump itself) as default value for image tag
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.
nice
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.
looks solid
run: | | ||
declare -a StringArray=("airbyte-bootloader" "airbyte-server" "airbyte-temporal" "airbyte-webapp" "airbyte-pod-sweeper" "airbyte-worker") | ||
for val in ${StringArray[@]}; do | ||
cd ./airbyte/charts/${val} && helm dep update && cd $GITHUB_WORKSPACE |
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.
works for me, thanks for explaining
{{- end }} | ||
containers: | ||
- name: airbyte-server-container | ||
image: {{ printf "%s:%s" .Values.image.repository (default .Chart.AppVersion .Values.image.tag) }} |
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.
nice
Bumped the version, as for me looks good. |
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.
looks good to me, nice work!
* Add refactored helm charts * Add mkver.conf * Remove unused workflow debug info * Add newline * Add switch for rendering main chart templates * Update .bumpversion.cfg * Replace repository in main chart * Update helm-docs. Remove commented values. Replace placeholders to more sensable. Update workflow * Update workflow * Update workflow * Update workflow * Update workflow * Update workflow * Update test workflow * Update test workflow * Disable on push for main workflow. Add test action for test workflow * Delete test workflow. Update main workflow * Remove mkver.conf since its not used no more * Reference appVersion instead of manually set image tag * Revert image pull secrets * Bump appVersion to the latest * Update values.yaml
- condition: temporal.enabled | ||
name: temporal | ||
repository: "https://airbytehq.github.io/helm-charts/" | ||
version: placeholder |
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.
Are these placeholders
supposed to be here @xpuska513 ? I just submitted an issue here: #15656
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.
They're supposed, let me update the docs and explained a little bit more in the #15656
What
Describe what the change is solving
It helps to add screenshots if it affects the frontend.
How
Describe the solution
Refactoring done using Helm docs and help of community members
CI workflow made using git mkver
Recommended reading order
x.java
y.python
🚨 User Impact 🚨
Are there any breaking changes? What is the end result perceived by the user? If yes, please merge this PR with the 🚨🚨 emoji so changelog authors can further highlight this if needed.
Probable user impact:
Pre-merge Checklist
Expand the relevant checklist and delete the others.
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 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
Put your unit tests output here.
Integration
Put your integration tests output here.
Acceptance
Put your acceptance tests output here.