-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Force creation of generic items into AppWrapper deployment namespace #665
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's still possible for users to delete existing resources in namespaces they are not granted permissions to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great!
For this PR: #652 (I have to update it)
Should I still keep the resourceName labels but left unused as discussed?
Ok. I added the same fix on resource deletion. |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: astefanutti The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This PR makes sure that generic items are created in the same namespace as the AppWrapper. If the metadata of the generic item explicitly specifies a namespace that is different from the AppWrapper deployment namespace, an error message is generated to report the discrepancy and the resource creation fails. If the specified namespace is equal to the AppWrapper namespace or if no explicit namespace is specified then the creation can process in the AppWrapper namespace.
This PR does not affect the creation of cluster scoped resources, which was already prohibited.
This PR modifies MCAD's behavior when resources do not specify a namespace. They used to be deployed in the
default
namespace irrespective of the AppWrapper namespace. Now they will be deployed in the AppWrapper namespace instead. Alternatively, we could check the namespace without changing the existing behavior. In the long term though, if the deployment namespace can only be the appwrapper namespace, it does not make much sense to require the namespace in the resource definition, i.e., interpret the absence of a namespace as thedefault
namespace.