hcloud-cloud-controller-manager icon indicating copy to clipboard operation
hcloud-cloud-controller-manager copied to clipboard

feat(load-balancer): Different health check options per service/port

Open DarkZatarra opened this issue 1 year ago • 4 comments

We have the following code:

kind: Service
metadata:
  name: abcd-com
  namespace: abcd-prod
  annotations:
    load-balancer.hetzner.cloud/name: "farm-waf-razdon-com"
    load-balancer.hetzner.cloud/location: fsn1
    load-balancer.hetzner.cloud/protocol: "tcp"
    load-balancer.hetzner.cloud/uses-proxyprotocol: "true"
    load-balancer.hetzner.cloud/use-private-ip: "true"
    load-balancer.hetzner.cloud/disable-public-network: "false"
    load-balancer.hetzner.cloud/health-check-protocol: "http"
    load-balancer.hetzner.cloud/health-check-http-validate-certificate: "true"
    load-balancer.hetzner.cloud/health-check-http-domain: "abcd.com"
    load-balancer.hetzner.cloud/health-check-http-path: "/hcheck"
spec:
  selector:
    app: abcd-com
  ports:
    - port: 443
      targetPort: 443
      name: "https"
    - port: 80
      targetPort: 80
      name: "http"
  type: LoadBalancer

And we want to have the possibility to run a check on http without validate-certificate and a check on https with validate-certificate. We tried the following:

kind: Service
metadata:
  name: abcd-com
  namespace: abcd-prod
  annotations:
    load-balancer.hetzner.cloud/name: "farm-waf-razdon-com"
    load-balancer.hetzner.cloud/location: fsn1
    load-balancer.hetzner.cloud/protocol: "tcp"
    load-balancer.hetzner.cloud/uses-proxyprotocol: "true"
    load-balancer.hetzner.cloud/use-private-ip: "true"
    load-balancer.hetzner.cloud/disable-public-network: "false"
    load-balancer.hetzner.cloud/health-check-protocol-443: "https"
    load-balancer.hetzner.cloud/health-check-http-validate-certificate-443: "true"
    load-balancer.hetzner.cloud/health-check-http-domain-443: "abcd.com"
    load-balancer.hetzner.cloud/health-check-http-path-443: "/hcheck"
    load-balancer.hetzner.cloud/health-check-protocol-80: "http"
    load-balancer.hetzner.cloud/health-check-http-validate-certificate-80: "false"
    load-balancer.hetzner.cloud/health-check-http-domain-80: "abcd.com"
    load-balancer.hetzner.cloud/health-check-http-path-80: "/hcheck"
spec:
  selector:
    app: abcd-com
  ports:
    - port: 443
      targetPort: 443
      name: "https"
    - port: 80
      targetPort: 80
      name: "http"
  type: LoadBalancer

But it's seems it's not supported.

There real question is how can we control the healthcheck options per port?

Thanks!

P.S. in first code quote the health-check-protocol set to https gives error - that's why we've set it to http

DarkZatarra avatar Mar 24 '23 13:03 DarkZatarra

#324 seems somewhat related to this: making it possible to more finely tune the healthcheck configuration.

samcday avatar Apr 17 '23 10:04 samcday

This issue has been marked as stale because it has not had recent activity. The bot will close the issue if no further action occurs.

github-actions[bot] avatar Jun 16 '23 12:06 github-actions[bot]

This issue has been marked as stale because it has not had recent activity. The bot will close the issue if no further action occurs.

github-actions[bot] avatar Aug 16 '23 12:08 github-actions[bot]

This issue has been marked as stale because it has not had recent activity. The bot will close the issue if no further action occurs.

github-actions[bot] avatar Nov 15 '23 12:11 github-actions[bot]