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

Service deleted in a scale down operation #101

Closed
marceloneppel opened this issue Jun 24, 2024 · 1 comment
Closed

Service deleted in a scale down operation #101

marceloneppel opened this issue Jun 24, 2024 · 1 comment

Comments

@marceloneppel
Copy link
Member

marceloneppel commented Jun 24, 2024

Bug Description

Using the latest kubernetes_service_patch LIBPATCH, the main charm service is deleted in a scale down operation.

To Reproduce

  1. git clone https://github.com/marceloneppel/service-removal-test-operator
  2. cd service-removal-test-operator
  3. charmcraft pack
  4. juju deploy ./*.charm --resource some-container-image=ubuntu/nginx -n 2 --trust
  5. kubectl get svc -n dev
NAME                                      TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)     AGE
modeloperator                             ClusterIP   10.152.183.182   <none>        17071/TCP   88s
service-removal-test-operator             ClusterIP   10.152.183.170   <none>        65535/TCP   10s
service-removal-test-operator-endpoints   ClusterIP   None             <none>        <none>      9s
  1. juju scale-application service-removal-test-operator 1
  2. kubectl get svc -n dev
NAME                                      TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)     AGE
modeloperator                             ClusterIP   10.152.183.182   <none>        17071/TCP   2m6s
service-removal-test-operator-endpoints   ClusterIP   None             <none>        <none>      47s

Environment

Juju is being executed in an AWS EC2 VM (Ununtu 24.04)
A local charm is being used.
Juju version (both CLI and agent): 3.5.1
Microk8s: v1.30.0 (strict)

Relevant log output

unit-service-removal-test-operator-1: 12:41:51 INFO unit.service-removal-test-operator/1.juju-log HTTP Request: DELETE https://10.152.183.1/api/v1/namespaces/dev/services/service-removal-test-operator "HTTP/1.1 200 OK"

Additional context

No response

@lucabello
Copy link
Contributor

I believe that KubernetesServicePatch is meant to be (or should be) deprecated.

You should probably use self.unit.set_ports() instead.

@lucabello lucabello closed this as not planned Won't fix, can't repro, duplicate, stale Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants