From 1e055ece77fc9f2a87eba0ce33c5ab2cd678582f Mon Sep 17 00:00:00 2001 From: Tyler Witlin Date: Thu, 29 Aug 2024 10:09:06 -0400 Subject: [PATCH] fix: verify templates render properly Signed-off-by: Tyler Witlin --- .../adcs-issuer/templates/adcsissuer-crd.yaml | 121 ++++++++++-------- .../templates/adcsrequest-crd.yaml | 2 +- .../templates/simulator-clusterissuer.yaml | 39 +----- charts/adcs-issuer/values.yaml | 5 +- 4 files changed, 71 insertions(+), 96 deletions(-) diff --git a/charts/adcs-issuer/templates/adcsissuer-crd.yaml b/charts/adcs-issuer/templates/adcsissuer-crd.yaml index 2f91ab2..c9ef372 100644 --- a/charts/adcs-issuer/templates/adcsissuer-crd.yaml +++ b/charts/adcs-issuer/templates/adcsissuer-crd.yaml @@ -7,7 +7,7 @@ metadata: cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "chart.fullname" . }}- controller-gen.kubebuilder.io/version: v0.7.0 labels: - {{- include "chart.labels" . | nindent 4 }} + {{- include "chart.labels" . | nindent 4 }} spec: group: adcs.certmanager.csf.nokia.com names: @@ -17,63 +17,74 @@ spec: singular: adcsissuer scope: Namespaced versions: - - name: v1 - schema: - openAPIV3Schema: - description: AdcsIssuer is the Schema for the adcsissuers API - type: object - properties: - apiVersion: - description: APIVersion defines the versioned schema of this representation of an object. - type: string - kind: - description: Kind is a string value representing the REST resource this object represents. - type: string - metadata: - type: object - spec: - description: AdcsIssuerSpec defines the desired state of AdcsIssuer - type: object - properties: - caBundle: - description: CABundle is a PEM encoded TLS certificate to use to verify connections to the ADCS server. - type: string - format: byte - credentialsRef: - description: CredentialsRef is a reference to a Secret containing the username and password for the ADCS server. - type: object - properties: - name: - description: Name of the referent. - type: string - required: - - name - retryInterval: - description: How often to retry in case of communication errors (in time.ParseDuration() format). Default: 1 hour. - type: string - statusCheckInterval: - description: How often to check for request status in the server (in time.ParseDuration() format). Default: 6 hours. - type: string - templateName: - description: Which ADCS Template should this issuer use. Defaults to the value specified in main.go or as a CLI option. - type: string - url: - description: URL is the base URL for the ADCS instance. - type: string - required: - - credentialsRef - - url - status: - description: AdcsIssuerStatus defines the observed state of AdcsIssuer - type: object - served: true - storage: true - subresources: - status: {} + - name: v1 + schema: + openAPIV3Schema: + description: AdcsIssuer is the Schema for the adcsissuers API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: AdcsIssuerSpec defines the desired state of AdcsIssuer + properties: + caBundle: + description: CABundle is a PEM encoded TLS certifiate to use to verify + connections to the ADCS server. + format: byte + type: string + credentialsRef: + description: CredentialsRef is a reference to a Secret containing the + username and password for the ADCS server. The secret must contain + two keys, 'username' and 'password'. + properties: + name: + description: Name of the referent. + type: string + required: + - name + type: object + retryInterval: + description: How often to retry in case of communication errors (in + time.ParseDuration() format) Default 1 hour. + type: string + statusCheckInterval: + description: How often to check for request status in the server (in + time.ParseDuration() format) Default 6 hours. + type: string + templateName: + description: Which ADCS Template should this issuer use Defaults to + the what is specified in main.go or as an cli option. + type: string + url: + description: URL is the base URL for the ADCS instance + type: string + required: + - credentialsRef + - url + type: object + status: + description: AdcsIssuerStatus defines the observed state of AdcsIssuer + type: object + type: object + served: true + storage: true + subresources: + status: {} status: acceptedNames: kind: "" plural: "" conditions: [] storedVersions: [] -{{- end }} + +{{- end }} \ No newline at end of file diff --git a/charts/adcs-issuer/templates/adcsrequest-crd.yaml b/charts/adcs-issuer/templates/adcsrequest-crd.yaml index 046660d..1b29746 100644 --- a/charts/adcs-issuer/templates/adcsrequest-crd.yaml +++ b/charts/adcs-issuer/templates/adcsrequest-crd.yaml @@ -104,4 +104,4 @@ status: conditions: [] storedVersions: [] -{{- end }} \ No newline at end of file +{{- end }} \ No newline at end of file diff --git a/charts/adcs-issuer/templates/simulator-clusterissuer.yaml b/charts/adcs-issuer/templates/simulator-clusterissuer.yaml index cf105a1..bc0a414 100644 --- a/charts/adcs-issuer/templates/simulator-clusterissuer.yaml +++ b/charts/adcs-issuer/templates/simulator-clusterissuer.yaml @@ -1,5 +1,4 @@ {{- if .Values.simulator.enabled }} - apiVersion: adcs.certmanager.csf.nokia.com/v1 kind: ClusterAdcsIssuer metadata: @@ -9,43 +8,7 @@ metadata: {{- include "chart.labels" . | nindent 4 }} spec: caBundle: | - {{- .Values.simulator.caBundle | default (cat <