From 739ad9efe23c192b37287ac0dcbccab0f7b5bfbf Mon Sep 17 00:00:00 2001 From: Luna Das Date: Tue, 15 Sep 2020 22:22:32 +0530 Subject: [PATCH] Add default value for property in x-kubernetes-list-map-keys This PS fixes the CRD spec validation errors seen in k8s 1.18.6, the errors were not seen in the previous k8s version. Change-Id: Iec1381eca2a21268d40827dbce105899b8d129b3 --- daemonjob-controller/Chart.yaml | 2 +- daemonjob-controller/templates/crd.yaml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/daemonjob-controller/Chart.yaml b/daemonjob-controller/Chart.yaml index 83de4fa3b..fe9514395 100644 --- a/daemonjob-controller/Chart.yaml +++ b/daemonjob-controller/Chart.yaml @@ -15,6 +15,6 @@ apiVersion: v1 appVersion: v1.0.0 description: A Helm chart for DaemonjobController name: daemonjob-controller -version: 0.1.1 +version: 0.1.2 home: https://opendev.org/openstack ... diff --git a/daemonjob-controller/templates/crd.yaml b/daemonjob-controller/templates/crd.yaml index ea3c1960e..7e44cfa0e 100644 --- a/daemonjob-controller/templates/crd.yaml +++ b/daemonjob-controller/templates/crd.yaml @@ -17,7 +17,6 @@ limitations under the License. {{ $groupVersion := .Values.crds.group_version }} {{ $groupVersionFormat := printf "%s/%s" $groupName $groupVersion }} {{ $crdName := printf "%s.%s" "daemonjobs" $groupName }} -{{- if not (.Capabilities.APIVersions.Has $groupVersionFormat) }} apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -1204,6 +1203,7 @@ spec: description: Protocol for port. Must be UDP, TCP, or SCTP. Defaults to "TCP". type: string + default: "TCP" required: - containerPort type: object @@ -4122,4 +4122,3 @@ status: conditions: [] storedVersions: [] {{- end }} -{{- end }}