feat!: migrate Helm chart from helm/v1-alpha to helm/v2-alpha#96
feat!: migrate Helm chart from helm/v1-alpha to helm/v2-alpha#96ian-flores wants to merge 14 commits intomainfrom
Conversation
Migrate from the deprecated kubebuilder helm/v1-alpha plugin to helm/v2-alpha, which generates charts dynamically from kustomize output. BREAKING CHANGE: Helm values structure changed: - controllerManager.* → manager.* - controllerManager.container.image → manager.image - controllerManager.container.env (map) → manager.env (list) - certmanager.enable → certManager.enable Closes #85
Address review findings from helm/v2-alpha migration: - Add namespace-scoped Role with all operator permissions to manager-role.yaml (was dropped by v2-alpha plugin) - Fix volumeMounts placement in manager.yaml (was incorrectly nested inside securityContext else branch) - Restore cert-manager Issuer and Certificate templates for webhook and metrics TLS - Restore metrics Service template for Prometheus scraping - Improve post-generate script robustness for volumeMounts insertion
|
Claude encountered an error —— View job
|
Update Pulumi Helm values to match the new team-operator chart structure after the helm/v1-alpha to helm/v2-alpha migration (posit-dev/team-operator#96). - controllerManager.* → manager.* - controllerManager.container.image → manager.image - controllerManager.container.env (map) → manager.env (list) - Remove digest-based image tag support (no longer needed)
|
Claude encountered an error —— View job
|
Local Code ReviewVerdict: PASS with observations Correctness
RBAC Security
Important Observations1. RBAC Helper Roles Removed (undocumented) 2. Post-generate script heuristic helm template test dist/chart --set certManager.enable=true | \
grep -q "mountPath: /tmp/k8s-webhook-server/serving-certs"3. Migration guide gap Suggestions
|
…r CI test - Add "Upgrading from helm/v1-alpha" section to chart README with values mapping table and removed features documentation - Remove rbacHelpers config from values.yaml (no backing templates) - Add helm-test-certmanager Makefile target to verify cert-manager volumes render correctly - Add upstream kubebuilder issue tracking comments to post-generate script
…r CI test - Add "Upgrading from helm/v1-alpha" section to chart README with values mapping table and removed features documentation - Remove rbacHelpers config from values.yaml (no backing templates) - Add helm-test-certmanager Makefile target to verify cert-manager volumes render correctly - Add upstream kubebuilder issue tracking comments to post-generate script - Guard README migration guide insertion to prevent duplication
Merge main into helm-v2-alpha-migration branch. Resolved conflicts by keeping the v2-alpha manager.* values structure and discarding the old controllerManager.* structure from main. CRD files that were deleted by the v2-alpha migration (replaced by kubebuilder-generated equivalents) are kept deleted.
Changes: - Bump default memory limit from 128Mi to 256Mi in `dist/chart/values.yaml` to prevent OOMKills during heavy reconciliation - Update README.md to reflect the new memory limit default
Build succeeds. The test failures are pre-existing infrastructure issues (missing etcd binary for kubebuilder control plane tests) - unrelated to the README documentation changes. Changes: - Updated README parameter tables to use `manager.*` paths matching actual `values.yaml` structure (was stale `controllerManager.container.*`) - Updated security context and service account doc tables to use correct `manager.*` paths - Fixed inline installation example `--set` flags to use `manager.image.*` instead of `controllerManager.container.image.*` - Fixed all example values files (AWS, Azure, production, multi-namespace, node placement) to use `manager.*` structure with list-format env vars
The test failure is a pre-existing infrastructure issue (missing `etcd` binary for the test environment), not related to the README changes. Build passes cleanly. Changes: - Add "Manager Probes" documentation section noting that liveness/readiness probes are hardcoded with their current values - Add note to Azure Workload Identity example about the required `azure.workload.identity/use: "true"` pod label and that the chart doesn't currently support custom pod labels
All Connect-related tests pass. The `TestSiteReconcileWithExperimental` panic is a pre-existing infrastructure issue (missing kubebuilder etcd binary), not related to my changes. Changes: - Add test `TestSiteConnectTeardownIgnoredWhenEnabled` to verify the controller safely ignores `teardown=true` when `enabled` is true (or defaults to true), confirming the Connect CR remains active and unsuspended
Both subtests pass. Changes: - Convert `TestSiteConnectTeardownIgnoredWhenEnabled` to table-driven subtests covering both the default (nil) and explicit `Enabled: true` cases
All fixes verified. The Helm templates render correctly with: - Correct image: `posit/ptd-team-operator:v1.16.2` (appVersion fallback working) - ClusterRole now has proper labels Changes: - Fix image tag to default to `Chart.AppVersion` instead of `latest` (restores behavior from commit 0ee55c1) - Fix image repository from `posit/team-operator` to `posit/ptd-team-operator` to match CI publish target - Fix Makefile `get-helm-4` to `get-helm-3` (Helm 4 doesn't exist) - Add standard labels to ClusterRole in `manager-role.yaml` for consistency - Update `helm-post-generate.sh` to preserve these fixes across chart regeneration - Update README docs to reflect correct image repository and tag defaults
The v2-alpha chart uses manager.image.repository/tag instead of controllerManager.container.image.repository/tag.
The sed 's|||' command on line 430 used '|' as delimiter but the replacement string contained '|' (Go template pipe), causing "unknown option to 's'" on Linux sed. Switch to 'c\' (replace line) which avoids delimiter conflicts entirely.

Summary
helm/v1-alphaplugin tohelm/v2-alpha, which generates charts dynamically from kustomize outputhack/helm-post-generate.shto apply customizations that v2-alpha overwrites on regeneration (namespace-scoped Role/RoleBinding, ServiceAccount annotations, replicas templating, imagePullSecrets, cert-manager volumes)BREAKING CHANGE
Helm values structure changed — downstream consumers (PTD Pulumi) must update:
controllerManager.*→manager.*controllerManager.container.image→manager.imagecontrollerManager.container.env(map) →manager.env(list)certmanager.enable→certManager.enableWhat's preserved
helm.sh/resource-policy: keep)What's new from v2-alpha
nameOverride/fullnameOverridesupportNOTES.txtpost-install instructions_helpers.tplwith safe name truncation (resourceNamehelper)metrics.porthelm-deploy,helm-status,helm-history,helm-rollbackTest plan
make helm-lintpassesmake helm-templaterenders cleanlymake helm-generateis idempotent (zero diff on re-run)Closes #85