mittwald / harbor-operator

A Kubernetes operator for managing goharbor instances
Apache License 2.0
20 stars 4 forks source link

Operator fails to find "harbor" named instance resources #100

Open Hell-Fire opened 2 years ago

Hell-Fire commented 2 years ago

If you create an instance called "harbor", the harbor helm chart drops the "$RELEASENAME-harbor" behaviour for naming, and instead just uses the release name, so resources end up being "harbor-core" instead of "harbor-harbor-core".

Deploying the operator by chart, relevant values.yaml passed to the operator:

    instances:
    - name: harbor
      type: manual
      helmChart:
        release: harbor

I'm not sure this should actually be fixed/worked around by the operator, since the upstream chart is the one causing the behaviour, but it might be unlikely to change upstream as the logic on the name calculation is non-trivial. The upstream chart does offer overrides to that logic there (fullnameOverride, nameOverride), so perhaps it's worth using those to enforce what the operator installs ends up at names that the api_client.go library is expecting it to be.

Kubernetes Server version: v1.24.3+k3s1

Hell-Fire commented 2 years ago

Ahh, ignore the helmChart part in my example, it doesn't get used in the operator helm chart, but instance name does.