Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions ai-tooling/dev/skills/nvca-chart-release/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,10 @@ Propagates Helm chart changes through the native monorepo paths:
Umbrella CI is declared in `tools/ci/subproject-validations.yaml` with
subproject id `nvca-operator`. Do not add a chart-local `.gitlab-ci.yml`.

Validate the same chart path CI uses:
Run the repository-wide Helm validation used by CI:

```bash
tools/ci/validate-helm-chart deploy/helm/nvca-operator/nvca-operator \
-f tools/ci/helm-validate-values/nvca-operator.yaml
tools/ci/check-helm-charts
```

## Local Image Testing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

{{- if .Values.podDisruptionBudget.enabled }}
{{- if and .Values.podDisruptionBudget .Values.podDisruptionBudget.enabled }}
{{- $pdbMinAvail := .Values.podDisruptionBudget.minAvailable | toString }}
{{- $pdbMaxUnavail := .Values.podDisruptionBudget.maxUnavailable | toString }}
{{- if and (ne $pdbMinAvail "") (ne $pdbMaxUnavail "") }}
Expand Down
18 changes: 17 additions & 1 deletion deploy/helm/nvca-operator/tests/pod_disruption_budget_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,14 @@ assert_render_fails() {
}

for chart in "${source_chart}" "${vendored_chart}"; do
chart_name="$(basename "${chart}")"
if [[ "${chart}" == "${source_chart}" ]]; then
chart_name="source"
else
chart_name="vendored"
fi
default_manifest="${tmp_dir}/${chart_name}-default.yaml"
reused_values_chart="${tmp_dir}/${chart_name}-reused-values"
reused_values_manifest="${tmp_dir}/${chart_name}-reused-values.yaml"
min_available_manifest="${tmp_dir}/${chart_name}-min-available.yaml"
max_unavailable_manifest="${tmp_dir}/${chart_name}-max-unavailable.yaml"

Expand All @@ -43,6 +49,16 @@ for chart in "${source_chart}" "${vendored_chart}"; do
exit 1
fi

cp -R "${chart}" "${reused_values_chart}"
yq -i 'del(.podDisruptionBudget)' "${reused_values_chart}/values.yaml"
helm template nvca-operator "${reused_values_chart}" \
--set-string ngcConfig.serviceKey="${test_service_key}" \
> "${reused_values_manifest}"
if grep -Fq 'kind: PodDisruptionBudget' "${reused_values_manifest}"; then
echo "expected PDB to be disabled when reused values omit its configuration for ${chart}" >&2
exit 1
fi

helm template nvca-operator "${chart}" \
--set-string ngcConfig.serviceKey="${test_service_key}" \
--set podDisruptionBudget.enabled=true \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

{{- if .Values.podDisruptionBudget.enabled }}
{{- if and .Values.podDisruptionBudget .Values.podDisruptionBudget.enabled }}
{{- $pdbMinAvail := .Values.podDisruptionBudget.minAvailable | toString }}
{{- $pdbMaxUnavail := .Values.podDisruptionBudget.maxUnavailable | toString }}
{{- if and (ne $pdbMinAvail "") (ne $pdbMaxUnavail "") }}
Expand Down
Loading