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

No matches for kind "MultiCasskop" in version "multicasskops.db.orange.com/v2" #123

Closed
Subetov opened this issue Aug 2, 2023 · 27 comments · Fixed by #131
Closed

No matches for kind "MultiCasskop" in version "multicasskops.db.orange.com/v2" #123

Subetov opened this issue Aug 2, 2023 · 27 comments · Fixed by #131

Comments

@Subetov
Copy link

Subetov commented Aug 2, 2023

Bug Report

What did you do?
helm install multi-casskop oci://ghcr.io/cscetbon/multi-casskop-helm

What did you expect to see?
multi-casskop up and running

What did you see instead? Under which circumstances?
Crashloopback with error:
creating Cassandra Multi Cluster controller: setting up MultiCasskop watch in Cluster dc1 Cluster: no matches for kind "MultiCasskop" in version "multicasskops.db.orange.com/v2"

Environment

  • casskop version:

2.1.17

  • Kubernetes version information:

v1.27.3

k api-versions | grep orange

db.orange.com/v1
db.orange.com/v1alpha1
db.orange.com/v2

k api-resources | grep orange

cassandrabackups                               db.orange.com/v2                       true         CassandraBackup
cassandraclusters                              db.orange.com/v2                       true         CassandraCluster
cassandrarestores                              db.orange.com/v2                       true         CassandraRestore
multicasskops                                  db.orange.com/v2                       true         MultiCasskop

k get crd multicasskops.db.orange.com -o yaml

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  creationTimestamp: "2023-08-02T13:48:08Z"
  generation: 1
  name: multicasskops.db.orange.com
  resourceVersion: "14831"
  uid: 9f43d154-3e16-47c7-91c7-d1bba77968c1
spec:
  conversion:
    strategy: None
  group: db.orange.com
  names:
    kind: MultiCasskop
    listKind: MultiCasskopList
    plural: multicasskops
    singular: multicasskop
  scope: Namespaced
  versions:
  - name: v1
    schema:
      openAPIV3Schema:
        properties:
          apiVersion:
            type: string
          kind:
            type: string
          metadata:
            type: object
          spec:
            type: object
            x-kubernetes-preserve-unknown-fields: true
          status:
            type: object
            x-kubernetes-preserve-unknown-fields: true
        required:
        - metadata
        - spec
        type: object
    served: true
    storage: false
  - name: v2
    schema:
      openAPIV3Schema:
        properties:
          apiVersion:
            type: string
          kind:
            type: string
          metadata:
            type: object
          spec:
            type: object
            x-kubernetes-preserve-unknown-fields: true
          status:
            type: object
            x-kubernetes-preserve-unknown-fields: true
        required:
        - metadata
        - spec
        type: object
    served: true
    storage: true
status:
  acceptedNames:
    kind: MultiCasskop
    listKind: MultiCasskopList
    plural: multicasskops
    singular: multicasskop
  conditions:
  - lastTransitionTime: "2023-08-02T13:48:08Z"
    message: no conflicts found
    reason: NoConflicts
    status: "True"
    type: NamesAccepted
  - lastTransitionTime: "2023-08-02T13:48:08Z"
    message: the initial names have been accepted
    reason: InitialNamesAccepted
    status: "True"
    type: Established
  storedVersions:
  - v2
@cscetbon
Copy link
Owner

@Subetov you didn't specify any local and remote clusters, see https://cscetbon.github.io/casskop/docs/setup/multi_casskop

@Subetov
Copy link
Author

Subetov commented Aug 18, 2023

I testes that with one (this case worked perfectly with 2.0.3 ) and two clusters, got the same errors =(
I can't figure out why this error occurs, since all the CRDs are in place and have version 2, as you can see from the output of the commands above.

The error concerns the first (local) cluster.

@cscetbon
Copy link
Owner

Can you try different version starting from 2.0.4 and tell us when it starts to fail ? and you're saying 2.0.3 with the exact k8s version works, correct ?

@cscetbon
Copy link
Owner

Even better @Subetov can you try to install casskop and multi-casskop but using our master tag instead

helm install  multi-casskop oci://ghcr.io/cscetbon/multi-casskop-helm --set image.tag=master

It would confirm that create a new release would fix your issue.

@Subetov
Copy link
Author

Subetov commented Aug 21, 2023

Got the same result with ghcr.io/cscetbon/multi-casskop:master image =(

I0821 08:50:14.205969       1 request.go:665] Waited for 1.027928731s due to client-side throttling, not priority and fairness, request: GET:https://10.99.20.1:443/apis/snapshot.storage.k8s.io/v1beta1?timeout=32s
2023/08/21 08:50:14 creating Cassandra Multi Cluster controller: setting up MultiCasskop watch in Cluster dc1 Cluster: no matches for kind "MultiCasskop" in version "multicasskops.db.orange.com/v2"

@cscetbon
Copy link
Owner

Sorry I was confused by another PR. Here the issue is not the image but the CRDs. But it doesn't make sense as they are present in your output. It seems to be an issue with your cluster dc1 but not sure what's going on. Are you sure you're connected to the right cluster ? Can you describe step by step what you're doing to set it up ?

@Subetov
Copy link
Author

Subetov commented Aug 23, 2023

Just trying to deploy multi-casskop.
helm upgrade -i multi-casskop oci://ghcr.io/cscetbon/multi-casskop-helm --set k8s.local=k8s-cluster1 --set-json k8s.remote={} -n cassandra --create-namespace

This works perfectly with 2.0.3 multi-casskop operator for us.
It makes no difference whether I specify a remote cluster or leave the list empty. The operator cannot find the CRD (locally)

time="2023-08-23T05:59:17Z" level=info msg="Go Version: go1.19.10"
time="2023-08-23T05:59:17Z" level=info msg="Go OS/Arch: linux/amd64"
time="2023-08-23T05:59:17Z" level=info msg="multi-casskop Version: "
time="2023-08-23T05:59:17Z" level=info msg="multi-casskop Compilation Date: "
time="2023-08-23T05:59:17Z" level=info msg="Configuring Client for local cluster k8s-cluster1. using local k8s api access"
time="2023-08-23T05:59:17Z" level=info msg="Creating Controller"
time="2023-08-23T05:59:17Z" level=info msg="Create Client for local Cluster k8s-cluster1"
time="2023-08-23T05:59:17Z" level=info msg="Add CRDs to Cluster k8s-cluster1 Scheme"
time="2023-08-23T05:59:17Z" level=info msg="Configuring Watch for MultiCasskop on local"
2023/08/23 05:59:17 creating Cassandra Multi Cluster controller: setting up MultiCasskop watch in Cluster k8s-cluster1 Cluster: no matches for kind "MultiCasskop" in version "multicasskops.db.orange.com/v2"

@cscetbon
Copy link
Owner

Can you try the same but testing using installing the helm chart from the repo itself ?
Take a look at how we do it in our e2e GitHub workflow

@Subetov
Copy link
Author

Subetov commented Aug 26, 2023

Can you try the same but testing using installing the helm chart from the repo itself ? Take a look at how we do it in our e2e GitHub workflow

Do you mean just to install charts from these folders from master branch ?

@cscetbon
Copy link
Owner

Can you try the same but testing using installing the helm chart from the repo itself ? Take a look at how we do it in our e2e GitHub workflow

Do you mean just to install charts from these folders from master branch ?

Yes. I wanna see if it's something that has been fixed and not delivered or not before I test it myself

@cscetbon
Copy link
Owner

cscetbon commented Sep 1, 2023

@Subetov any news ?

@Subetov
Copy link
Author

Subetov commented Sep 2, 2023

Got the same results =(
(Had to use --set image.tag=master)

@cscetbon
Copy link
Owner

cscetbon commented Sep 3, 2023

Annoying ... @AKamyshnikova do you use multi-casskop ? I wonder what could be the issue here and if we broke something or if it's a permission issue somehow ...

@AKamyshnikova
Copy link
Collaborator

@cscetbon I didn't use multi-casskop - I cheked its CRD and looked wrong version and versions fields https://github.com/cscetbon/casskop/blob/master/multi-casskop/config/crd/bases/multicasskops.db.orange.com_multicasskops.yaml#L15-L16
Seems it is not generated by controller-gen. Guess this is by design.

@Subetov General concern about kubernetes v1.27.3 - you checked 2.0.3 with v1.27.3 or early kubernetes versions?

AKamyshnikova added a commit to AKamyshnikova/casskop that referenced this issue Sep 4, 2023
@Subetov
Copy link
Author

Subetov commented Sep 4, 2023

@cscetbon I didn't use multi-casskop - I cheked its CRD and looked wrong version and versions fields https://github.com/cscetbon/casskop/blob/master/multi-casskop/config/crd/bases/multicasskops.db.orange.com_multicasskops.yaml#L15-L16 Seems it is not generated by controller-gen. Guess this is by design.

@Subetov General concern about kubernetes v1.27.3 - you checked 2.0.3 with v1.27.3 or early kubernetes versions?

Server Version: version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.3+k3s1", GitCommit:"fe9604cac119216e67f8bd5f14eb5608e3bcd3cf", GitTreeState:"clean", BuildDate:"2023-06-26T16:49:54Z", GoVersion:"go1.20.5", Compiler:"gc", Platform:"linux/amd64"}

Haven't tested with older versions.

@cscetbon
Copy link
Owner

cscetbon commented Sep 5, 2023

@cscetbon I didn't use multi-casskop - I cheked its CRD and looked wrong version and versions fields https://github.com/cscetbon/casskop/blob/master/multi-casskop/config/crd/bases/multicasskops.db.orange.com_multicasskops.yaml#L15-L16 Seems it is not generated by controller-gen. Guess this is by design.

It's supposed to be generated using https://github.com/cscetbon/casskop/blob/master/multi-casskop/Makefile#L61-L66

@cscetbon
Copy link
Owner

cscetbon commented Sep 13, 2023

Does it relate to issue #125 @AKamyshnikova in any way ?

@Subetov
Copy link
Author

Subetov commented Sep 27, 2023

Have tried 1.19.2 - got the same result =(

│ time="2023-09-27T13:32:30Z" level=info msg="Go Version: go1.19.13"                                                                                                                                                                                                           
│ time="2023-09-27T13:32:30Z" level=info msg="Go OS/Arch: linux/amd64"                                                                                                                                                                                                         
│ time="2023-09-27T13:32:30Z" level=info msg="multi-casskop Version: "                                                                                                                                                                                                         
│ time="2023-09-27T13:32:30Z" level=info msg="multi-casskop Compilation Date: "                                                                                                                                                                                                
│ time="2023-09-27T13:32:30Z" level=info msg="Configuring Client for local cluster k8s-cluster1. using local k8s api access"
│ time="2023-09-27T13:32:30Z" level=info msg="Creating Controller"                                                                                                                                                                                                             
│ time="2023-09-27T13:32:30Z" level=info msg="Create Client for local Cluster k8s-cluster1"                                                                                                                                                                                    
│ I0927 13:32:31.170235       1 request.go:665] Waited for 1.033160425s due to client-side throttling, not priority and fairness, request: GET:https://10.99.20.1:443/apis/networking.k8s.io/v1?timeout=32s                                                     
│ time="2023-09-27T13:32:31Z" level=info msg="Add CRDs to Cluster k8s-cluster1 Scheme"                                                                                                                                                                                         
│ time="2023-09-27T13:32:31Z" level=info msg="Configuring Watch for MultiCasskop on local"                                                                                                                                                                                     
│ 2023/09/27 13:32:31 creating Cassandra Multi Cluster controller: setting up MultiCasskop watch in Cluster k8s-cluster1 Cluster: no matches for kind "MultiCasskop" in version "multicasskops.db.orange.com/v2"

BTW MultiCasskop CRD is broken, swears at subresources field

@cscetbon
Copy link
Owner

@AKamyshnikova do you have some time to take a look ?

@AKamyshnikova
Copy link
Collaborator

@cscetbon @Subetov Hopefully will be able to dig into this on this week

AKamyshnikova added a commit to AKamyshnikova/casskop that referenced this issue Oct 24, 2023
Also updated setup namespace for casskop(drop depricated usage of
namespace)

Fixes: cscetbon#123
AKamyshnikova added a commit to AKamyshnikova/casskop that referenced this issue Oct 26, 2023
Also updated setup namespace for casskop(drop depricated usage of
namespace)

Fixes: cscetbon#123
@Subetov
Copy link
Author

Subetov commented Oct 31, 2023

@cscetbon @AKamyshnikova Should we expect a new release?

@AKamyshnikova
Copy link
Collaborator

@Subetov Yes, I hope to do it this week.

@Subetov
Copy link
Author

Subetov commented Mar 24, 2024

@cscetbon @AKamyshnikova
Hello guys.
I'm getting the same result =( (multi-casskop-helm:2.1.19)
Don't know how you were able to make it works.
helm upgrade -i multi-casskop oci://ghcr.io/cscetbon/multi-casskop-helm --set k8s.local=k8s-cluster1 --set-json k8s.remote={}
2024/03/24 12:19:06 creating Cassandra Multi Cluster controller: setting up MultiCasskop watch in Cluster k8s-cluster1 Cluster: no matches for kind "MultiCasskop" in version "multicasskops.db.orange.com/v2"

I see that Anna in PR-131 has tested multi-casskop with "image.tag=multi-casskop". Do not know what this tag is, but it doesn't exist.


As I understood docker image does not contain this changes according to the logs.

But of course I could be wrong.
Thank you !


UPD
--set image.tag=master worked for me.
Could you please make ghcr.io/cscetbon/multi-casskop:2.1.19 behaves as ghcr.io/cscetbon/multi-casskop:master ?
It seems to me that the fixes are not included in images with version tags.
Thank you in advance !

@AKamyshnikova
Copy link
Collaborator

@Subetov Please use v2.2.0 release it will contain the fix you've mentioned.

@Subetov
Copy link
Author

Subetov commented Mar 25, 2024

@AKamyshnikova
helm install multi-casskop oci://ghcr.io/cscetbon/multi-casskop-helm --set k8s.local=dc1 --set-json k8s.remote={}
Pulled: ghcr.io/cscetbon/multi-casskop-helm:2.1.19
Seems like 2.1.19 is the latest one in oci://ghcr.io/cscetbon/multi-casskop and casskop repo.

@AKamyshnikova
Copy link
Collaborator

@Subetov I published new https://github.com/cscetbon/casskop/releases/tag/2.2.2 - seems now it is correct:

helm install multi-casskop oci://ghcr.io/cscetbon/multi-casskop-helm --set k8s.local=dc1 --set-json k8s.remote={}
Pulled: ghcr.io/cscetbon/multi-casskop-helm:2.2.2
Digest: sha256:494c872a4524635150d2783c1e08af71091f8cc82cb59165aa0ffdc5792d14bd```

@Subetov
Copy link
Author

Subetov commented Mar 25, 2024

@AKamyshnikova
Thank you !

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

Successfully merging a pull request may close this issue.

3 participants