Skip to content

CCM does not claim already created load balancer #1169

@usernamenenad

Description

@usernamenenad

TL;DR

CCM config

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: hcloud-ccm
  namespace: argocd
  annotations:
    argocd.argoproj.io/sync-wave: "0"
spec:
  project: default
  source:
    repoURL: https://charts.hetzner.cloud
    chart: hcloud-cloud-controller-manager
    targetRevision: 1.23.0
    helm:
      values: |
        networking:
          enabled: true
          clusterCIDR: "10.42.0.0/16"
        env:
          HCLOUD_TOKEN:
            valueFrom:
              secretKeyRef:
                name: hcloud
                key: token
  destination:
    server: https://kubernetes.default.svc
    namespace: kube-system
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
      - CreateNamespace=true

Istio Gateway

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: istio-gateway
  namespace: argocd
  annotations:
    argocd.argoproj.io/sync-wave: "3"
spec:
  project: default
  source:
    repoURL: https://istio-release.storage.googleapis.com/charts
    chart: gateway
    targetRevision: 1.22.0
    helm:
      skipSchemaValidation: true
      values: |
        service:
          annotations:
            load-balancer.hetzner.cloud/id: "5896630"
            load-balancer.hetzner.cloud/location: "nbg1"
            load-balancer.hetzner.cloud/use-private-ip: "true"
            load-balancer.hetzner.cloud/health-check-port: "15021"
            load-balancer.hetzner.cloud/health-check-protocol: "tcp"
        nodeSelector:
          node-role.kubernetes.io/control-plane: "true"
  destination:
    server: https://kubernetes.default.svc
    namespace: istio-system
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
      - CreateNamespace=true

Even with annotating Gateway resource as load-balancer.hetzner.cloud/id: "5896630", it did not work.

Expected behavior

When a Istio Gateway resource is annotated with load-balancer.hetzner.cloud/id: "5896630", CCM should automatically pick it up and not try to create a new LoadBalancer.

Observed behavior

CCM tried to create a new load balancer.

Minimal working example

No response

Log output


Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions