remove: delete namespace definition for controller-manager#56
Conversation
There was a problem hiding this comment.
Code Review
This pull request removes the Namespace resource definition from the manager configuration. Feedback indicates that this change could lead to deployment failures if the target namespace is not already present in the cluster, as Kustomize does not automatically create the namespace object.
I am having trouble creating individual review comments. Click here to see my feedback.
config/manager/manager.yaml (1-9)
Removing the Namespace resource definition will prevent the namespace from being created during deployment. While config/default/kustomization.yaml specifies a target namespace (otterscale-system), Kustomize does not automatically generate a Namespace object; it only updates the namespace field of other resources. This change will cause kubectl apply -k to fail if the namespace does not already exist in the cluster. If the intention is to keep the manifests self-contained, this resource should be retained or moved to a separate file (e.g., config/default/namespace.yaml) and included in the kustomization resources.
There was a problem hiding this comment.
Pull request overview
This PR removes the Namespace resource previously embedded in the controller manager manifest, leaving only the Deployment in config/manager/manager.yaml.
Changes:
- Removed the
Namespacemanifest fromconfig/manager/manager.yamlso the file no longer creates the controller manager namespace.
Comments suppressed due to low confidence (1)
config/manager/manager.yaml:5
- Removing the Namespace manifest means
make deploy(Makefile pipeskustomize build config/defaultintokubectl apply) will fail on a fresh cluster unless the target namespace already exists. Consider either (a) adding a Namespace resource forotterscale-system(matchingconfig/default/kustomization.yaml) into the rendered manifests, or (b) updating the deploy/install flow/docs to create the namespace before applying resources.
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
namespace: system
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
No description provided.