Repository navigation
feat(crd): define Namespace spec and validation - #25
Merged
Merged
Conversation
tomba7
requested review from
jaypipes,
niyomukiza-mechack and
zainawaisn
and
a balanced review from Copilot
and removed request for
jaypipes
October 13, 2026 05:26
There was a problem hiding this comment.
🔵 Needs a closer look
The broad public CRD contract and immutable CEL rules warrant final human validation against the Temporal Cloud API.
0 open findings
What changed in this PR
Defines the typed Namespace CRD specification, schema validation, examples, and end-to-end validation coverage.
Changes:
- Adds Namespace API types and generated CRD/deep-copy artifacts.
- Adds structural, enum, uniqueness, capacity, and update validation.
- Documents and tests valid and invalid Namespace manifests.
| File | Description |
|---|---|
api/cloud/v1alpha1/namespace.go |
Defines Namespace specification types and validation markers. |
api/cloud/v1alpha1/zz_generated.deepcopy.go |
Adds generated deep-copy support. |
deploy/kustomize/crd/bases/cloud.temporal.io_namespaces.yaml |
Publishes the generated CRD schema. |
examples/namespace.yaml |
Provides an example Namespace manifest. |
README.md |
Documents creation and validation. |
test/e2e/namespace/validation.yaml |
Tests CRD validation behavior. |
test/e2e/namespace/testdata/minimal.yaml |
Supplies the minimal valid fixture. |
test/e2e/namespace/happy-default.yaml |
Updates the lifecycle test for required fields. |
.mk/test.mk |
Adds the validation test target. |
.mk/gen.mk |
Enables generated CRD descriptions. |
.gitignore |
Ignores IDE metadata. |
Files not reviewed (1)
- api/cloud/v1alpha1/zz_generated.deepcopy.go: Generated file
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
jaypipes
reviewed
Oct 13, 2026
jaypipes
reviewed
Oct 14, 2026
jaypipes
approved these changes
Oct 15, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Part of #5
What was changed
NamespaceSpecfor theNamespaceCRD. Each field maps to its corresponding field in the Temporal Cloud namespace proto.Why?
Validation Trade-offs considered
kubectl applyrejects a bad manifest before anything reaches Temporal Cloud.metadata.nameformat, retention range) are only documented on the Cloud docs site, not in the proto, so a CRD copy can drift stricter than Cloud and block valid configs.This PR mostly starts with option 2, with the CRD checking only structure and rules that don't depend on Cloud policy. We'll add stricter CRD checks as we test against Temporal Cloud and iterate.
Testing
make test-e2epasses.kubectl explain namespaces.spec --api-version=cloud.temporal.io/v1alpha1shows each field's Cloud mapping.