borchero / switchboard

Kubernetes Operator for Automatically Issuing DNS Records and TLS Certificates for Traefik Ingress Routes.
MIT License
155 stars 16 forks source link

failed to upsert TLS certificate #84

Closed th0th closed 1 year ago

th0th commented 1 year ago

Greetings Oliver, first of all, thanks for making switchboard! ๐Ÿ’

I have installed 0.5.7 with this config:

integrations:
  certManager:
    certificateTemplate:
      spec:
        issuerRef:
          kind: ClusterIssuer
          name: letsencrypt-prod
    enabled: true
  externalDNS:
    enabled: true
    targetService:
      name: traefik
      namespace: kube-system

However, I see entries like this for all the IngressRoutes.

2023-03-05T02:23:45.692Z    ERROR   failed to upsert resource   {"name": "*/rest-api", "integration": "cert-manager", "error": "failed to upsert TLS certificate: admission webhook \"webhook.cert-manager.io\" denied the request: spec.issuerRef.name: Required value: must be specified"}

I also tried going with certificateIssuer.create=true but it resulted in the same error, as well.

After struggling for a long time (this struggle includes giving0.5.6 a go, too), I tried installing 0.5.5 and everything seems to be working now.

P.S. I looked for the sponsor button on the repo, but no luck. Not something big but I would like to contribute <3

borchero commented 1 year ago

Sorry for the inconvenience @th0th , v0.5.8 should fix this!

I looked for the sponsor button on the repo, but no luck. Not something big but I would like to contribute <3.

I added sponsorship information to the repo, highly appreciate it! ๐Ÿ™๐Ÿผ

garettmd commented 1 year ago

I'm using 0.5.8, but I'm getting a similar error when trying to upsert existing certs, but this time on spec.secretName

"failed to upsert TLS certificate: admission webhook \"webhook.cert-manager.io\" denied the request: spec.secretName: Required value: must be specified"}

My ingressRoutes are using spec.tls.secretName, has the API changed (I just upgraded from an older version of switchboard)?

borchero commented 1 year ago

@garettmd I can't reproduce this failure, unfortunately. I added a test case in #97 to catch these issues but everything works as expected.

The API for using cert-manager changed between v0.4 and v0.5 but this only affects the Helm values.

Could you provide more details on your setup maybe?

vandot commented 1 year ago

@borchero for me bumping to 0.5.8 resolved the issue