From 6ce6c5662ab68703d36d63388374a649efba25ca Mon Sep 17 00:00:00 2001 From: Gareth Evans Date: Tue, 2 Mar 2021 09:27:08 +0000 Subject: [PATCH 1/2] chore: convert to apiextensions.k8s.io/v1 style crds --- charts/captain-hook/templates/crds.yaml | 49 +++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 3 deletions(-) diff --git a/charts/captain-hook/templates/crds.yaml b/charts/captain-hook/templates/crds.yaml index 6316707..3689c11 100644 --- a/charts/captain-hook/templates/crds.yaml +++ b/charts/captain-hook/templates/crds.yaml @@ -1,5 +1,5 @@ --- -apiVersion: apiextensions.k8s.io/v1beta1 +apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: name: hooks.captainhook.io @@ -11,6 +11,51 @@ metadata: heritage: "{{ .Release.Service }}" spec: group: captainhook.io + versions: + - name: v1alpha1 + # Each version can be enabled/disabled by Served flag. + served: true + # One and only one version must be marked as the storage version. + storage: true + # Schema + schema: + openAPIV3Schema: + type: object + properties: + spec: + type: object + properties: + forwardURL: + type: string + body: + type: string + headers: + type: object + additionalProperties: + type: array + items: + type: string + status: + type: object + properties: + status: + type: string + attempts: + type: integer + message: + type: string + additionalPrinterColumns: + - name: name + type: string + jsonPath: .metadata.name + - name: forwardURL + type: string + jsonPath: .spec.forwardURL + - name: status + type: string + jsonPath: .status.status + + scope: Namespaced names: kind: Hook listKind: HookList @@ -18,5 +63,3 @@ spec: shortNames: - hook singular: hook - scope: Namespaced - version: v1alpha1 From 588fdd5b231d5e5e7bb5c9d5461ac1fc9f22f2ff Mon Sep 17 00:00:00 2001 From: Gareth Evans Date: Tue, 2 Mar 2021 09:40:26 +0000 Subject: [PATCH 2/2] chore: corrected indentation of additionalPrinterColumns --- charts/captain-hook/templates/crds.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/charts/captain-hook/templates/crds.yaml b/charts/captain-hook/templates/crds.yaml index 3689c11..77f4aad 100644 --- a/charts/captain-hook/templates/crds.yaml +++ b/charts/captain-hook/templates/crds.yaml @@ -44,16 +44,16 @@ spec: type: integer message: type: string - additionalPrinterColumns: - - name: name - type: string - jsonPath: .metadata.name - - name: forwardURL - type: string - jsonPath: .spec.forwardURL - - name: status - type: string - jsonPath: .status.status + additionalPrinterColumns: + - name: name + type: string + jsonPath: .metadata.name + - name: forwardURL + type: string + jsonPath: .spec.forwardURL + - name: status + type: string + jsonPath: .status.status scope: Namespaced names: