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

[WIP] - sidecar containers PoC #75099

Closed
wants to merge 4 commits into from

Conversation

Joseph-Irving
Copy link
Member

What type of PR is this?
/kind feature

What this PR does / why we need it:
This is a PoC for the sidecars kep kubernetes/enhancements#753
None of this is final, it's just a first draft intended to show how and where the functionality could be implemented.

Currently this POC has:

  • Sidecars start before non-sidecar containers
  • Non-sidecar containers only start when sidecars are ready
  • Sidecars get terminated after non-sidecars containers have terminated
  • Sidecars get terminated when all non-sidecars containers have permanently exited (only when restart policy isn't always)

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


@k8s-ci-robot
Copy link
Contributor

@Joseph-Irving: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

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.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. 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. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 7, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @Joseph-Irving. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added area/kubelet kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/node Categorizes an issue or PR as relevant to SIG Node. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Mar 7, 2019
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 29, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Joseph-Irving
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: lavalamp

If they are not already assigned, you can assign the PR to them by writing /assign @lavalamp in a comment when ready.

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

//One of Standard, Sidecar.
//Defaults to Standard
//+optional
ContainerLifecycle ContainerLifecycle `json:"containerLifecycle,omitempty" protobuf:"bytes,22,opt,name=containerLifecycle,casttype=ContainerLifecycle"`
Copy link
Contributor

@luksa luksa Apr 3, 2019

Choose a reason for hiding this comment

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

Having both lifecycle and containerLifecycle under pod.spec.containers might be confusing to users. Have you thought about introducing pod.spec.containers.lifecycle.type instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah I did consider that, but I thought it might be confusing as the existing things in lifecycle are actions to perform whereas this isn't an action, it's a way of describing when your container should start up/shut down. There's a PR here kubernetes/enhancements#919 where the API implementation is being discussed

nyodas pushed a commit to DataDog/kubernetes that referenced this pull request Jan 26, 2023
This change turns off the ability to completely kill pods when the
non-sidecars are done. This is useful for cronjobs, where the
non-sidecars finish work and exit, this code previously would clean up
the pod and its resources.

This feature was pulled in from kubernetes#75099.

This is a feature that sounds nice in practice, but its not what we
need. It seems to be a bit buggy since the Pod sandbox can
potentially be deleted and recreated during the liftime of the
Pod. That ain't good.

Datadog: **NOT FROM UPSTREAM K8S**. From Lyft: lyft@a31b7fc

datadog:patch
nyodas pushed a commit to DataDog/kubernetes that referenced this pull request Jan 26, 2023
This change turns off the ability to completely kill pods when the
non-sidecars are done. This is useful for cronjobs, where the
non-sidecars finish work and exit, this code previously would clean up
the pod and its resources.

This feature was pulled in from kubernetes#75099.

This is a feature that sounds nice in practice, but its not what we
need. It seems to be a bit buggy since the Pod sandbox can
potentially be deleted and recreated during the liftime of the
Pod. That ain't good.

Datadog: **NOT FROM UPSTREAM K8S**. From Lyft: lyft@a31b7fc

datadog:patch
nyodas pushed a commit to DataDog/kubernetes that referenced this pull request Jan 26, 2023
This change turns off the ability to completely kill pods when the
non-sidecars are done. This is useful for cronjobs, where the
non-sidecars finish work and exit, this code previously would clean up
the pod and its resources.

This feature was pulled in from kubernetes#75099.

This is a feature that sounds nice in practice, but its not what we
need. It seems to be a bit buggy since the Pod sandbox can
potentially be deleted and recreated during the liftime of the
Pod. That ain't good.

Datadog: **NOT FROM UPSTREAM K8S**. From Lyft: lyft@a31b7fc

datadog:patch
nyodas pushed a commit to DataDog/kubernetes that referenced this pull request Jan 31, 2023
This change turns off the ability to completely kill pods when the
non-sidecars are done. This is useful for cronjobs, where the
non-sidecars finish work and exit, this code previously would clean up
the pod and its resources.

This feature was pulled in from kubernetes#75099.

This is a feature that sounds nice in practice, but its not what we
need. It seems to be a bit buggy since the Pod sandbox can
potentially be deleted and recreated during the liftime of the
Pod. That ain't good.

Datadog: **NOT FROM UPSTREAM K8S**. From Lyft: lyft@a31b7fc

datadog:patch
nyodas pushed a commit to DataDog/kubernetes that referenced this pull request May 3, 2023
This change turns off the ability to completely kill pods when the
non-sidecars are done. This is useful for cronjobs, where the
non-sidecars finish work and exit, this code previously would clean up
the pod and its resources.

This feature was pulled in from kubernetes#75099.

This is a feature that sounds nice in practice, but its not what we
need. It seems to be a bit buggy since the Pod sandbox can
potentially be deleted and recreated during the liftime of the
Pod. That ain't good.

Datadog: **NOT FROM UPSTREAM K8S**. From Lyft: lyft@a31b7fc

datadog:patch
nyodas pushed a commit to DataDog/kubernetes that referenced this pull request May 3, 2023
This change turns off the ability to completely kill pods when the
non-sidecars are done. This is useful for cronjobs, where the
non-sidecars finish work and exit, this code previously would clean up
the pod and its resources.

This feature was pulled in from kubernetes#75099.

This is a feature that sounds nice in practice, but its not what we
need. It seems to be a bit buggy since the Pod sandbox can
potentially be deleted and recreated during the liftime of the
Pod. That ain't good.

Datadog: **NOT FROM UPSTREAM K8S**. From Lyft: lyft@a31b7fc

datadog:patch
nyodas pushed a commit to DataDog/kubernetes that referenced this pull request May 3, 2023
This change turns off the ability to completely kill pods when the
non-sidecars are done. This is useful for cronjobs, where the
non-sidecars finish work and exit, this code previously would clean up
the pod and its resources.

This feature was pulled in from kubernetes#75099.

This is a feature that sounds nice in practice, but its not what we
need. It seems to be a bit buggy since the Pod sandbox can
potentially be deleted and recreated during the liftime of the
Pod. That ain't good.

Datadog: **NOT FROM UPSTREAM K8S**. From Lyft: lyft@a31b7fc

datadog:patch
nyodas pushed a commit to DataDog/kubernetes that referenced this pull request May 3, 2023
This change turns off the ability to completely kill pods when the
non-sidecars are done. This is useful for cronjobs, where the
non-sidecars finish work and exit, this code previously would clean up
the pod and its resources.

This feature was pulled in from kubernetes#75099.

This is a feature that sounds nice in practice, but its not what we
need. It seems to be a bit buggy since the Pod sandbox can
potentially be deleted and recreated during the liftime of the
Pod. That ain't good.

Datadog: **NOT FROM UPSTREAM K8S**. From Lyft: lyft@a31b7fc

datadog:patch
nyodas pushed a commit to DataDog/kubernetes that referenced this pull request May 4, 2023
This change turns off the ability to completely kill pods when the
non-sidecars are done. This is useful for cronjobs, where the
non-sidecars finish work and exit, this code previously would clean up
the pod and its resources.

This feature was pulled in from kubernetes#75099.

This is a feature that sounds nice in practice, but its not what we
need. It seems to be a bit buggy since the Pod sandbox can
potentially be deleted and recreated during the liftime of the
Pod. That ain't good.

Datadog: **NOT FROM UPSTREAM K8S**. From Lyft: lyft@a31b7fc

datadog:patch
abhinavdahiya pushed a commit to lyft/kubernetes that referenced this pull request Jun 15, 2023
This change turns off the ability to completely kill pods when the
non-sidecars are done. This is useful for cronjobs, where the
non-sidecars finish work and exit, this code previously would clean up
the pod and its resources.

This feature was pulled in from kubernetes#75099.

This is a feature that sounds nice in practice, but its not what we
need. It seems to be a bit buggy since the Pod sandbox can
potentially be deleted and recreated during the liftime of the
Pod. That ain't good.
abhinavdahiya pushed a commit to lyft/kubernetes that referenced this pull request Jun 26, 2023
This change turns off the ability to completely kill pods when the
non-sidecars are done. This is useful for cronjobs, where the
non-sidecars finish work and exit, this code previously would clean up
the pod and its resources.

This feature was pulled in from kubernetes#75099.

This is a feature that sounds nice in practice, but its not what we
need. It seems to be a bit buggy since the Pod sandbox can
potentially be deleted and recreated during the liftime of the
Pod. That ain't good.
pl-jankowskimichal pushed a commit to DataDog/kubernetes that referenced this pull request Jul 5, 2023
This change turns off the ability to completely kill pods when the
non-sidecars are done. This is useful for cronjobs, where the
non-sidecars finish work and exit, this code previously would clean up
the pod and its resources.

This feature was pulled in from kubernetes#75099.

This is a feature that sounds nice in practice, but its not what we
need. It seems to be a bit buggy since the Pod sandbox can
potentially be deleted and recreated during the liftime of the
Pod. That ain't good.

Datadog: **NOT FROM UPSTREAM K8S**. From Lyft: lyft@a31b7fc

datadog:patch
amardomingo pushed a commit to DataDog/kubernetes that referenced this pull request Jul 10, 2023
This change turns off the ability to completely kill pods when the
non-sidecars are done. This is useful for cronjobs, where the
non-sidecars finish work and exit, this code previously would clean up
the pod and its resources.

This feature was pulled in from kubernetes#75099.

This is a feature that sounds nice in practice, but its not what we
need. It seems to be a bit buggy since the Pod sandbox can
potentially be deleted and recreated during the liftime of the
Pod. That ain't good.

Datadog: **NOT FROM UPSTREAM K8S**. From Lyft: lyft@a31b7fc

datadog:patch
abhinavdahiya pushed a commit to lyft/kubernetes that referenced this pull request Jul 28, 2023
This change turns off the ability to completely kill pods when the
non-sidecars are done. This is useful for cronjobs, where the
non-sidecars finish work and exit, this code previously would clean up
the pod and its resources.

This feature was pulled in from kubernetes#75099.

This is a feature that sounds nice in practice, but its not what we
need. It seems to be a bit buggy since the Pod sandbox can
potentially be deleted and recreated during the liftime of the
Pod. That ain't good.
abhinavdahiya pushed a commit to lyft/kubernetes that referenced this pull request Aug 10, 2023
This change turns off the ability to completely kill pods when the
non-sidecars are done. This is useful for cronjobs, where the
non-sidecars finish work and exit, this code previously would clean up
the pod and its resources.

This feature was pulled in from kubernetes#75099.

This is a feature that sounds nice in practice, but its not what we
need. It seems to be a bit buggy since the Pod sandbox can
potentially be deleted and recreated during the liftime of the
Pod. That ain't good.
twexler pushed a commit to DataDog/kubernetes that referenced this pull request Sep 15, 2023
This change turns off the ability to completely kill pods when the
non-sidecars are done. This is useful for cronjobs, where the
non-sidecars finish work and exit, this code previously would clean up
the pod and its resources.

This feature was pulled in from kubernetes#75099.

This is a feature that sounds nice in practice, but its not what we
need. It seems to be a bit buggy since the Pod sandbox can
potentially be deleted and recreated during the liftime of the
Pod. That ain't good.

Datadog: **NOT FROM UPSTREAM K8S**. From Lyft: lyft@a31b7fc

datadog:patch
abhinavdahiya pushed a commit to lyft/kubernetes that referenced this pull request Nov 29, 2023
This change turns off the ability to completely kill pods when the
non-sidecars are done. This is useful for cronjobs, where the
non-sidecars finish work and exit, this code previously would clean up
the pod and its resources.

This feature was pulled in from kubernetes#75099.

This is a feature that sounds nice in practice, but its not what we
need. It seems to be a bit buggy since the Pod sandbox can
potentially be deleted and recreated during the liftime of the
Pod. That ain't good.
nyodas pushed a commit to DataDog/kubernetes that referenced this pull request Jan 8, 2024
This change turns off the ability to completely kill pods when the
non-sidecars are done. This is useful for cronjobs, where the
non-sidecars finish work and exit, this code previously would clean up
the pod and its resources.

This feature was pulled in from kubernetes#75099.

This is a feature that sounds nice in practice, but its not what we
need. It seems to be a bit buggy since the Pod sandbox can
potentially be deleted and recreated during the liftime of the
Pod. That ain't good.

Datadog: **NOT FROM UPSTREAM K8S**. From Lyft: lyft@a31b7fc

datadog:patch
nyodas pushed a commit to DataDog/kubernetes that referenced this pull request Jan 8, 2024
This change turns off the ability to completely kill pods when the
non-sidecars are done. This is useful for cronjobs, where the
non-sidecars finish work and exit, this code previously would clean up
the pod and its resources.

This feature was pulled in from kubernetes#75099.

This is a feature that sounds nice in practice, but its not what we
need. It seems to be a bit buggy since the Pod sandbox can
potentially be deleted and recreated during the liftime of the
Pod. That ain't good.

Datadog: **NOT FROM UPSTREAM K8S**. From Lyft: lyft@a31b7fc

datadog:patch
nyodas pushed a commit to DataDog/kubernetes that referenced this pull request Jan 8, 2024
This change turns off the ability to completely kill pods when the
non-sidecars are done. This is useful for cronjobs, where the
non-sidecars finish work and exit, this code previously would clean up
the pod and its resources.

This feature was pulled in from kubernetes#75099.

This is a feature that sounds nice in practice, but its not what we
need. It seems to be a bit buggy since the Pod sandbox can
potentially be deleted and recreated during the liftime of the
Pod. That ain't good.

Datadog: **NOT FROM UPSTREAM K8S**. From Lyft: lyft@a31b7fc

datadog:patch
nyodas pushed a commit to DataDog/kubernetes that referenced this pull request Feb 23, 2024
This change turns off the ability to completely kill pods when the
non-sidecars are done. This is useful for cronjobs, where the
non-sidecars finish work and exit, this code previously would clean up
the pod and its resources.

This feature was pulled in from kubernetes#75099.

This is a feature that sounds nice in practice, but its not what we
need. It seems to be a bit buggy since the Pod sandbox can
potentially be deleted and recreated during the liftime of the
Pod. That ain't good.

Datadog: **NOT FROM UPSTREAM K8S**. From Lyft: lyft@a31b7fc

datadog:patch
nyodas pushed a commit to DataDog/kubernetes that referenced this pull request Mar 18, 2024
This change turns off the ability to completely kill pods when the
non-sidecars are done. This is useful for cronjobs, where the
non-sidecars finish work and exit, this code previously would clean up
the pod and its resources.

This feature was pulled in from kubernetes#75099.

This is a feature that sounds nice in practice, but its not what we
need. It seems to be a bit buggy since the Pod sandbox can
potentially be deleted and recreated during the liftime of the
Pod. That ain't good.

Datadog: **NOT FROM UPSTREAM K8S**. From Lyft: lyft@a31b7fc

datadog:patch
nyodas pushed a commit to DataDog/kubernetes that referenced this pull request Apr 11, 2024
This change turns off the ability to completely kill pods when the
non-sidecars are done. This is useful for cronjobs, where the
non-sidecars finish work and exit, this code previously would clean up
the pod and its resources.

This feature was pulled in from kubernetes#75099.

This is a feature that sounds nice in practice, but its not what we
need. It seems to be a bit buggy since the Pod sandbox can
potentially be deleted and recreated during the liftime of the
Pod. That ain't good.

Datadog: **NOT FROM UPSTREAM K8S**. From Lyft: lyft@a31b7fc

datadog:patch
nyodas pushed a commit to DataDog/kubernetes that referenced this pull request Apr 11, 2024
This change turns off the ability to completely kill pods when the
non-sidecars are done. This is useful for cronjobs, where the
non-sidecars finish work and exit, this code previously would clean up
the pod and its resources.

This feature was pulled in from kubernetes#75099.

This is a feature that sounds nice in practice, but its not what we
need. It seems to be a bit buggy since the Pod sandbox can
potentially be deleted and recreated during the liftime of the
Pod. That ain't good.

Datadog: **NOT FROM UPSTREAM K8S**. From Lyft: lyft@a31b7fc

datadog:patch
nyodas pushed a commit to DataDog/kubernetes that referenced this pull request Apr 22, 2024
This change turns off the ability to completely kill pods when the
non-sidecars are done. This is useful for cronjobs, where the
non-sidecars finish work and exit, this code previously would clean up
the pod and its resources.

This feature was pulled in from kubernetes#75099.

This is a feature that sounds nice in practice, but its not what we
need. It seems to be a bit buggy since the Pod sandbox can
potentially be deleted and recreated during the liftime of the
Pod. That ain't good.

Datadog: **NOT FROM UPSTREAM K8S**. From Lyft: lyft@a31b7fc

datadog:patch
nyodas pushed a commit to DataDog/kubernetes that referenced this pull request Apr 22, 2024
This change turns off the ability to completely kill pods when the
non-sidecars are done. This is useful for cronjobs, where the
non-sidecars finish work and exit, this code previously would clean up
the pod and its resources.

This feature was pulled in from kubernetes#75099.

This is a feature that sounds nice in practice, but its not what we
need. It seems to be a bit buggy since the Pod sandbox can
potentially be deleted and recreated during the liftime of the
Pod. That ain't good.

Datadog: **NOT FROM UPSTREAM K8S**. From Lyft: lyft@a31b7fc

datadog:patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubelet cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/feature Categorizes issue or PR as related to a new feature. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/node Categorizes an issue or PR as relevant to SIG Node. 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.

None yet

5 participants