Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not compatible with k8s > 1.22 #389

Closed
jiangpengcheng opened this issue Jun 10, 2022 · 4 comments · Fixed by #398
Closed

not compatible with k8s > 1.22 #389

jiangpengcheng opened this issue Jun 10, 2022 · 4 comments · Fixed by #398

Comments

@jiangpengcheng
Copy link
Member

Reproduce:

  1. use kind install k8s >= 1.22

    kind create cluster --image kindest/node:v1.22.0
    
  2. Run function-mesh:

    make generate
    make install
    make run
    

expected results:

function-mesh run successfully

Actual results:

run is failed with below error:

E0610 17:09:52.868894 1962553 reflector.go:178] pkg/mod/k8s.io/client-go@v0.18.6/tools/cache/reflector.go:125: Failed to list *v1alpha1.Function: Internal error occurred: error resolving resource
E0610 17:09:52.909429 1962553 reflector.go:178] pkg/mod/k8s.io/client-go@v0.18.6/tools/cache/reflector.go:125: Failed to list *v1alpha1.Sink: Internal error occurred: error resolving resource
E0610 17:09:53.021113 1962553 reflector.go:178] pkg/mod/k8s.io/client-go@v0.18.6/tools/cache/reflector.go:125: Failed to list *v1alpha1.FunctionMesh: Internal error occurred: error resolving resource
E0610 17:09:53.062853 1962553 reflector.go:178] pkg/mod/k8s.io/client-go@v0.18.6/tools/cache/reflector.go:125: Failed to list *v1alpha1.Source: Internal error occurred: error resolving resource

found a similar issue in: kubernetes-sigs/hierarchical-namespaces#86

@jiangpengcheng
Copy link
Member Author

it turned out to be caused by the invalid content of the caBundle field:

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: functionmeshes.compute.functionmesh.io
spec:
  conversion:
    strategy: Webhook
    webhook:
      conversionReviewVersions:
        - v1
        - v1beta1
      clientConfig:
      # this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank,
      # but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager)
        caBundle: Cg==
        service:
          namespace: system
          name: webhook-service
          path: /convert
          port: 443 # added this, used 443 bc it's the default from the k8s docs

And seems we don't use these webhook patches in the charts/function-mesh-operator/ directory, maybe we can remove them?

@freeznet
Copy link
Member

@tpiperatgod could you please check pengcheng's comments?

@tpiperatgod
Copy link
Contributor

I agree with @jiangpengcheng , because the functionmeshes cr does not use webhook.

@ilko-rbi
Copy link

and I can confirm that after removing the webhook definitions it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants