Skip to content

Commit 68ef6c4

Browse files
authored
Merge branch 'main' into pdmack/publish-release-tag-versioning
2 parents 3a1d6bf + 5f9f3e8 commit 68ef6c4

20 files changed

Lines changed: 207 additions & 13 deletions

File tree

pkg/bundler/deployer/helm/templates/README.md.tmpl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,15 @@ cd NNN-<component-name>
6666
bash install.sh
6767
```
6868

69+
> **Helm 4 vs Helm 3:** On Helm 4 (server-side apply by default), each
70+
> `install.sh` automatically passes `--force-conflicts` so the upgrade can
71+
> overwrite fields that operators (cert-manager, gpu-operator, nvsentinel,
72+
> grove, ...) own on their rotated webhook cert Secrets — without it the
73+
> upgrade fails on field-manager conflicts. On Helm 3 (client-side apply,
74+
> no field-manager conflicts) the flag is omitted; the script detects the
75+
> Helm major version at run time, so the same bundle works with either
76+
> binary.
77+
6978
## Customization
7079

7180
Each component folder has its own `values.yaml` (static) and `cluster-values.yaml`

pkg/bundler/deployer/helm/testdata/kai_scheduler_present/001-kai-scheduler/install.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,21 @@ cd "${SCRIPT_DIR}"
1919
# shellcheck source=/dev/null
2020
source ./upstream.env
2121

22+
# Helm 4 uses server-side apply by default; --force-conflicts lets the
23+
# upgrade overwrite fields that operators (cert-manager, gpu-operator,
24+
# nvsentinel, ...) own on rotated webhook cert Secrets. Helm 3 uses
25+
# client-side apply (no field-manager conflicts) and does not recognize
26+
# the flag, so omit it on Helm 3.
27+
HELM_MAJOR=$(helm version --template '{{.Version}}' 2>/dev/null | sed -nE 's/^v([0-9]+)\..*/\1/p')
28+
FORCE_CONFLICTS_FLAG=""
29+
if [[ "${HELM_MAJOR:-0}" -ge 4 ]]; then
30+
FORCE_CONFLICTS_FLAG="--force-conflicts"
31+
fi
32+
2233
# CHART carries the full OCI URI for OCI charts and just the chart name for
2334
# HTTP/HTTPS charts. REPO is non-empty only for HTTP/HTTPS charts; the
2435
# ${REPO:+--repo "${REPO}"} expansion adds --repo iff REPO is set.
25-
helm upgrade --install kai-scheduler "${CHART}" \
36+
helm upgrade --install ${FORCE_CONFLICTS_FLAG} kai-scheduler "${CHART}" \
2637
${REPO:+--repo "${REPO}"} --version "${VERSION}" \
2738
--namespace kai-scheduler --create-namespace \
2839
-f values.yaml -f cluster-values.yaml \

pkg/bundler/deployer/helm/testdata/kai_scheduler_present/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ cd NNN-<component-name>
5050
bash install.sh
5151
```
5252

53+
> **Helm 4 vs Helm 3:** On Helm 4 (server-side apply by default), each
54+
> `install.sh` automatically passes `--force-conflicts` so the upgrade can
55+
> overwrite fields that operators (cert-manager, gpu-operator, nvsentinel,
56+
> grove, ...) own on their rotated webhook cert Secrets — without it the
57+
> upgrade fails on field-manager conflicts. On Helm 3 (client-side apply,
58+
> no field-manager conflicts) the flag is omitted; the script detects the
59+
> Helm major version at run time, so the same bundle works with either
60+
> binary.
61+
5362
## Customization
5463

5564
Each component folder has its own `values.yaml` (static) and `cluster-values.yaml`

pkg/bundler/deployer/helm/testdata/manifest_only/001-skyhook-customizations/install.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,16 @@ set -euo pipefail
1717
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
1818
cd "${SCRIPT_DIR}"
1919

20-
helm upgrade --install skyhook-customizations ./ \
20+
# Helm 4 uses server-side apply by default; --force-conflicts lets the
21+
# upgrade overwrite fields that operators own on rotated webhook cert
22+
# Secrets. Helm 3 uses client-side apply and does not recognize the flag.
23+
HELM_MAJOR=$(helm version --template '{{.Version}}' 2>/dev/null | sed -nE 's/^v([0-9]+)\..*/\1/p')
24+
FORCE_CONFLICTS_FLAG=""
25+
if [[ "${HELM_MAJOR:-0}" -ge 4 ]]; then
26+
FORCE_CONFLICTS_FLAG="--force-conflicts"
27+
fi
28+
29+
helm upgrade --install ${FORCE_CONFLICTS_FLAG} skyhook-customizations ./ \
2130
--namespace skyhook --create-namespace \
2231
-f values.yaml -f cluster-values.yaml \
2332
${COMPONENT_WAIT_ARGS:-} ${DRY_RUN_FLAG:-} ${KUBECONFIG_FLAG:-} ${HELM_DEBUG_FLAG:-}

pkg/bundler/deployer/helm/testdata/manifest_only/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ cd NNN-<component-name>
5050
bash install.sh
5151
```
5252

53+
> **Helm 4 vs Helm 3:** On Helm 4 (server-side apply by default), each
54+
> `install.sh` automatically passes `--force-conflicts` so the upgrade can
55+
> overwrite fields that operators (cert-manager, gpu-operator, nvsentinel,
56+
> grove, ...) own on their rotated webhook cert Secrets — without it the
57+
> upgrade fails on field-manager conflicts. On Helm 3 (client-side apply,
58+
> no field-manager conflicts) the flag is omitted; the script detects the
59+
> Helm major version at run time, so the same bundle works with either
60+
> binary.
61+
5362
## Customization
5463

5564
Each component folder has its own `values.yaml` (static) and `cluster-values.yaml`

pkg/bundler/deployer/helm/testdata/mixed_gpu_operator/001-gpu-operator-pre/install.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,16 @@ set -euo pipefail
1717
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
1818
cd "${SCRIPT_DIR}"
1919

20-
helm upgrade --install gpu-operator-pre ./ \
20+
# Helm 4 uses server-side apply by default; --force-conflicts lets the
21+
# upgrade overwrite fields that operators own on rotated webhook cert
22+
# Secrets. Helm 3 uses client-side apply and does not recognize the flag.
23+
HELM_MAJOR=$(helm version --template '{{.Version}}' 2>/dev/null | sed -nE 's/^v([0-9]+)\..*/\1/p')
24+
FORCE_CONFLICTS_FLAG=""
25+
if [[ "${HELM_MAJOR:-0}" -ge 4 ]]; then
26+
FORCE_CONFLICTS_FLAG="--force-conflicts"
27+
fi
28+
29+
helm upgrade --install ${FORCE_CONFLICTS_FLAG} gpu-operator-pre ./ \
2130
--namespace privileged-gpu-operator \
2231
-f values.yaml -f cluster-values.yaml \
2332
${COMPONENT_WAIT_ARGS:-} ${DRY_RUN_FLAG:-} ${KUBECONFIG_FLAG:-} ${HELM_DEBUG_FLAG:-}

pkg/bundler/deployer/helm/testdata/mixed_gpu_operator/002-gpu-operator/install.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,21 @@ cd "${SCRIPT_DIR}"
1919
# shellcheck source=/dev/null
2020
source ./upstream.env
2121

22+
# Helm 4 uses server-side apply by default; --force-conflicts lets the
23+
# upgrade overwrite fields that operators (cert-manager, gpu-operator,
24+
# nvsentinel, ...) own on rotated webhook cert Secrets. Helm 3 uses
25+
# client-side apply (no field-manager conflicts) and does not recognize
26+
# the flag, so omit it on Helm 3.
27+
HELM_MAJOR=$(helm version --template '{{.Version}}' 2>/dev/null | sed -nE 's/^v([0-9]+)\..*/\1/p')
28+
FORCE_CONFLICTS_FLAG=""
29+
if [[ "${HELM_MAJOR:-0}" -ge 4 ]]; then
30+
FORCE_CONFLICTS_FLAG="--force-conflicts"
31+
fi
32+
2233
# CHART carries the full OCI URI for OCI charts and just the chart name for
2334
# HTTP/HTTPS charts. REPO is non-empty only for HTTP/HTTPS charts; the
2435
# ${REPO:+--repo "${REPO}"} expansion adds --repo iff REPO is set.
25-
helm upgrade --install gpu-operator "${CHART}" \
36+
helm upgrade --install ${FORCE_CONFLICTS_FLAG} gpu-operator "${CHART}" \
2637
${REPO:+--repo "${REPO}"} --version "${VERSION}" \
2738
--namespace privileged-gpu-operator --create-namespace \
2839
-f values.yaml -f cluster-values.yaml \

pkg/bundler/deployer/helm/testdata/mixed_gpu_operator/003-gpu-operator-post/install.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,16 @@ set -euo pipefail
1717
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
1818
cd "${SCRIPT_DIR}"
1919

20-
helm upgrade --install gpu-operator-post ./ \
20+
# Helm 4 uses server-side apply by default; --force-conflicts lets the
21+
# upgrade overwrite fields that operators own on rotated webhook cert
22+
# Secrets. Helm 3 uses client-side apply and does not recognize the flag.
23+
HELM_MAJOR=$(helm version --template '{{.Version}}' 2>/dev/null | sed -nE 's/^v([0-9]+)\..*/\1/p')
24+
FORCE_CONFLICTS_FLAG=""
25+
if [[ "${HELM_MAJOR:-0}" -ge 4 ]]; then
26+
FORCE_CONFLICTS_FLAG="--force-conflicts"
27+
fi
28+
29+
helm upgrade --install ${FORCE_CONFLICTS_FLAG} gpu-operator-post ./ \
2130
--namespace privileged-gpu-operator --create-namespace \
2231
-f values.yaml -f cluster-values.yaml \
2332
${COMPONENT_WAIT_ARGS:-} ${DRY_RUN_FLAG:-} ${KUBECONFIG_FLAG:-} ${HELM_DEBUG_FLAG:-}

pkg/bundler/deployer/helm/testdata/mixed_gpu_operator/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ cd NNN-<component-name>
5050
bash install.sh
5151
```
5252

53+
> **Helm 4 vs Helm 3:** On Helm 4 (server-side apply by default), each
54+
> `install.sh` automatically passes `--force-conflicts` so the upgrade can
55+
> overwrite fields that operators (cert-manager, gpu-operator, nvsentinel,
56+
> grove, ...) own on their rotated webhook cert Secrets — without it the
57+
> upgrade fails on field-manager conflicts. On Helm 3 (client-side apply,
58+
> no field-manager conflicts) the flag is omitted; the script detects the
59+
> Helm major version at run time, so the same bundle works with either
60+
> binary.
61+
5362
## Customization
5463

5564
Each component folder has its own `values.yaml` (static) and `cluster-values.yaml`

pkg/bundler/deployer/helm/testdata/mixed_with_pre/001-foo-pre/install.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,16 @@ set -euo pipefail
1717
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
1818
cd "${SCRIPT_DIR}"
1919

20-
helm upgrade --install foo-pre ./ \
20+
# Helm 4 uses server-side apply by default; --force-conflicts lets the
21+
# upgrade overwrite fields that operators own on rotated webhook cert
22+
# Secrets. Helm 3 uses client-side apply and does not recognize the flag.
23+
HELM_MAJOR=$(helm version --template '{{.Version}}' 2>/dev/null | sed -nE 's/^v([0-9]+)\..*/\1/p')
24+
FORCE_CONFLICTS_FLAG=""
25+
if [[ "${HELM_MAJOR:-0}" -ge 4 ]]; then
26+
FORCE_CONFLICTS_FLAG="--force-conflicts"
27+
fi
28+
29+
helm upgrade --install ${FORCE_CONFLICTS_FLAG} foo-pre ./ \
2130
--namespace privileged-foo \
2231
-f values.yaml -f cluster-values.yaml \
2332
${COMPONENT_WAIT_ARGS:-} ${DRY_RUN_FLAG:-} ${KUBECONFIG_FLAG:-} ${HELM_DEBUG_FLAG:-}

0 commit comments

Comments
 (0)