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

chore: update gatewayv1beta1 to gatewayv1 in examples and docs #4935

Merged
merged 2 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ Adding a new version? You'll need three changes:
- Bump version of gateway API to `1.0.0-rc1` and support `Gateway`, `GatewayClass`
and `HTTPRoute` in API version `gateway.networking.k8s.io/v1`.
[#4893](https://github.com/Kong/kubernetes-ingress-controller/pull/4893)
- Update `Gateway`s, `GatewayClass`es and `HTTPRoute`s in examples to API
version `gateway.networking.k8s.io/v1`.
[#4935](https://github.com/Kong/kubernetes-ingress-controller/pull/4935)

### Added

Expand Down Expand Up @@ -394,7 +397,7 @@ Adding a new version? You'll need three changes:
[#4458](https://github.com/Kong/kubernetes-ingress-controller/pull/4458)

[gojson]: https://github.com/goccy/go-json
[httproute-specification]: https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1beta1.HTTPRoute
[httproute-specification]: https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1.HTTPRoute
[grpcroute-specification]: https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1alpha2.GRPCRouteRule

## [2.10.5]
Expand Down
4 changes: 2 additions & 2 deletions examples/gateway-grpcroute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ data:
tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JRzJBZ0VBTUJBR0J5cUdTTTQ5QWdFR0JTdUJCQUFpQklHZU1JR2JBZ0VCQkRERFJuZGdQWVphb25WdXFIaXUKNXV1WVdJK0ExNkJZTG9VQm5ZMC85Qkw5VTBzNDdHN0xDL2IwNXdFLzdVUEpFQktoWkFOaUFBUkI1eC9PekdZLwpBTFRxNDJ6ZVRLSXNOdnB1dWVBemhtMFplREJ3WVBmM2R4dGlacTZkOEU5RzNHcUh2cEVwMUwzRE9yaXI2Z0h4CjAreEFxQUUyR1VsT3Y2SVVmME9MdHNGa1Z4aXJINUtjMVJkblIwTTBGdGJpczlWTWtkQzkyaWM9Ci0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0K
type: kubernetes.io/tls
---
apiVersion: gateway.networking.k8s.io/v1beta1
apiVersion: gateway.networking.k8s.io/v1
kind: GatewayClass
metadata:
name: kong
Expand All @@ -54,7 +54,7 @@ metadata:
spec:
controllerName: konghq.com/kic-gateway-controller
---
apiVersion: gateway.networking.k8s.io/v1beta1
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: kong
Expand Down
6 changes: 3 additions & 3 deletions examples/gateway-httproute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ spec:
app: nginx
type: ClusterIP
---
apiVersion: gateway.networking.k8s.io/v1beta1
apiVersion: gateway.networking.k8s.io/v1
kind: GatewayClass
metadata:
name: kong
Expand All @@ -83,7 +83,7 @@ metadata:
spec:
controllerName: konghq.com/kic-gateway-controller
---
apiVersion: gateway.networking.k8s.io/v1beta1
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: kong
Expand All @@ -94,7 +94,7 @@ spec:
protocol: HTTP
port: 80
---
apiVersion: gateway.networking.k8s.io/v1beta1
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: httproute-testing
Expand Down
6 changes: 3 additions & 3 deletions examples/gateway-referencegrant-httproute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ spec:
- group: ""
kind: Service
---
apiVersion: gateway.networking.k8s.io/v1beta1
apiVersion: gateway.networking.k8s.io/v1
kind: GatewayClass
metadata:
name: kong
Expand All @@ -68,7 +68,7 @@ metadata:
spec:
controllerName: konghq.com/kic-gateway-controller
---
apiVersion: gateway.networking.k8s.io/v1beta1
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: kong
Expand All @@ -80,7 +80,7 @@ spec:
protocol: HTTP
port: 80
---
apiVersion: gateway.networking.k8s.io/v1beta1
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: httproute-testing
Expand Down
4 changes: 2 additions & 2 deletions examples/gateway-tcproute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
app: tcpecho
type: ClusterIP
---
apiVersion: gateway.networking.k8s.io/v1beta1
apiVersion: gateway.networking.k8s.io/v1
kind: GatewayClass
metadata:
name: kong
Expand All @@ -48,7 +48,7 @@ metadata:
spec:
controllerName: konghq.com/kic-gateway-controller
---
apiVersion: gateway.networking.k8s.io/v1beta1
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: kong
Expand Down
4 changes: 2 additions & 2 deletions examples/gateway-tlsroute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ data:
tls.key: LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFcEFJQkFBS0NBUUVBNllBQmR1TDJJak9NN1l5T2xkNGNuVXgyUElNNzlNZHVHMEQ1N0NxdjMyV0ZVMnF4ClcyM0VkMTZXNkYydjhJSkl2bEtzQ3dZSit0bHVGSExLeEU2TmZGa3NHTjhsOHkyM3pwTzBvZm1wRDJVSFliWDgKcGR5enoyeXFuMFlHc05raFNoZmJsTGl0Nm9mYzZsSGYzaURxMkVTNlQ1QURualdHb0R5Q3Q5YVhvUXRRR0FVVwo1MVJxckpJTzNSMFBOUjFoM0toU21RaGh2ZHZwbTRoWFAwazNML2xGTFJDR0Y2Q1dVbWdyRzFaM0pRN0FsUmFWCk1kVzh3N3hvZTN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zBVcmx4Zm5zeUgvKzdFVWdtRk5Bb0dBWGRDL1RZUi9UREM1aEJtUHU0NkcKVnRzQzRkZGxDK1VpUkxVZWx1NWQ1VnRWTnZFd3ZpQVBEREZPRkozVmdlN2Y4b1ZycEwyd2pOZEhQcHFuMzRWZgpReW9TSTlVeDYxVVp5ekUvY3gzQXJ5V1hPbDdiWldFNmZxaWliRU5mcTUybXJtd3I2Qi80bVRnWm04SlJjVTByCjVOVkhMblh1OWtCcE9NWmpwTmpDOUlFQ2dZRUF4MU4yZUgvK1Fub01PWVZKZ1ZnUkZXWkMzbENNeU1kMmZjanMKUmMzY3FMUjVQS1BuQTdzamVGTGQ0cG5kMVJIakZBQWU1dmZZTll6ZEZwanY0bEp1bDZoRjMrQTZTZ01uWk1rbAppZVlCa01QQ3JtaUZnbDMxQk5SeE0xNmp4MWYrY002TmpaRGQyQzBsL2UxRXRqUGhBbEVpM0tHY2NaQ3Y5NS9JCi8wczRHNWtDZ1lBdy9sa3dxTTg0Z3lwRjhWS0tydnVRa0NGbnhIa0tmRjBid0hJUHFBOTJoSzNTTVVocjd2MncKc0hURTJVeHE2ZUtEa01NUmdkZEYxSlBJQ2poZjR0cHYzSStVTlUxTUxDbFEwbVdLTUN4WXFBQ0JHcmx2Nit0bQpFTEJDaXFjL29CSnJXY3Fvc1NraFcxQjdEVWNYemtQUGVqR09RSUUrZ08yMkVxSW80QWhySUE9PQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo=
type: kubernetes.io/tls
---
apiVersion: gateway.networking.k8s.io/v1beta1
apiVersion: gateway.networking.k8s.io/v1
kind: GatewayClass
metadata:
name: kong
Expand All @@ -72,7 +72,7 @@ metadata:
spec:
controllerName: konghq.com/kic-gateway-controller
---
apiVersion: gateway.networking.k8s.io/v1beta1
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: kong
Expand Down
4 changes: 2 additions & 2 deletions examples/gateway-udproute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ spec:
app: coredns
type: ClusterIP
---
apiVersion: gateway.networking.k8s.io/v1beta1
apiVersion: gateway.networking.k8s.io/v1
kind: GatewayClass
metadata:
name: kong
Expand All @@ -88,7 +88,7 @@ metadata:
spec:
controllerName: konghq.com/kic-gateway-controller
---
apiVersion: gateway.networking.k8s.io/v1beta1
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: kong
Expand Down
2 changes: 1 addition & 1 deletion internal/controllers/gateway/httproute_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ func (r *HTTPRouteReconciler) Reconcile(ctx context.Context, req ctrl.Request) (

// if there is no matched hosts in listeners for the httproute, the httproute should not be accepted
// and have an "Accepted" condition with status false.
// https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1beta1.HTTPRoute
// https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1.HTTPRoute
filteredHTTPRoute, err := filterHostnames(gateways, httproute.DeepCopy())
// perform operations on the kong store only if the route is in accepted status and there is hostname matching
if isRouteAccepted(gateways) && err == nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/dataplane/parser/translators/httproute_atc.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func pathMatcherFromHTTPPathMatch(pathMatch *gatewayapi.HTTPPathMatch) atc.Match
return atc.NewPredicateHTTPPath(atc.OpPrefixMatch, "/")
}
// if path ends with /, we should remove the trailing / because it should be ignored:
// https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1beta1.PathMatchType
// https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1.PathMatchType
path = strings.TrimSuffix(path, "/")
return atc.Or(
atc.NewPredicateHTTPPath(atc.OpEqual, path),
Expand Down
4 changes: 2 additions & 2 deletions internal/util/k8s_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ func TestGenerateTagsForObject(t *testing.T) {
lo.ToPtr(K8sKindTagPrefix + "HTTPRoute"),
lo.ToPtr(K8sUIDTagPrefix + "buryani"),
lo.ToPtr(K8sGroupTagPrefix + "gateway.networking.k8s.io"),
lo.ToPtr(K8sVersionTagPrefix + "v1beta1"),
lo.ToPtr(K8sVersionTagPrefix + "v1"),
lo.ToPtr("temir-jol"),
lo.ToPtr("snaryad-soqqısı"),
}
Expand All @@ -264,7 +264,7 @@ func TestGenerateTagsForObject(t *testing.T) {
// Relevant kubernetes issue: https://github.com/kubernetes/kubernetes/issues/80609
testObj := &gatewayapi.HTTPRoute{
TypeMeta: metav1.TypeMeta{
APIVersion: "gateway.networking.k8s.io/v1beta1",
APIVersion: "gateway.networking.k8s.io/v1",
Kind: "HTTPRoute",
},
ObjectMeta: metav1.ObjectMeta{
Expand Down