DEVmachine-fr / cert-manager-alidns-webhook

Cert-manager webhook to generate Let's Encrypt certificates over Alibaba Cloud DNS.
Apache License 2.0
98 stars 31 forks source link

k8s api-server groupName failed to download v1alpha1.acme.allshare.ltd: resource not found #26

Closed xiaoxuanyo closed 3 months ago

xiaoxuanyo commented 3 months ago

alidns-webhook apiservice status:

Name:         v1alpha1.acme.allshare.ltd
Namespace:    
Labels:       app=alidns-webhook
              app.kubernetes.io/managed-by=Helm
              chart=alidns-webhook-0.7.0
              heritage=Helm
              release=alidns-webhook
Annotations:  cert-manager.io/inject-ca-from: cert-manager/alidns-webhook-webhook-tls
              meta.helm.sh/release-name: alidns-webhook
              meta.helm.sh/release-namespace: cert-manager
API Version:  apiregistration.k8s.io/v1
Kind:         APIService
Metadata:
  Creation Timestamp:  2024-05-16T17:27:23Z
  Resource Version:    8947531
  UID:                 d5ae6ec6-0fca-4eb7-813e-657510e92214
Spec:
  Ca Bundle:               xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  Group:                   acme.allshare.ltd
  Group Priority Minimum:  1000
  Service:
    Name:            alidns-webhook
    Namespace:       cert-manager
    Port:            443
  Version:           v1alpha1
  Version Priority:  15
Status:
  Conditions:
    Last Transition Time:  2024-05-16T17:27:51Z
    Message:               all checks passed
    Reason:                Passed
    Status:                True
    Type:                  Available
Events:                    <none>

BUT apiserver is wrong

E0516 17:42:54.450064       1 controller.go:146] Error updating APIService "v1alpha1.acme.allshare.ltd" with err: failed to download v1alpha1.acme.allshare.ltd: resource not found
E0516 17:42:55.452499       1 controller.go:102] loading OpenAPI spec for "v1alpha1.acme.allshare.ltd" failed with: failed to download v1alpha1.acme.allshare.ltd: resource not found
I0516 17:42:55.452524       1 controller.go:109] OpenAPI AggregationController: action for item v1alpha1.acme.allshare.ltd: Rate Limited Requeue.
E0516 17:43:55.463326       1 controller.go:102] loading OpenAPI spec for "v1alpha1.acme.allshare.ltd" failed with: failed to download v1alpha1.acme.allshare.ltd: resource not found
I0516 17:43:55.463347       1 controller.go:109] OpenAPI AggregationController: action for item v1alpha1.acme.allshare.ltd: Rate Limited Requeue.
E0516 17:45:55.465650       1 controller.go:102] loading OpenAPI spec for "v1alpha1.acme.allshare.ltd" failed with: failed to download v1alpha1.acme.allshare.ltd: resource not found
I0516 17:45:55.465667       1 controller.go:109] OpenAPI AggregationController: action for item v1alpha1.acme.allshare.ltd: Rate Limited Requeue.
E0516 17:47:54.519448       1 controller.go:146] Error updating APIService "v1alpha1.acme.allshare.ltd" with err: failed to download v1alpha1.acme.allshare.ltd: resource not found
E0516 17:47:55.521869       1 controller.go:102] loading OpenAPI spec for "v1alpha1.acme.allshare.ltd" failed with: failed to download v1alpha1.acme.allshare.ltd: resource not found
I0516 17:47:55.521886       1 controller.go:109] OpenAPI AggregationController: action for item v1alpha1.acme.allshare.ltd: Rate Limited Requeue.
E0516 17:48:55.524804       1 controller.go:102] loading OpenAPI spec for "v1alpha1.acme.allshare.ltd" failed with: failed to download v1alpha1.acme.allshare.ltd: resource not found
I0516 17:48:55.524825       1 controller.go:109] OpenAPI AggregationController: action for item v1alpha1.acme.allshare.ltd: Rate Limited Requeue.
E0516 17:50:55.527847       1 controller.go:102] loading OpenAPI spec for "v1alpha1.acme.allshare.ltd" failed with: failed to download v1alpha1.acme.allshare.ltd: resource not found
I0516 17:50:55.527866       1 controller.go:109] OpenAPI AggregationController: action for item v1alpha1.acme.allshare.ltd: Rate Limited Requeue.

alidns-webhook-pod log:

I0516 17:27:49.837231       1 requestheader_controller.go:169] Starting RequestHeaderAuthRequestController
I0516 17:27:49.837296       1 shared_informer.go:240] Waiting for caches to sync for RequestHeaderAuthRequestController
I0516 17:27:49.837331       1 configmap_cafile_content.go:202] Starting client-ca::kube-system::extension-apiserver-authentication::client-ca-file
I0516 17:27:49.837339       1 shared_informer.go:240] Waiting for caches to sync for client-ca::kube-system::extension-apiserver-authentication::client-ca-file
I0516 17:27:49.837358       1 configmap_cafile_content.go:202] Starting client-ca::kube-system::extension-apiserver-authentication::requestheader-client-ca-file
I0516 17:27:49.837363       1 shared_informer.go:240] Waiting for caches to sync for client-ca::kube-system::extension-apiserver-authentication::requestheader-client-ca-file
I0516 17:27:49.838014       1 secure_serving.go:197] Serving securely on [::]:443
I0516 17:27:49.838234       1 dynamic_serving_content.go:130] Starting serving-cert::/tls/tls.crt::/tls/tls.key
I0516 17:27:49.838265       1 tlsconfig.go:240] Starting DynamicServingCertificateController
I0516 17:27:49.939226       1 shared_informer.go:247] Caches are synced for client-ca::kube-system::extension-apiserver-authentication::requestheader-client-ca-file 
I0516 17:27:50.037627       1 shared_informer.go:247] Caches are synced for RequestHeaderAuthRequestController 
I0516 17:27:50.037715       1 shared_informer.go:247] Caches are synced for client-ca::kube-system::extension-apiserver-authentication::client-ca-file

HOW TO FIX IT

olivierboudet commented 3 months ago

hello, which version of k8s are you using ?

xiaoxuanyo commented 3 months ago

hello, which version of k8s are you using ?

hello, version is v1.29.4

olivierboudet commented 3 months ago

I just built a tag 0.3.0 with upgraded cert-manager & k8s deps, perhaps you could give it a try ?

xiaoxuanyo commented 3 months ago

I just built a tag 0.3.0 with upgraded cert-manager & k8s deps, perhaps you could give it a try ?

ok, it works well, thanks

xiaoxuanyo commented 3 months ago

fixed