You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What happened (please include outputs or screenshots):
I have a deployment in GCP in a k8s cluster.
I am trying to remove LivenessProbe, ReadnessProbe && StartupProbe, however the deployment does not get updated at all.
What you expected to happen:
The probes to be removed
How to reproduce it (as minimally and precisely as possible):
@property
def containers(self) -> List[V1Container]:
return self.spec.template.spec.containers
def __validate_prob(self):
for container in self.containers:
if (
container.readiness_probe
or container.startup_probe
or container.liveness_probe
):
container.readiness_probe = None
container.startup_probe = None
container.liveness_probe = None
def update():
with self.kubernetes_service as api_client:
api_instance = kubernetes.client.AppsV1Api(api_client)
api_instance.patch_namespaced_deployment(
name=self.name,
namespace=self.namespace,
body=self.deployment,
_request_timeout=self.kubernetes_service.timeout,
)
Assume that self.deployment is the V1Deployment object.
This is code from a class that should remove the probes from the deployment (and does a lot of other stuff), however they are not removed from some reason.
If I try to update an image or anything else, it works as expected, so it could be a problem specific with probes
Environment:
Kubernetes version (kubectl version):
Client Version: v1.31.3
Kustomize Version: v5.4.2
Server Version: v1.30.8-gke.1051000
OS (e.g., MacOS 10.13.6): mac os 12
Python version (python --version) python 3.12
Python client version (pip list | grep kubernetes) 29.0.0
The text was updated successfully, but these errors were encountered:
@roycaihw Thanks, I have done that and I can see that the probes in the PATCH request do not exist if I remove them manually before sending a body request, yet it still isn't removed from GCP.
I cannot share the body request itself unfortunately.
I do however see that if I do not remove the probes in the code, they are NOT sent in the body request,
however when I do remove it I can see the body request sent is being sent without the probes.
I am doing PATCH /apis/apps/v1/namespaces/<namespace>/deployments/<deployment>
What happened (please include outputs or screenshots):
I have a deployment in GCP in a k8s cluster.
I am trying to remove
LivenessProbe
,ReadnessProbe
&&StartupProbe
, however the deployment does not get updated at all.What you expected to happen:
The probes to be removed
How to reproduce it (as minimally and precisely as possible):
V1Deployment
object.Environment:
kubectl version
):python --version
) python 3.12pip list | grep kubernetes
) 29.0.0The text was updated successfully, but these errors were encountered: