kontena / akrobateo

Akrobateo is a simple Kubernetes operator to expose in-cluster LoadBalancer services as node hostPorts using DaemonSets.
Apache License 2.0
110 stars 15 forks source link

Daemonset Not Deleted #24

Open infinitydon opened 5 years ago

infinitydon commented 5 years ago

Hello,

I noticed that If the service type is changed back to NodePort, the load balancer Daemonset is not deleted.

jnummelin commented 5 years ago

Indeed. Now the operator ignores every change on a service which is not a type: LoadBalancer.

infinitydon commented 5 years ago

Is this meant to fix the bug?

I just tested with the echoserver deployment example, changed the svc type to NodePort but the DS stil remains.

Name:                     echoserver
Namespace:                default
Labels:                   <none>
Annotations:              kubectl.kubernetes.io/last-applied-configuration:
                            {"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"name":"echoserver","namespace":"default"},"spec":{"ports":[{"name":"echo...
Selector:                 app=echoserver
Type:                     NodePort
IP:                       10.233.45.107
Port:                     echo  8080/TCP
TargetPort:               8080/TCP
NodePort:                 echo  30078/TCP
Endpoints:                10.233.66.127:8080
Port:                     echo2  9090/TCP
TargetPort:               8080/TCP
NodePort:                 echo2  31951/TCP
Endpoints:                10.233.66.127:8080
Session Affinity:         None
External Traffic Policy:  Cluster
Events:
  Type    Reason  Age   From                Message
  ----    ------  ----  ----                -------
  Normal  Type    2m    service-controller  LoadBalancer -> NodePort
jnummelin commented 5 years ago

There's no fix yet for this. I haven't had yet time to looks at how to do this properly.