From 389c9615c3c56e12b6d60d03bba2b0c1e0a8329e Mon Sep 17 00:00:00 2001 From: Adam Kaplan Date: Fri, 10 Jan 2020 09:11:28 -0500 Subject: [PATCH 1/2] Fix image registry's RolloutStrategy param Add `omitempty` tag so empty values are not validated by the regex. --- imageregistry/v1/types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imageregistry/v1/types.go b/imageregistry/v1/types.go index cdb7b9ff1c3..6c8eb0b7b67 100644 --- a/imageregistry/v1/types.go +++ b/imageregistry/v1/types.go @@ -86,7 +86,7 @@ type ImageRegistrySpec struct { // deployment. // +optional // +kubebuilder:validation:Pattern=`^(RollingUpdate|Recreate)$` - RolloutStrategy string `json:"rolloutStrategy" protobuf:"bytes,15,opt,name=rolloutStrategy"` + RolloutStrategy string `json:"rolloutStrategy,omitempty" protobuf:"bytes,15,opt,name=rolloutStrategy"` } // ImageRegistryStatus reports image registry operational status. From 14f1b46a76a36b933e10b6c61886961ba9294747 Mon Sep 17 00:00:00 2001 From: Adam Kaplan Date: Fri, 10 Jan 2020 09:11:47 -0500 Subject: [PATCH 2/2] make update --- imageregistry/v1/00-crd.yaml | 2 +- ..._80_csi_snapshot_controller_operator_01_crd.yaml | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/imageregistry/v1/00-crd.yaml b/imageregistry/v1/00-crd.yaml index f034bbaf8eb..801a20baec6 100644 --- a/imageregistry/v1/00-crd.yaml +++ b/imageregistry/v1/00-crd.yaml @@ -156,7 +156,7 @@ spec: type: string rolloutStrategy: description: rolloutStrategy defines rollout strategy for the image - registry deployment. Valid values are RollingUpdate (default) and Recreate. + registry deployment. type: string pattern: ^(RollingUpdate|Recreate)$ routes: diff --git a/operator/v1/0000_80_csi_snapshot_controller_operator_01_crd.yaml b/operator/v1/0000_80_csi_snapshot_controller_operator_01_crd.yaml index 1f6ac8689a1..d8cd7528bdc 100644 --- a/operator/v1/0000_80_csi_snapshot_controller_operator_01_crd.yaml +++ b/operator/v1/0000_80_csi_snapshot_controller_operator_01_crd.yaml @@ -19,9 +19,11 @@ spec: storage: true validation: openAPIV3Schema: - description: CSISnapshotController provides information to configure an operator to - manage the CSISnapshotController. + description: CSISnapshotController provides a means to configure an operator + to manage the CSI snapshots. `cluster` is the canonical name. type: object + required: + - spec properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -36,8 +38,7 @@ spec: metadata: type: object spec: - description: CSISnapshotControllerSpec is the specification of the desired behavior of - the CSISnapshotController operator. + description: spec holds user settable values for configuration type: object properties: logLevel: @@ -73,8 +74,8 @@ spec: nullable: true x-kubernetes-preserve-unknown-fields: true status: - description: CSISnapshotControllerStatus defines the observed status of - the CSISnapshotController operator. + description: status holds observed values from the cluster. They may not + be overridden. type: object properties: conditions: