Skip to content
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

✨Add defaulting webhooks to cluster api manager #1824

Merged
merged 1 commit into from
Dec 5, 2019

Conversation

wfernandes
Copy link
Contributor

Adds appropriate default mutating webhooks to cluster, machine and
machine deployment objects.

Signed-off-by: Warren Fernandes wfernandes@pivotal.io

What this PR does / why we need it:
This PR adds mutating webhooks for Cluster, Machine and MachineDeployments to provide appropriate defaults for the respective objects.

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 #1794

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 3, 2019
@wfernandes wfernandes force-pushed the defaulting-webhook branch 2 times, most recently from 8b0b261 to 49bdce0 Compare December 3, 2019 20:59
@detiber
Copy link
Member

detiber commented Dec 3, 2019

/lgtm
/assign @ncdc

@k8s-ci-robot k8s-ci-robot assigned ncdc and detiber and unassigned ncdc Dec 3, 2019
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 3, 2019
api/v1alpha3/cluster_webhook.go Show resolved Hide resolved
api/v1alpha3/machine_webhook.go Show resolved Hide resolved
api/v1alpha3/machine_webhook.go Show resolved Hide resolved
api/v1alpha3/machinedeployment_webhook.go Outdated Show resolved Hide resolved
api/v1alpha3/machinedeployment_webhook.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 3, 2019
@wfernandes wfernandes force-pushed the defaulting-webhook branch 3 times, most recently from 37fc969 to 08e9fe6 Compare December 4, 2019 21:05
@wfernandes
Copy link
Contributor Author

@ncdc @detiber I added some validation to the Cluster and Machine regarding the namespace matching. Let me know what you think. Thanks!

api/v1alpha3/cluster_webhook.go Outdated Show resolved Hide resolved
api/v1alpha3/machine_webhook.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 5, 2019
Sets appropriate defaults to cluster, machine and machine deployment
objects.
Validates namespace match those of reference objects.

Signed-off-by: Warren Fernandes <wfernandes@pivotal.io>
@ncdc ncdc added this to the v0.3.0 milestone Dec 5, 2019
@ncdc
Copy link
Contributor

ncdc commented Dec 5, 2019

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 5, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ncdc, wfernandes

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 5, 2019
@k8s-ci-robot k8s-ci-robot merged commit c58b772 into kubernetes-sigs:master Dec 5, 2019
@wfernandes wfernandes deleted the defaulting-webhook branch December 5, 2019 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Populate MachineDeployment defaults via mutating admission webhook
4 participants