Skip to content

feat: Validate AuthProxyWorkload updates to prevent changes to the workload selector.#211

Merged
hessjcg merged 4 commits intomainfrom
gh-36-validate-updates
Feb 21, 2023
Merged

feat: Validate AuthProxyWorkload updates to prevent changes to the workload selector.#211
hessjcg merged 4 commits intomainfrom
gh-36-validate-updates

Conversation

@hessjcg
Copy link
Copy Markdown
Collaborator

@hessjcg hessjcg commented Feb 17, 2023

We do not allow a user to change the selector of an AuthProxyWorkload, as it will require the operator to do
too much bookkeeping. We can keep our code clean and simple if the operator assumes that the
workload selected for a proxy configuration never changes.

Related to #36

@hessjcg hessjcg requested a review from a team as a code owner February 17, 2023 23:11
@hessjcg hessjcg requested a review from enocom February 17, 2023 23:11
allErrs = append(allErrs, validation.ValidateLabelName(r.Name, field.NewPath("metadata", "name"))...)
allErrs = append(allErrs, validateWorkload(&r.Spec.Workload, field.NewPath("spec", "workload"))...)

if o, ok := old.(*AuthProxyWorkload); ok {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make this !ok.

@hessjcg hessjcg force-pushed the gh-36-validate-updates branch from b5e4126 to 1cbf2f7 Compare February 21, 2023 18:13
@hessjcg hessjcg merged commit 4304283 into main Feb 21, 2023
@hessjcg hessjcg deleted the gh-36-validate-updates branch February 21, 2023 18:25
This was referenced Feb 21, 2023
hessjcg pushed a commit that referenced this pull request Feb 21, 2023
Features
- Add new field RolloutStrategy control automatic rollout (#202) (090b88d)
- Add new terraform project for e2e test resources (#181) (0140592)
- Add script to run terraform with input validation. (#182) (857444a)
- Add support for Unix sockets. (#205) (8177a35), closes #47
- Add telemetry settings to configure health check port (#210) (3ede42d)
- Add the e2e test job for Cloud Build (#184) (dc2990c)
- Automatic changes to workloads when an AuthProxyWorload is deleted (#200) (e11caed)
- Automatically trigger pod rollout for appsv1 resources when AuthProxyWorkload changes. (#197) (3b0359b)
- Separate terraform for project setup and permissions (#179) (8f43657)
- Validate AuthProxyWorkload spec.selector field (#209) (98c460b)
- Validate AuthProxyWorkload updates to prevent changes to the workload selector. (#211) (4304283)

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Release PR Generate Bot action release-please[bot] <release-please[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants