-
Notifications
You must be signed in to change notification settings - Fork 486
Re-enable Helm reconciler concurrency #7378
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
Open
jnummelin
wants to merge
1
commit into
k0sproject:main
Choose a base branch
from
jnummelin:re-enable-helm-concurrency
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # SPDX-FileCopyrightText: 2026 k0s authors | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| apiVersion: v2 | ||
| name: order-test-chart | ||
| description: A test Helm chart with a pre-install hook that waits for a Service created by another chart | ||
| type: application | ||
| version: 0.1.0 | ||
| appVersion: "1.0" |
10 changes: 10 additions & 0 deletions
10
inttest/addons/testdata/order-test-chart-a/templates/configmap.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # SPDX-FileCopyrightText: 2026 k0s authors | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: "{{ .Release.Name }}-installed" | ||
| namespace: {{ .Release.Namespace }} | ||
| data: | ||
| status: installed |
35 changes: 35 additions & 0 deletions
35
inttest/addons/testdata/order-test-chart-a/templates/job-preinstall.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # SPDX-FileCopyrightText: 2026 k0s authors | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| apiVersion: batch/v1 | ||
| kind: Job | ||
| metadata: | ||
| name: "{{ .Release.Name }}-preinstall" | ||
| annotations: | ||
| helm.sh/hook: pre-install | ||
| helm.sh/hook-weight: "0" | ||
| helm.sh/hook-delete-policy: {{ .Values.hook.deletePolicy | quote }} | ||
| spec: | ||
| backoffLimit: 100 | ||
| template: | ||
| spec: | ||
| serviceAccountName: order-test-hook-sa | ||
| restartPolicy: OnFailure | ||
| containers: | ||
| - name: wait-for-dependency | ||
| image: docker.io/library/busybox:1-musl | ||
| command: | ||
| - sh | ||
| - -c | ||
| - | | ||
| echo "Waiting for order-test-dependency service to appear in the Kubernetes API..." | ||
| APISERVER="https://${KUBERNETES_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT}" | ||
| TOKEN="$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" | ||
| until wget -q -O - --no-check-certificate \ | ||
| --header "Authorization: Bearer ${TOKEN}" \ | ||
| "${APISERVER}/api/v1/namespaces/{{ .Release.Namespace }}/services/order-test-dependency" \ | ||
| 2>/dev/null | grep -q '"clusterIP"'; do | ||
| echo "Service not yet available via API, retrying in 5s..." | ||
| sleep 5 | ||
| done | ||
| echo "Service is available, proceeding with installation." |
16 changes: 16 additions & 0 deletions
16
inttest/addons/testdata/order-test-chart-a/templates/role.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # SPDX-FileCopyrightText: 2026 k0s authors | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: Role | ||
| metadata: | ||
| name: order-test-hook-role | ||
| namespace: {{ .Release.Namespace }} | ||
| annotations: | ||
| helm.sh/hook: pre-install | ||
| helm.sh/hook-weight: "-10" | ||
| helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded | ||
| rules: | ||
| - apiGroups: [""] | ||
| resources: ["services"] | ||
| verbs: ["get"] |
20 changes: 20 additions & 0 deletions
20
inttest/addons/testdata/order-test-chart-a/templates/rolebinding.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # SPDX-FileCopyrightText: 2026 k0s authors | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: RoleBinding | ||
| metadata: | ||
| name: order-test-hook-rb | ||
| namespace: {{ .Release.Namespace }} | ||
| annotations: | ||
| helm.sh/hook: pre-install | ||
| helm.sh/hook-weight: "-10" | ||
| helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded | ||
| roleRef: | ||
| apiGroup: rbac.authorization.k8s.io | ||
| kind: Role | ||
| name: order-test-hook-role | ||
| subjects: | ||
| - kind: ServiceAccount | ||
| name: order-test-hook-sa | ||
| namespace: {{ .Release.Namespace }} |
12 changes: 12 additions & 0 deletions
12
inttest/addons/testdata/order-test-chart-a/templates/sa.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # SPDX-FileCopyrightText: 2026 k0s authors | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| apiVersion: v1 | ||
| kind: ServiceAccount | ||
| metadata: | ||
| name: order-test-hook-sa | ||
| namespace: {{ .Release.Namespace }} | ||
| annotations: | ||
| helm.sh/hook: pre-install | ||
| helm.sh/hook-weight: "-10" | ||
| helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # SPDX-FileCopyrightText: 2026 k0s authors | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| hook: | ||
| deletePolicy: before-hook-creation,hook-succeeded |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # SPDX-FileCopyrightText: 2026 k0s authors | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| apiVersion: v2 | ||
| name: order-test-dependency | ||
| description: A test Helm chart that provides a Service that another chart depends on | ||
| type: application | ||
| version: 0.1.0 | ||
| appVersion: "1.0" |
14 changes: 14 additions & 0 deletions
14
inttest/addons/testdata/order-test-chart-b/templates/service.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # SPDX-FileCopyrightText: 2026 k0s authors | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: order-test-dependency | ||
| namespace: {{ .Release.Namespace }} | ||
| spec: | ||
| type: ClusterIP | ||
| selector: {} | ||
| ports: | ||
| - port: 80 | ||
| protocol: TCP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 might be missing something, but I'm not sure using non-existent service can break helm in any circumstances. The more correct check would be installing CRD and corresponding resource in different charts.
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 setup is 100% artificial just for testing this cross-chart dependency scenario, for sure. The CRD way is probably closer to real-life scenarios but IMO it does not really matter how this gets tested, as long as we can prove that parallelism works and charts with cross deps gets properly installed.
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.
Yeah, sorry, I got the idea wrong. I was thinking of a scenario where installation of one of the charts might fail.