kubernetes-sigs / gateway-api

Repository for the next iteration of composite service (e.g. Ingress) and load balancing APIs.
https://gateway-api.sigs.k8s.io
Apache License 2.0
1.77k stars 460 forks source link

Guide on how to upgrade the CRD of the experimental channel from v1.0 to v1.1 #3098

Open tao12345666333 opened 4 months ago

tao12345666333 commented 4 months ago

What would you like to be added:

Due to the removal of the v1alpha2 version of backendtlspolicy in CRD version v1.1, this will result in encountering errors during the upgrade.

I hope to add a guide to instruct users on how to solve the problem.

Why this is needed:

(⎈|steep-abyss:default)➜  ~ kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.0.0/experimental-install.yaml                                
customresourcedefinition.apiextensions.k8s.io/backendtlspolicies.gateway.networking.k8s.io created                                                                            
customresourcedefinition.apiextensions.k8s.io/gatewayclasses.gateway.networking.k8s.io created                                                                                
customresourcedefinition.apiextensions.k8s.io/gateways.gateway.networking.k8s.io created                                                                                      
customresourcedefinition.apiextensions.k8s.io/grpcroutes.gateway.networking.k8s.io created                                                                                    
customresourcedefinition.apiextensions.k8s.io/httproutes.gateway.networking.k8s.io created                                                                                    
customresourcedefinition.apiextensions.k8s.io/referencegrants.gateway.networking.k8s.io created                                                                               
customresourcedefinition.apiextensions.k8s.io/tcproutes.gateway.networking.k8s.io created                                                                                     
customresourcedefinition.apiextensions.k8s.io/tlsroutes.gateway.networking.k8s.io created                                                                                     
customresourcedefinition.apiextensions.k8s.io/udproutes.gateway.networking.k8s.io created                                                                                     
(⎈|steep-abyss:default)➜  ~ kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.1.0/experimental-install.yaml 
customresourcedefinition.apiextensions.k8s.io/backendlbpolicies.gateway.networking.k8s.io created
customresourcedefinition.apiextensions.k8s.io/gatewayclasses.gateway.networking.k8s.io configured
customresourcedefinition.apiextensions.k8s.io/gateways.gateway.networking.k8s.io configured
customresourcedefinition.apiextensions.k8s.io/grpcroutes.gateway.networking.k8s.io configured
customresourcedefinition.apiextensions.k8s.io/httproutes.gateway.networking.k8s.io configured
customresourcedefinition.apiextensions.k8s.io/referencegrants.gateway.networking.k8s.io configured
customresourcedefinition.apiextensions.k8s.io/tcproutes.gateway.networking.k8s.io configured
customresourcedefinition.apiextensions.k8s.io/tlsroutes.gateway.networking.k8s.io configured
customresourcedefinition.apiextensions.k8s.io/udproutes.gateway.networking.k8s.io configured
The CustomResourceDefinition "backendtlspolicies.gateway.networking.k8s.io" is invalid: status.storedVersions[0]: Invalid value: "v1alpha2": must appear in spec.versions
          Thanks for reporting this, I definitely get that this behavior is confusing. This is actually intentional though - we made breaking changes (field renames) to BackendTLSPolicy in v1.1. That resulted in us bumping the version to v1alpha3, and dropping v1alpha2 since we do not want to maintain a conversion webhook. I added more information about this transition in https://github.com/kubernetes-sigs/gateway-api/pull/3084.

Originally posted by @robscott in https://github.com/kubernetes-sigs/gateway-api/issues/3086#issuecomment-2115798435

tao12345666333 commented 4 months ago

/assign

k8s-triage-robot commented 1 month ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

ilbarone87 commented 1 month ago

Hi @tao12345666333 can you please let me know which one is the process to fix the error?

tao12345666333 commented 4 weeks ago

@ilbarone87 We need to add content for version v1alpha2 manually. I will submit a PR later.

/remove-lifecycle stale