From 995886d0c0e5f12291f2549543f31c20a8a6b458 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Thu, 1 Aug 2024 12:55:27 -0700 Subject: [PATCH] Handle optional workloads by group (#452) Signed-off-by: Tamal Saha --- apis/ui/v1alpha1/feature_types.go | 1 + apis/ui/v1alpha1/openapi_generated.go | 6 ++++++ crds/ui.k8s.appscode.com_features.yaml | 2 ++ 3 files changed, 9 insertions(+) diff --git a/apis/ui/v1alpha1/feature_types.go b/apis/ui/v1alpha1/feature_types.go index bbcbf165d..e4f6f49d2 100644 --- a/apis/ui/v1alpha1/feature_types.go +++ b/apis/ui/v1alpha1/feature_types.go @@ -102,6 +102,7 @@ type WorkloadInfo struct { metav1.GroupVersionKind `json:",inline"` // Selector specifies label selector that should be used to select this workload Selector map[string]string `json:"selector"` + Optional string `json:"optional,omitempty"` } type ChartInfo struct { diff --git a/apis/ui/v1alpha1/openapi_generated.go b/apis/ui/v1alpha1/openapi_generated.go index a63159cfc..d60e27b0e 100644 --- a/apis/ui/v1alpha1/openapi_generated.go +++ b/apis/ui/v1alpha1/openapi_generated.go @@ -19239,6 +19239,12 @@ func schema_resource_metadata_apis_ui_v1alpha1_WorkloadInfo(ref common.Reference }, }, }, + "optional": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, }, Required: []string{"group", "version", "kind", "selector"}, }, diff --git a/crds/ui.k8s.appscode.com_features.yaml b/crds/ui.k8s.appscode.com_features.yaml index cf8565a1a..9c6491fe0 100644 --- a/crds/ui.k8s.appscode.com_features.yaml +++ b/crds/ui.k8s.appscode.com_features.yaml @@ -158,6 +158,8 @@ spec: type: string kind: type: string + optional: + type: string selector: additionalProperties: type: string