From 31cf6d58c646fceb3d7eeeede1ceeff83289af62 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Tue, 12 Mar 2024 16:23:11 -0700 Subject: [PATCH] Update deps Signed-off-by: Tamal Saha --- go.mod | 2 +- go.sum | 4 +- .../apis/ui/v1alpha1/feature_types.go | 41 +++++++++++ .../apis/ui/v1alpha1/openapi_generated.go | 68 ++++++++++++++++++- .../apis/ui/v1alpha1/zz_generated.deepcopy.go | 21 ++++++ .../crds/ui.k8s.appscode.com_features.yaml | 47 +++++++++++++ vendor/modules.txt | 2 +- 7 files changed, 180 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 29e655b6e2..2898405aa8 100644 --- a/go.mod +++ b/go.mod @@ -48,7 +48,7 @@ require ( kmodules.xyz/custom-resources v0.29.1 kmodules.xyz/go-containerregistry v0.0.12 kmodules.xyz/monitoring-agent-api v0.29.0 - kmodules.xyz/resource-metadata v0.18.2-0.20240312054834-7f4fd865b2ce + kmodules.xyz/resource-metadata v0.18.2-0.20240312232132-611a62574ba5 kmodules.xyz/resource-metrics v0.29.1 kmodules.xyz/sets v0.29.0 kubeops.dev/falco-ui-server v0.0.3 diff --git a/go.sum b/go.sum index 0da1a4700d..54b15cbdb8 100644 --- a/go.sum +++ b/go.sum @@ -3488,8 +3488,8 @@ kmodules.xyz/monitoring-agent-api v0.29.0 h1:gpFl6OZrlMLb/ySMHdREI9EwGtnJ91oZBn9 kmodules.xyz/monitoring-agent-api v0.29.0/go.mod h1:iNbvaMTgVFOI5q2LJtGK91j4Dmjv4ZRiRdasGmWLKQI= kmodules.xyz/offshoot-api v0.29.0 h1:GHLhxxT9jU1N8+FvOCCeJNyU5g0duYS46UGrs6AHNLY= kmodules.xyz/offshoot-api v0.29.0/go.mod h1:5NxhBblXoDHWStx9HCDJR2KFTwYjEZ7i1Id3jelIunw= -kmodules.xyz/resource-metadata v0.18.2-0.20240312054834-7f4fd865b2ce h1:1rRGXwMp9bVeLhxHBcxbvrdrZitKg+sWqn18ZnM0oxQ= -kmodules.xyz/resource-metadata v0.18.2-0.20240312054834-7f4fd865b2ce/go.mod h1:Vb2bFCOX4uz2TsRRMzTkUqFWWOjJ261lY8Hs2HWgzh4= +kmodules.xyz/resource-metadata v0.18.2-0.20240312232132-611a62574ba5 h1:xkrxDwltmcvoQMeIgjsb0dlIDeXw1JCHfWAlHGijyW0= +kmodules.xyz/resource-metadata v0.18.2-0.20240312232132-611a62574ba5/go.mod h1:Vb2bFCOX4uz2TsRRMzTkUqFWWOjJ261lY8Hs2HWgzh4= kmodules.xyz/resource-metrics v0.29.1 h1:gP4SNosdDGFImpne52mnQtHacmnllYkTMcYL//p/ltM= kmodules.xyz/resource-metrics v0.29.1/go.mod h1:OuG/QobZ7o8GFHl/u3lqaUR0fDZDegxtV8Vdh+MNBD4= kmodules.xyz/sets v0.29.0 h1:ZX/qOECzUob95JhhRtngJElHSlJ1UNNdwK4hTEy+nl0= diff --git a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/feature_types.go b/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/feature_types.go index e18927598c..b5a1f21bf7 100644 --- a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/feature_types.go +++ b/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/feature_types.go @@ -75,6 +75,9 @@ type FeatureSpec struct { // Chart specifies the chart information that will be used by the FluxCD to install the respective feature // +optional Chart ChartInfo `json:"chart,omitempty"` + // ValuesFrom holds references to resources containing Helm values for this HelmRelease, + // and information about how they should be merged. + ValuesFrom []ValuesReference `json:"valuesFrom,omitempty"` // Values holds the values for this Helm release. // +optional Values *apiextensionsv1.JSON `json:"values,omitempty"` @@ -114,6 +117,44 @@ type ChartInfo struct { SourceRef v1.TypedObjectReference `json:"sourceRef"` } +// copied from: https://github.com/fluxcd/helm-controller/blob/v0.37.4/api/v2beta2/reference_types.go#L45-L80 +// ValuesReference contains a reference to a resource containing Helm values, +// and optionally the key they can be found at. +type ValuesReference struct { + // Kind of the values referent, valid values are ('Secret', 'ConfigMap'). + // +kubebuilder:validation:Enum=Secret;ConfigMap + // +required + Kind string `json:"kind"` + + // Name of the values referent. Should reside in the same namespace as the + // referring resource. + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=253 + // +required + Name string `json:"name"` + + // ValuesKey is the data key where the values.yaml or a specific value can be + // found at. Defaults to 'values.yaml'. + // +kubebuilder:validation:MaxLength=253 + // +kubebuilder:validation:Pattern=`^[\-._a-zA-Z0-9]+$` + // +optional + ValuesKey string `json:"valuesKey,omitempty"` + + // TargetPath is the YAML dot notation path the value should be merged at. When + // set, the ValuesKey is expected to be a single flat value. Defaults to 'None', + // which results in the values getting merged at the root. + // +kubebuilder:validation:MaxLength=250 + // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9_\-.\\\/]|\[[0-9]{1,5}\])+$` + // +optional + TargetPath string `json:"targetPath,omitempty"` + + // Optional marks this ValuesReference as optional. When set, a not found error + // for the values reference is ignored, but any ValuesKey, TargetPath or + // transient error will still result in a reconciliation failure. + // +optional + Optional bool `json:"optional,omitempty"` +} + type FeatureStatus struct { // Enabled specifies whether this feature is enabled or not. // +optional diff --git a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/openapi_generated.go b/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/openapi_generated.go index a44c5c6ac3..df2dd14eff 100644 --- a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/openapi_generated.go +++ b/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/openapi_generated.go @@ -355,6 +355,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ResourceEditorList": schema_resource_metadata_apis_ui_v1alpha1_ResourceEditorList(ref), "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ResourceEditorSpec": schema_resource_metadata_apis_ui_v1alpha1_ResourceEditorSpec(ref), "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.UIParameters": schema_resource_metadata_apis_ui_v1alpha1_UIParameters(ref), + "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ValuesReference": schema_resource_metadata_apis_ui_v1alpha1_ValuesReference(ref), "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.VariantRef": schema_resource_metadata_apis_ui_v1alpha1_VariantRef(ref), "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.WorkloadInfo": schema_resource_metadata_apis_ui_v1alpha1_WorkloadInfo(ref), } @@ -16877,6 +16878,20 @@ func schema_resource_metadata_apis_ui_v1alpha1_FeatureSpec(ref common.ReferenceC Ref: ref("kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ChartInfo"), }, }, + "valuesFrom": { + SchemaProps: spec.SchemaProps{ + Description: "ValuesFrom holds references to resources containing Helm values for this HelmRelease, and information about how they should be merged.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ValuesReference"), + }, + }, + }, + }, + }, "values": { SchemaProps: spec.SchemaProps{ Description: "Values holds the values for this Helm release.", @@ -16888,7 +16903,7 @@ func schema_resource_metadata_apis_ui_v1alpha1_FeatureSpec(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON", "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ChartInfo", "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ReadinessChecks", "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.Requirements", "x-helm.dev/apimachinery/apis/shared.ImageSpec"}, + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON", "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ChartInfo", "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ReadinessChecks", "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.Requirements", "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ValuesReference", "x-helm.dev/apimachinery/apis/shared.ImageSpec"}, } } @@ -17359,6 +17374,57 @@ func schema_resource_metadata_apis_ui_v1alpha1_UIParameters(ref common.Reference } } +func schema_resource_metadata_apis_ui_v1alpha1_ValuesReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "copied from: https://github.com/fluxcd/helm-controller/blob/v0.37.4/api/v2beta2/reference_types.go#L45-L80 ValuesReference contains a reference to a resource containing Helm values, and optionally the key they can be found at.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind of the values referent, valid values are ('Secret', 'ConfigMap').", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the values referent. Should reside in the same namespace as the referring resource.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "valuesKey": { + SchemaProps: spec.SchemaProps{ + Description: "ValuesKey is the data key where the values.yaml or a specific value can be found at. Defaults to 'values.yaml'.", + Type: []string{"string"}, + Format: "", + }, + }, + "targetPath": { + SchemaProps: spec.SchemaProps{ + Description: "TargetPath is the YAML dot notation path the value should be merged at. When set, the ValuesKey is expected to be a single flat value. Defaults to 'None', which results in the values getting merged at the root.", + Type: []string{"string"}, + Format: "", + }, + }, + "optional": { + SchemaProps: spec.SchemaProps{ + Description: "Optional marks this ValuesReference as optional. When set, a not found error for the values reference is ignored, but any ValuesKey, TargetPath or transient error will still result in a reconciliation failure.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"kind", "name"}, + }, + }, + } +} + func schema_resource_metadata_apis_ui_v1alpha1_VariantRef(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/zz_generated.deepcopy.go b/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/zz_generated.deepcopy.go index 84acea50be..06bb287fce 100644 --- a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/zz_generated.deepcopy.go @@ -399,6 +399,11 @@ func (in *FeatureSpec) DeepCopyInto(out *FeatureSpec) { in.Requirements.DeepCopyInto(&out.Requirements) in.ReadinessChecks.DeepCopyInto(&out.ReadinessChecks) out.Chart = in.Chart + if in.ValuesFrom != nil { + in, out := &in.ValuesFrom, &out.ValuesFrom + *out = make([]ValuesReference, len(*in)) + copy(*out, *in) + } if in.Values != nil { in, out := &in.Values, &out.Values *out = new(v1.JSON) @@ -738,6 +743,22 @@ func (in *UIParameters) DeepCopy() *UIParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ValuesReference) DeepCopyInto(out *ValuesReference) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValuesReference. +func (in *ValuesReference) DeepCopy() *ValuesReference { + if in == nil { + return nil + } + out := new(ValuesReference) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VariantRef) DeepCopyInto(out *VariantRef) { *out = *in diff --git a/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_features.yaml b/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_features.yaml index 591b74f4d0..83f7b4a995 100644 --- a/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_features.yaml +++ b/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_features.yaml @@ -184,6 +184,53 @@ spec: values: description: Values holds the values for this Helm release. x-kubernetes-preserve-unknown-fields: true + valuesFrom: + description: ValuesFrom holds references to resources containing Helm + values for this HelmRelease, and information about how they should + be merged. + items: + description: 'copied from: https://github.com/fluxcd/helm-controller/blob/v0.37.4/api/v2beta2/reference_types.go#L45-L80 + ValuesReference contains a reference to a resource containing + Helm values, and optionally the key they can be found at.' + properties: + kind: + description: Kind of the values referent, valid values are ('Secret', + 'ConfigMap'). + enum: + - Secret + - ConfigMap + type: string + name: + description: Name of the values referent. Should reside in the + same namespace as the referring resource. + maxLength: 253 + minLength: 1 + type: string + optional: + description: Optional marks this ValuesReference as optional. + When set, a not found error for the values reference is ignored, + but any ValuesKey, TargetPath or transient error will still + result in a reconciliation failure. + type: boolean + targetPath: + description: TargetPath is the YAML dot notation path the value + should be merged at. When set, the ValuesKey is expected to + be a single flat value. Defaults to 'None', which results + in the values getting merged at the root. + maxLength: 250 + pattern: ^([a-zA-Z0-9_\-.\\\/]|\[[0-9]{1,5}\])+$ + type: string + valuesKey: + description: ValuesKey is the data key where the values.yaml + or a specific value can be found at. Defaults to 'values.yaml'. + maxLength: 253 + pattern: ^[\-._a-zA-Z0-9]+$ + type: string + required: + - kind + - name + type: object + type: array required: - description - featureSet diff --git a/vendor/modules.txt b/vendor/modules.txt index b6b70fd08e..3e24e794c5 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1957,7 +1957,7 @@ kmodules.xyz/monitoring-agent-api/client ## explicit; go 1.21.5 kmodules.xyz/offshoot-api/api/v1 kmodules.xyz/offshoot-api/api/v2 -# kmodules.xyz/resource-metadata v0.18.2-0.20240312054834-7f4fd865b2ce +# kmodules.xyz/resource-metadata v0.18.2-0.20240312232132-611a62574ba5 ## explicit; go 1.22.0 kmodules.xyz/resource-metadata/apis/core/install kmodules.xyz/resource-metadata/apis/core/v1alpha1