From 6eb2e1405b626baca4665847a767d49f393d491d Mon Sep 17 00:00:00 2001 From: Philip Gough Date: Fri, 1 Mar 2024 15:45:54 +0000 Subject: [PATCH] Bring the Route and Route RBAC up to date (#1362) Signed-off-by: Philip Gough --- tests/run-in-kind/router/route_crd.yaml | 38 +++++++++++++---------- tests/run-in-kind/router/router_rbac.yaml | 2 +- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/tests/run-in-kind/router/route_crd.yaml b/tests/run-in-kind/router/route_crd.yaml index ce8c9221e..4d1c5e1f0 100644 --- a/tests/run-in-kind/router/route_crd.yaml +++ b/tests/run-in-kind/router/route_crd.yaml @@ -1,4 +1,4 @@ -apiVersion: apiextensions.k8s.io/v1beta1 +apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: # name must match the spec fields below, and be in the form: . @@ -13,11 +13,28 @@ spec: served: true # One and only one version must be marked as the storage version. storage: true + schema: + openAPIV3Schema: + type: object + x-kubernetes-preserve-unknown-fields: true + additionalPrinterColumns: + - name: Host + type: string + jsonPath: .status.ingress[0].host + - name: Admitted + type: string + jsonPath: .status.ingress[0].conditions[?(@.type=="Admitted")].status + - name: Service + type: string + jsonPath: .spec.to.name + - name: TLS + type: string + jsonPath: .spec.tls.type + subresources: + # enable spec/status + status: {} # either Namespaced or Cluster scope: Namespaced - subresources: - # enable spec/status - status: {} names: # plural name to be used in the URL: /apis/// plural: routes @@ -25,16 +42,3 @@ spec: singular: route # kind is normally the CamelCased singular type. Your resource manifests use this. kind: Route - additionalPrinterColumns: - - name: Host - type: string - JSONPath: .status.ingress[0].host - - name: Admitted - type: string - JSONPath: .status.ingress[0].conditions[?(@.type=="Admitted")].status - - name: Service - type: string - JSONPath: .spec.to.name - - name: TLS - type: string - JSONPath: .spec.tls.type diff --git a/tests/run-in-kind/router/router_rbac.yaml b/tests/run-in-kind/router/router_rbac.yaml index c85a3fb07..d4f2a4a62 100644 --- a/tests/run-in-kind/router/router_rbac.yaml +++ b/tests/run-in-kind/router/router_rbac.yaml @@ -1,4 +1,4 @@ -apiVersion: rbac.authorization.k8s.io/v1beta1 +apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: openshift-ingress-router