cloudflare / cloudflare-ingress-controller

A Kubernetes ingress controller for Cloudflare's Argo Tunnels
Apache License 2.0
364 stars 55 forks source link

Rolling-update without load balancer possible? #165

Closed acrogenesis closed 5 years ago

acrogenesis commented 5 years ago

I know we can't have several replicas without using Load Balancers but can we do rolling updates?

spec:
  replicas: 1
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 0
      maxSurge: 1

So what happens is the new pod starts and is running and the old pod terminates until the readiness probe is finished. Will argo-tunnel update it's reference accordingly? And not have trouble?

Thanks

mattalberts commented 5 years ago

Depending on timing of both the rolling update and repair delay, there will be 2 pods, mirroring the >1 replica situation. You may see a brief blip of repairs before the sign TERM is handled. If the repair delay is configured too tightly, rate limiting might be triggered.

Though, keep in mind, it is not a situation of updating references. Terminating the original pod will trigger tunnel tear down; launch a new pod will trigger tunnel creation. Tunnels are replaced (which may also lead to a window when origins are not reachable).

My advice is to test your specific configuration inside a rolling update, observe the behavior, and determine if it is acceptable for your workflow. If this is a production workflow, a load-balancer is advised, which allowing both versions to coexist and seamlessly transition.