Skip to content

helm: namespace k8s resources - #4417

Closed
raul-gherman-modaoperandi wants to merge 66 commits into
different-ai:devfrom
ModaOperandi:dev
Closed

raul-gherman-modaoperandi wants to merge 66 commits into
different-ai:devfrom
ModaOperandi:dev

Conversation

@raul-gherman-modaoperandi

@raul-gherman-modaoperandi raul-gherman-modaoperandi commented Sep 4, 2026 •

Copy link
Copy Markdown

Summary

  • Adds a top-level namespace value (default openwork) to the openwork-ee Helm chart and sets metadata.namespace from it on all 11 namespaced resources: ConfigMap, Secret, Ingress, migration Job, env-probe test Job, and the den-api / den-web / inference Services and Deployments.
  • Introduces an openwork-ee.namespace helper in templates/_helpers.tpl that falls back to .Release.Namespace when the value is cleared.
  • Documents the value in README.md (new "Namespace" section), surfaces the rendered namespace in templates/NOTES.txt, and adds a tests/namespace.sh chart check.

Why

  • Rendered manifests carried no metadata.namespace, so helm template ... | kubectl apply -f - pipelines fell back to the kubectl context namespace — the migration Job landed in kube-system.
  • Explicit namespacing pins every resource to the intended namespace regardless of how the chart is rendered/applied.

Issue

  • Closes #

Scope

  • packaging/helm/openwork-ee/values.yaml: new documented namespace: openwork value.
  • packaging/helm/openwork-ee/templates/_helpers.tpl: new openwork-ee.namespace helper.
  • metadata.namespace added in configmap.yaml, secret.yaml, migration-job.yaml, ingress.yaml, den-api.yaml (Service + Deployment), den-web.yaml (Service + Deployment), inference.yaml (Service + Deployment), tests/env-probe-job.yaml.
  • templates/NOTES.txt: prints the resolved namespace after install.
  • README.md: new "Namespace" section documenting the value, --namespace alignment for helm install, and the need to pre-create the namespace in helm template | kubectl apply flows.
  • tests/namespace.sh: new render-assertion chart check.

Out of scope

  • No changes to resource names, labels, selectors, or runtime env/config.
  • No new evals journey spec — chart render assertions in packaging/helm/openwork-ee/tests/*.sh are the established proof pattern for this chart (no journey spec covers chart rendering).
  • No changes to the example values files under packaging/helm/openwork-ee/examples/.

Testing

Ran

  • for test in packaging/helm/openwork-ee/tests/*.sh; do bash "$test"; done (with helm v3.16.3 on PATH)
  • helm template openwork-ee packaging/helm/openwork-ee (+ variants: --set ingress.enabled=true --set inference.enabled=true, --set namespace=platform, --set namespace=, --namespace rel-ns) to inspect rendered namespace: fields

Result

  • pass: all 7 chart check scripts, including namespace chart checks passed (default render puts all 8 default resources / 11 with ingress+inference in openwork; override wins everywhere; cleared value falls back to the release namespace).

CI status

  • pass: pending (run publish-ee-images workflow chart checks on push)
  • code-related failures: none observed locally
  • external/env/auth blockers: none

Manual verification

  1. Run helm template openwork-ee ./packaging/helm/openwork-ee and confirm every manifest has metadata.namespace: openwork (including the migration Job).
  2. Run helm template openwork-ee ./packaging/helm/openwork-ee --set namespace=platform and confirm all manifests use platform.
  3. Run helm template openwork-ee ./packaging/helm/openwork-ee --set namespace= --namespace rel-ns and confirm all manifests fall back to rel-ns.

Evidence

  • N/A (docs-only)

Risk

  • Low: metadata.namespace is declarative and matches the documented --namespace openwork install flow. Values-compatibility risk is minimal — existing releases installed with --namespace openwork (per README) render identical effective namespaces; only pipelines that relied on an implicit context namespace different from openwork must now set namespace explicitly.

Rollback

  • Revert the commit; rendered manifests return to relying on the release/kubectl context namespace.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: raul-gherman-modaoperandi <68240333+raul-gherman-modaoperandi@users.noreply.github.com>
DEVOPS-3406 - helm: namespace resouces
@vercel

vercel Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openwork-landing Ready Ready Preview, v0 Sep 23, 2026 12:56pm UTC

@vercel

vercel Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

@raul-gherman-modaoperandi is attempting to deploy a commit to the Different AI Team on Vercel.

A member of the Team first needs to authorize it.

@benjaminshafii

Copy link
Copy Markdown
Member

@OmarMcAdam Please review the Helm namespace behavior across rendered resources and existing installation/upgrade configuration before merging. Preview deployment checks also need to be resolved or explicitly accounted for.

Holding for your review under the current merge instructions.

Replace implicit secret wiring (secret.create + secret.existingSecret
inference) with an explicit secret.secretsMode: inline | existingSecret |
externalSecrets, enforced at render time with fail-fast validation for
every invalid combination (unknown/emptied mode, missing or blank
existingSecret, secretStoreRef.name, or pathPrefix, wrong create/
existingSecret per mode, invalid store kind).

externalSecrets mode renders an ExternalSecret (ESO) whose spec.data is
generated from secret.keys against <pathPrefix>/<KEY_NAME>, so the pulled
key list can never drift from what workloads consume, and no secret
material lands in git or rendered manifests — the GitOps/ArgoCD-safe path.
apiVersion is selected from cluster capabilities (v1 else v1beta1) and
target.deletionPolicy defaults to Retain.

Also stop the migration Job from inlining DATABASE_URL and
DEN_DB_ENCRYPTION_KEY as plaintext env outside inline mode; it now uses
secretKeyRef for existingSecret/externalSecrets flows.

Documented in README (per-mode subsections) and values.yaml REQUIRED
comments; covered by tests/external-secrets.sh (render assertions for all
three modes plus 12 negative validation cases).
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
DEVOPS-3406 - helm: declared secretsMode with ESO ExternalSecret support
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: raul-gherman-modaoperandi <68240333+raul-gherman-modaoperandi@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: raul-gherman-modaoperandi <68240333+raul-gherman-modaoperandi@users.noreply.github.com>
Co-authored-by: raul-gherman-modaoperandi <68240333+raul-gherman-modaoperandi@users.noreply.github.com>
Co-authored-by: raul-gherman-modaoperandi <68240333+raul-gherman-modaoperandi@users.noreply.github.com>
Co-authored-by: raul-gherman-modaoperandi <68240333+raul-gherman-modaoperandi@users.noreply.github.com>
Co-authored-by: raul-gherman-modaoperandi <68240333+raul-gherman-modaoperandi@users.noreply.github.com>
Co-authored-by: raul-gherman-modaoperandi <68240333+raul-gherman-modaoperandi@users.noreply.github.com>
Co-authored-by: raul-gherman-modaoperandi <68240333+raul-gherman-modaoperandi@users.noreply.github.com>
Co-authored-by: raul-gherman-modaoperandi <68240333+raul-gherman-modaoperandi@users.noreply.github.com>
Co-authored-by: raul-gherman-modaoperandi <68240333+raul-gherman-modaoperandi@users.noreply.github.com>
Co-authored-by: raul-gherman-modaoperandi <68240333+raul-gherman-modaoperandi@users.noreply.github.com>
DEVOPS-3406 - Update hook-delete-policy for migration Job and RBAC to prevent sync issues
# hosts, so it is safe to reuse here. The reserved static IP is NOT — GKE
# gives each Ingress its own GCLB, so two Ingresses referencing the same
# global-static-ip-name would fight over one forwarding rule and only one
# would reconcile. Each host therefore gets its own reserved IP below.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A single multi-domain Google-managed certificate is shared across two separate GKE Ingresses/GCLBs, so HTTPS can never provision on the documented primary GKE production path.

Fix on Vercel

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Contributor screen: needs maintainer review

Commit 2710487c8a · run

Database changes need a human review (schema, migrations or migration jobs):

  • packaging/helm/openwork-ee/templates/migration-job.yaml
  • packaging/helm/openwork-ee/templates/migration-rbac.yaml

Nothing else runs yet. A maintainer reviews the changes, including the items above, then comments /test to start the AI screen, the tests and the Warden security review.

@reachjalil

Copy link
Copy Markdown
Member

Thanks for this. The PR has grown well past namespacing (ExternalSecrets, ingress split, RBAC, GCP docs), and the default namespace: openwork would move existing installs that use helm -n. I'm closing it, but a focused PR that defaults to .Release.Namespace would be very welcome.

@reachjalil reachjalil closed this Nov 24, 2026

This branch was successfully deployed

1 active deployment
Preview – openwork-landing — 2710487c Deployed Sep 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants