-
Notifications
You must be signed in to change notification settings - Fork 21
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
Set pending state on policies if dependencies are not met + remove template #11
Set pending state on policies if dependencies are not met + remove template #11
Conversation
6d184c5
to
06c8c4a
Compare
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.
Looking good overall! I have a lot of somewhat optional comments, and only one that I think actually would require a change: whether we can use allDeps
, or whether we need a tmplDeps
variable.
// set up namespace for replicated policy dependencies | ||
ns := dep.Namespace | ||
if ns == "" { | ||
ns = r.ClusterNamespaceOnHub | ||
} |
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.
I think if in the future we have (or support a 3rd party) policy type that is cluster-scoped, we would want to guard this so that we only set the namespace when it's one of our known types. But I don't know if that would even cause those types problems, so it's definitely not necessary to make any changes right now.
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.
/hold
Looks good to me! Just holding to squash the commits (which helped in review, so thanks for keeping them like that), and I think it will be good to go.
Signed-off-by: Will Kutler <[email protected]>
5a3ca06
to
cc1e4f1
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JustinKuli, willkutler 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 |
/unhold commits have been squashed and the message has been updated, this PR should be good to go now |
Adds logic to determine whether a policy template should be pending based on whether its dependencies are satisfied. If a template should be pending, these changes will remove it from the managed cluster and set the status of the parent policy to Pending.
https://github.com/stolostron/backlog/issues/26188
https://github.com/stolostron/backlog/issues/26189