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

CustomResourceDefinitionsOperationsImpl uses v1beta1 API instead of v1 #2287

Closed
coopstah13 opened this issue Jun 15, 2020 · 4 comments · Fixed by #2359
Closed

CustomResourceDefinitionsOperationsImpl uses v1beta1 API instead of v1 #2287

coopstah13 opened this issue Jun 15, 2020 · 4 comments · Fixed by #2359
Assignees

Comments

@coopstah13
Copy link
Contributor

  public CustomResourceDefinitionOperationsImpl(OperationContext context) {
    super(context.withApiGroupName("apiextensions.k8s.io")
      .withApiGroupVersion("v1beta1")
      .withPlural("customresourcedefinitions"));
    this.type = CustomResourceDefinition.class;
    this.listType = CustomResourceDefinitionList.class;
    this.doneableType = DoneableCustomResourceDefinition.class;
  }

Would be good for this to use the non-beta API. This would require the client drop support for < 1.16 of k8s unless it is possible to let the fluent builders support both versions of the API.

@rohanKanojia
Copy link
Member

If we just modify exiting CustomResourceDefinition to use v1, someone may report issue that we dropped v1beta1 CustomResourceDefinition

Hmm, I'm thinking of adding an additional DSL endpoint apiextensions().
Then you could be able to use it like this:

   // For apiextensions/v1
   client.apiextensions().customResourceDefinitions().v1().createOrReplace(crdV1);
   // For apiextensions/v1beta1
   client.apiextensions().customResourceDefinitions().v1beta1().createOrReplace(crdV1beta1)

@coopstah13
Copy link
Contributor Author

That looks good to me, but i might suggest that the default for .customResourceDefinitions() would be to use the v1?

@rohanKanojia
Copy link
Member

Hmm, okay. we can modify old api entrypoint to use apiextensions/v1

@coopstah13
Copy link
Contributor Author

i meant for the new apiextensions() based one, sorry!

@rohanKanojia rohanKanojia self-assigned this Jul 16, 2020
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Jul 16, 2020
…nition

Introduced a new api entrypoint called `client.apiextensions()` which would
route to `apiextensions/v1` and `apiextensions/v1beta1` CustomResourceDefinitions
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Jul 17, 2020
…nition

Introduced a new api entrypoint called `client.apiextensions()` which would
route to `apiextensions/v1` and `apiextensions/v1beta1` CustomResourceDefinitions
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Jul 17, 2020
…nition

Introduced a new api entrypoint called `client.apiextensions()` which would
route to `apiextensions/v1` and `apiextensions/v1beta1` CustomResourceDefinitions
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Jul 17, 2020
…nition

Introduced a new api entrypoint called `client.apiextensions()` which would
route to `apiextensions/v1` and `apiextensions/v1beta1` CustomResourceDefinitions
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Jul 17, 2020
…nition

Introduced a new api entrypoint called `client.apiextensions()` which would
route to `apiextensions/v1` and `apiextensions/v1beta1` CustomResourceDefinitions
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.

3 participants