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

Agnhost webhook sidecar #87385

Merged
merged 2 commits into from
Jan 31, 2020

Conversation

krzysied
Copy link
Contributor

What type of PR is this?
/kind feature

What this PR does / why we need it:
Adds injecting sidecar functionality to agnhost.

Which issue(s) this PR fixes:

Fixes #87383

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. area/test sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jan 20, 2020
@krzysied krzysied force-pushed the agnhost_webhook_sidecar branch 2 times, most recently from 4f87301 to 0c5b444 Compare January 20, 2020 14:00
@krzysied
Copy link
Contributor Author

/retest

@krzysied
Copy link
Contributor Author

/assign @listx

@krzysied
Copy link
Contributor Author

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 20, 2020
@krzysied krzysied force-pushed the agnhost_webhook_sidecar branch 2 times, most recently from 5d3d1c2 to c4d08d3 Compare January 21, 2020 12:39
@krzysied
Copy link
Contributor Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 21, 2020
@krzysied
Copy link
Contributor Author

/assign @liggitt
This PR changes assumptions of an apimachinery test.

func testMutatingPodWebhook(f *framework.Framework) {
I don't expect this PR to brake the test, but it would be nice to have a lgtm from apimachinery folks.

@liggitt
Copy link
Member

liggitt commented Jan 21, 2020

/hold

This does not look like a valid change to the existing agnhost function. If you want an unconditional idempotent sidecar injector, that seems like a separate function that should be added, not something the current function should be modified into

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 21, 2020
@krzysied
Copy link
Contributor Author

seems like a separate function that should be added, not something the current function should be modified into

I'm also ok-sh with that.
I can add podSelector(func(*corev1.Pod) bool) as common function argument, so I keep the same name selecting logic for existing function and also I don't have to duplicate the code.
Wdyt?

@krzysied krzysied force-pushed the agnhost_webhook_sidecar branch from c4d08d3 to 374c161 Compare January 21, 2020 15:32
@krzysied krzysied force-pushed the agnhost_webhook_sidecar branch from de722d3 to db6eed8 Compare January 24, 2020 10:10

func mutatePodsSidecar(ar v1.AdmissionReview) *v1.AdmissionResponse {
if sidecarImage == "" {
klog.Fatal("No image specified by the sidecar-image parameter")
Copy link
Member

Choose a reason for hiding this comment

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

this will exit the webhook pod, but not surface back to the test... to return an error visible to the test, you would need to reject admission with an error (set Allowed=false, and add a status message)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@krzysied krzysied force-pushed the agnhost_webhook_sidecar branch from db6eed8 to 3593fc6 Compare January 27, 2020 11:00
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 27, 2020
@krzysied
Copy link
Contributor Author

/retest

@liggitt
Copy link
Member

liggitt commented Jan 28, 2020

/lgtm
/approve
/retest

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: krzysied, liggitt

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 Jan 28, 2020
@mkumatag
Copy link
Member

/lgtm
/approve
/retest

based on this I'm just removing hold

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 28, 2020
@spiffxp
Copy link
Member

spiffxp commented Jan 28, 2020

/retest

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

1 similar comment
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@krzysied
Copy link
Contributor Author

/retest

@krzysied
Copy link
Contributor Author

/test pull-kubernetes-e2e-kind

@krzysied
Copy link
Contributor Author

/retest

@krzysied
Copy link
Contributor Author

/test pull-kubernetes-e2e-g

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

2 similar comments
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@krzysied
Copy link
Contributor Author

/test pull-kubernetes-e2e-gce-100-performance

@krzysied
Copy link
Contributor Author

/test pull-kubernetes-verify

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@k8s-ci-robot k8s-ci-robot merged commit 11aa07e into kubernetes:master Jan 31, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.18 milestone Jan 31, 2020
@krzysied krzysied deleted the agnhost_webhook_sidecar branch January 31, 2020 09:30
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. area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Agnhost webhook being able to inject sidecar
8 participants