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

request help: get deprecated warning after upgrade to 1.2.0 #672

Closed
suninuni opened this issue Sep 7, 2021 · 7 comments
Closed

request help: get deprecated warning after upgrade to 1.2.0 #672

suninuni opened this issue Sep 7, 2021 · 7 comments
Assignees
Projects

Comments

@suninuni
Copy link
Contributor

suninuni commented Sep 7, 2021

Issue description

   kubectl get apisixroute -n kube-system         
Warning: apisix.apache.org/v1 ApisixRoute is deprecated
NAME               HOSTS                           URIS     TARGET SERVICE   INGRESS SERVER PORT   TARGET SERVICE   AGE
apisix-dashboard   ["staging-apisix.xxxx.com"]   ["/*"]       

Is that mean the stored version is v1? But the stored version is v2beta1 in crd.

   kubectl get crd apisixroutes.apisix.apache.org -o jsonpath='{.spec.versions[*].name }' -A
v1 v2alpha1 v2beta1%                                                                                     
   kubectl get crd apisixroutes.apisix.apache.org -o jsonpath='{.spec.versions[*].storage }' -A
false false true%                

How can I eliminated this warning and show v2beta1 when edit by kubectl?

Environment

  • your apisix-ingress-controller version (output of apisix-ingress-controller version --long); 1.2.0
  • your Kubernetes cluster version (output of kubectl version); 1.21.0
@suninuni
Copy link
Contributor Author

suninuni commented Sep 7, 2021

Another question, what is the meaning of kubernetes.apisix_route_version in config.yaml? I set it to apisix.apache.org/v2beta1, but I still can create route by v2alpha1 and v2beta1.

@tokers
Copy link
Contributor

tokers commented Sep 7, 2021

kubernetes.apisix_route_version

It means which version of ApisixRoute resources will be watched and handled by APISIX Ingress Controller? It doesn't prevent you from creating these objects.

@suninuni
Copy link
Contributor Author

suninuni commented Sep 8, 2021

kubernetes.apisix_route_version

It means which version of ApisixRoute resources will be watched and handled by APISIX Ingress Controller? It doesn't prevent you from creating these objects.

To handled what?I don't feel any difference between v2alpha1 and v2beta1. Actually in version 1.1.0, when I set kubernetes.apisix_route_version as apisix.apache.org/v2alpha1, I can't create route throw v2beta1. But after upgraded to 1.2.0, they all work well. And I find the reason in changelog.

f78248a fix: sync apisix failed when use v2beta1 ApisixRoute (#620)

Maybe the reason is they all stored as v1?

@tokers
Copy link
Contributor

tokers commented Sep 8, 2021

To handled what?I don't feel any difference between v2alpha1 and v2beta1. Actually in version 1.1.0, when I set kubernetes.apisix_route_version as apisix.apache.org/v2alpha1, I can't create route throw v2beta1. But after upgraded to 1.2.0, they all work well. And I find the reason in changelog.

v2beta1 has some broken changes from v1alpha1, for instance, the tcp field was changed to stream.

As for the v1 version, this is decided by Kubernetes API design, as v1 is a stable version (it's a mistake to use v1 when we designed it in the past) while v2alpha1 and v2beta1 are not.

@suninuni
Copy link
Contributor Author

suninuni commented Sep 9, 2021

As for the v1 version, this is decided by Kubernetes API design, as v1 is a stable version (it's a mistake to use v1 when we designed it in the past) while v2alpha1 and v2beta1 are not.

So this problem will still exist until the v2 version is released?In this way, I can only temporarily modify crd and delete deprecated field.

@tao12345666333 tao12345666333 self-assigned this Sep 9, 2021
@tao12345666333
Copy link
Member

tao12345666333 commented Sep 9, 2021

We plan to release the v2 version of the API in the last two versions (about 2 months).

I will initiate a discussion on the mailing list and GitHub in a while, and I will update the link here later.

update: #707

@tao12345666333
Copy link
Member

In version 1.3, we have adjusted the configuration of CRD resources, and you will no longer see this information.

I will close this issue. Feel free to reopen it, if you have any question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
roadmap
Awaiting triage
Development

No branches or pull requests

3 participants