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

feat/extra-container-lifecycle-hooks #113

Merged
merged 4 commits into from
Jul 13, 2021

Conversation

roivaz
Copy link
Member

@roivaz roivaz commented Jul 13, 2021

This PR allows coordination for extra containers within the Pod with the shutdown manager. A new annotation has been added that allows a user to specify other container names where the shutdown manager lifecycle hook should also be configured. This is a feature that only makes sense for sidecars.

An example of usage:

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: kuard
  namespace: default
  labels:
    app: kuard
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kuard
  template:
    metadata:
      labels:
        app: kuard
        marin3r.3scale.net/status: "enabled"
      annotations:
        marin3r.3scale.net/node-id: kuard
        marin3r.3scale.net/ports: envoy-https:8443
        marin3r.3scale.net/shutdown-manager.enabled: "true"
        marin3r.3scale.net/shutdown-manager.extra-lifecycle-hooks: kuard
    spec:
      containers:
        - name: kuard
          image: gcr.io/kuar-demo/kuard-amd64:blue
          ports:
            - containerPort: 8080
              name: http
              protocol: TCP

/kind feature
/priority importantt-soon
/assign

@3scale-robot
Copy link
Contributor

@roivaz: The label(s) priority/importantt-soon cannot be applied, because the repository doesn't have them

In response to this:

This PR allows coordination for extra containers within the Pod with the shutdown manager. A new annotation has been added that allows a user to specify other container names where the shutdown manager lifecycle hook should also be configured. This is a feature that only makes sense for sidecars.

An example of usage:

---
apiVersion: apps/v1
kind: Deployment
metadata:
 name: kuard
 namespace: default
 labels:
   app: kuard
spec:
 replicas: 1
 selector:
   matchLabels:
     app: kuard
 template:
   metadata:
     labels:
       app: kuard
       marin3r.3scale.net/status: "enabled"
     annotations:
       marin3r.3scale.net/node-id: kuard
       marin3r.3scale.net/ports: envoy-https:8443
       marin3r.3scale.net/shutdown-manager.enabled: "true"
       marin3r.3scale.net/shutdown-manager.extra-lifecycle-hooks: kuard
   spec:
     containers:
       - name: kuard
         image: gcr.io/kuar-demo/kuard-amd64:blue
         ports:
           - containerPort: 8080
             name: http
             protocol: TCP

/kind feature
/priority importantt-soon
/assign

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@3scale-robot 3scale-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Jul 13, 2021
@3scale-robot 3scale-robot added needs-priority Indicates a PR or issue lacks a `priority/foo` label and requires one. needs-size Indicates a PR or issue lacks a `size/foo` label and requires one. size/M Requires about a day to complete the PR or the issue. and removed needs-size Indicates a PR or issue lacks a `size/foo` label and requires one. labels Jul 13, 2021
README.md Outdated Show resolved Hide resolved
@roivaz roivaz force-pushed the feat/extra-container-lifecycle-hooks branch from 08ddd84 to c472633 Compare July 13, 2021 10:53
@roivaz
Copy link
Member Author

roivaz commented Jul 13, 2021

/ok-to-test

@3scale-robot 3scale-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Jul 13, 2021
@slopezz
Copy link
Member

slopezz commented Jul 13, 2021

@roivaz should I wait until test re-execution before approving the PR?

@roivaz
Copy link
Member Author

roivaz commented Jul 13, 2021

Nope, the kind cluster setup keeps failing in github actions since two weeks ago and I haven't had the time to look at it yet. The tests run without problems locally so I'll just go ahead and merge it.

@slopezz
Copy link
Member

slopezz commented Jul 13, 2021

Nope, the kind cluster setup keeps failing in github actions since two weeks ago and I haven't had the time to look at it yet. The tests run without problems locally so I'll just go ahead and merge it.

Fair enough!

/lgtm

@3scale-robot 3scale-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 13, 2021
@3scale-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 5599fee84a55fc38c361c932069a8429814d0ed6

@roivaz
Copy link
Member Author

roivaz commented Jul 13, 2021

/approve

@3scale-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: roivaz

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

@3scale-robot 3scale-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 13, 2021
@3scale-robot 3scale-robot merged commit 5e23c28 into main Jul 13, 2021
@3scale-robot 3scale-robot deleted the feat/extra-container-lifecycle-hooks branch July 13, 2021 13:47
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. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. needs-priority Indicates a PR or issue lacks a `priority/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Requires about a day to complete the PR or the issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants