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(k8s): add configuration to hold application launch until after sidecar is ready #5498

Closed
wants to merge 7 commits into from

Conversation

curtiscook
Copy link
Contributor

@curtiscook curtiscook commented Dec 14, 2022

…ecar is ready

Signed-off-by: c curtis@commonstock.com

Checklist prior to review

  • Link to docs PR or issue -- Make Kuma's init container first by default #3121 3121
  • Link to UI issue or PR --
  • Is the issue worked on linked? --
  • The PR does not hardcode values that might break projects that depend on kuma (e.g. "kumahq" as a image registry) --
  • The PR will work for both Linux and Windows, system specific functions like syscall.Mkfifo have equivalent implementation on the other OS --
  • Unit Tests --
  • E2E Tests --
  • Manual Universal Tests --
  • Manual Kubernetes Tests --
  • Do you need to update UPGRADE.md? --
  • Does it need to be backported according to the backporting policy? --
  • Do you need to explicitly set a > Changelog: entry here or add a ci/ label to run fewer/more tests?

@lahabana
Copy link
Contributor

@curtiscook @lukidzi will be able to help you with this implem. Don't hesitate to ping him in Slack if you want to have faster feedback/questions

@curtiscook
Copy link
Contributor Author

Thanks!

@lukidzi lukidzi self-assigned this Dec 15, 2022
@lahabana
Copy link
Contributor

lahabana commented Jan 5, 2023

@curtiscook still planning on working on this?

@curtiscook
Copy link
Contributor Author

@curtiscook still planning on working on this?

Yes -- still need it, but haven't had any capacity to work on it lately

lifecycle = kube_core.Lifecycle{
PostStart: &kube_core.LifecycleHandler{
Exec: &kube_core.ExecAction{
Command: []string{"command goes here"},
Copy link
Contributor

Choose a reason for hiding this comment

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

@kumahq/kuma-maintainers The question is where should we add a command that is going to check if the sidecar is ready? There is a few options:

  • kumactl - it feels like the right place for checking health but we don't include kumactl binary in kuma-dp image
  • kuma-dp wait - we could include a script that checks if sidecar is ready in kuma-dp
  • script that runs on the container(bash) - might be problematic because we are using light images without most of the additional packages

What are your opinions?

Copy link
Contributor

Choose a reason for hiding this comment

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

I like kuma-dp wait.
The kumactl option would make the container bigger

Copy link
Contributor

Choose a reason for hiding this comment

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

I also prefer kuma-dp wait

@@ -56,6 +56,10 @@ func DefaultKubernetesRuntimeConfig() *KubernetesRuntimeConfig {
Memory: "512Mi",
},
},
LifeCycle: LifeCycleEvents{
// Experimental feature, disabled by default
SidecarInitTimeout: -1,
Copy link
Contributor

Choose a reason for hiding this comment

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

can we use 0 as the default? We treat 0 and -1 the same.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, originally I thought that 0 would be for an infinite timeout instead of disabled. I'll change it

…ecar is ready

Signed-off-by: c <curtis@commonstock.com>
Signed-off-by: c <curtis@commonstock.com>
Signed-off-by: c <curtis@commonstock.com>
Signed-off-by: c <curtis@commonstock.com>
Signed-off-by: c <curtis@commonstock.com>
@michaelbeaumont michaelbeaumont changed the title [WIP] [DRAFT] feature: add configuration to hold application launch until after sid… feat(k8s): add configuration to hold application launch until after sidecar is ready May 4, 2023
@curtiscook curtiscook closed this Jul 24, 2023
@curtiscook curtiscook deleted the c/wait branch July 24, 2023 17:20
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.

None yet

5 participants