Skip to content

Should i run and how should i run the prestop hook in a k8s environment #2511

@david-gang

Description

@david-gang

Question

At

we have an example of

        lifecycle:
          preStop:
            httpGet:
              path: /quitquitquit
              port: 9092
              scheme: HTTP

but there exist a problem. In order that this hook should be accessible to kubelet it should listen to 0.0.0.0

if i use this example i get a Warning FailedPreStopHook event.

The reason is simple while it is possible to override

- name: CSQL_PROXY_HTTP_ADDRESS
  value: 0.0.0.0

the address of the admin server is hard coded as localhost and inaccessible to kubelet

net.JoinHostPort("localhost", cmd.conf.AdminPort),

so either it is not important to call the prestop hook or we need another way calling it but i have no idea how.

Code

Additional Details

No response

Metadata

Metadata

Assignees

Labels

type: questionRequest for information or clarification.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions