-
Notifications
You must be signed in to change notification settings - Fork 108
🐛 don't customize non-manager deployments #397
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
🐛 don't customize non-manager deployments #397
Conversation
This reverts commit d423563.
} | ||
|
||
if o.GetKind() == deploymentKind { | ||
// We need to skip the deployment customization if there are several deployments available |
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.
Does this mean we don’t customize CAPZ provider deployment with this logic in place?
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.
Ah, I see, we are skipping everything which does not follow ca*-controller-manager and has multiple replicas. We’d need to watch out for non-regular providers, if they follow the naming pattern.
/lgtm
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 simplified that check, now it looks like if isMultipleDeployments && !isProviderManagerDeploymentName(o.GetName())
and isProviderManagerDeploymentName is strings.HasPrefix(name, "ca") && strings.HasSuffix(name, "-controller-manager")
LGTM label has been added. Git tree hash: 5dbba6ba3abc73a310422efd17f9bade97696fea
|
/hold going to add more tests |
cac3fea
to
04f9613
Compare
To prevent customiztion of non-manager deployments, we introduce a check that first verifies that there are several deployments. If there are several deployments available, we customize only those with names like "ca*-controller-manager" and skip others.
04f9613
to
195da27
Compare
/hold cancel |
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.
/lgtm
LGTM label has been added. Git tree hash: c78dbd8747fbfce761aced1035753f9b14ad9f7d
|
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alexander-demicev 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 |
What this PR does / why we need it:
To prevent customization of non-manager deployments, we introduce a check that first verifies if there are several deployments. If there are several deployments available, we customize only those with names like "ca*-controller-manager" and skip the others.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #