From 96a0992c048e2e124753c40ff21d2d6a6e8936da Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Sun, 29 Oct 2023 09:25:48 -0700 Subject: [PATCH] Update deps Signed-off-by: Tamal Saha --- go.mod | 6 +- go.sum | 12 +- .../kmodules.xyz/client-go/api/v1/object.go | 4 +- .../client-go/api/v1/object_enum.go | 5 + .../apis/core/v1alpha1/openapi_generated.go | 286 ++++++++++++++++++ .../management/v1alpha1/openapi_generated.go | 286 ++++++++++++++++++ .../apis/meta/v1alpha1/openapi_generated.go | 286 ++++++++++++++++++ .../resource-metadata/apis/shared/helm.go | 113 +++++++ .../resource-metadata/apis/shared/helpers.go | 126 ++++++++ .../apis/shared/openapi_generated.go | 286 ++++++++++++++++++ .../apis/shared/zz_generated.deepcopy.go | 192 ++++++++++++ .../apis/ui/v1alpha1/openapi_generated.go | 286 ++++++++++++++++++ ...appscode.com_resourceblockdefinitions.yaml | 3 +- ....k8s.appscode.com_resourcedescriptors.yaml | 6 +- ...meta.k8s.appscode.com_resourcelayouts.yaml | 15 +- ...eta.k8s.appscode.com_resourceoutlines.yaml | 15 +- ...i.k8s.appscode.com_resourcedashboards.yaml | 3 +- .../resource-metadata/hub/helm.go | 150 +++++++++ .../v2beta1/helmreleases.yaml | 23 +- .../v1beta2/helmcharts.yaml | 13 +- .../v1beta2/helmrepositories.yaml | 14 +- .../v2beta1/helmreleases.yaml | 4 +- .../v1beta2/helmcharts.yaml | 2 +- vendor/modules.txt | 6 +- 24 files changed, 2107 insertions(+), 35 deletions(-) create mode 100644 vendor/kmodules.xyz/resource-metadata/apis/shared/helm.go create mode 100644 vendor/kmodules.xyz/resource-metadata/hub/helm.go diff --git a/go.mod b/go.mod index 492d1b407..4f1199f41 100644 --- a/go.mod +++ b/go.mod @@ -42,11 +42,11 @@ require ( k8s.io/kube-state-metrics/v2 v2.7.0 kmodules.xyz/apiversion v0.2.0 kmodules.xyz/authorizer v0.25.1 - kmodules.xyz/client-go v0.25.39 + kmodules.xyz/client-go v0.25.40 kmodules.xyz/custom-resources v0.25.2 kmodules.xyz/go-containerregistry v0.0.11 kmodules.xyz/monitoring-agent-api v0.25.4 - kmodules.xyz/resource-metadata v0.17.31 + kmodules.xyz/resource-metadata v0.17.35 kmodules.xyz/resource-metrics v0.25.7 kmodules.xyz/sets v0.25.0 kubeops.dev/scanner v0.0.16 @@ -54,7 +54,7 @@ require ( sigs.k8s.io/cli-utils v0.34.0 sigs.k8s.io/controller-runtime v0.13.1 sigs.k8s.io/yaml v1.3.0 - x-helm.dev/apimachinery v0.0.13 + x-helm.dev/apimachinery v0.0.15 ) require ( diff --git a/go.sum b/go.sum index 2bf9acfbe..8f8a0f656 100644 --- a/go.sum +++ b/go.sum @@ -2140,8 +2140,8 @@ kmodules.xyz/apiversion v0.2.0 h1:vAQYqZFm4xu4pbB1cAdHbFEPES6EQkcR4wc06xdTOWk= kmodules.xyz/apiversion v0.2.0/go.mod h1:oPX8g8LvlPdPX3Yc5YvCzJHQnw3YF/X4/jdW0b1am80= kmodules.xyz/authorizer v0.25.1 h1:W19AtlPD2A1+Q4UqDmNCJKfX9bKIgj+J6bQmkYwsHwY= kmodules.xyz/authorizer v0.25.1/go.mod h1:hKAbHpRkbxZJjc+cMTUiyxQxp7amKUVDiN145IrpnhA= -kmodules.xyz/client-go v0.25.39 h1:5n0fXviJXd/Sioo8v2/f+Ria026oxTjpF9wBte9sBh8= -kmodules.xyz/client-go v0.25.39/go.mod h1:ijkpW+0nkrKf8zpK7V/UQQzjWMZpnMX887jfYLHBMIM= +kmodules.xyz/client-go v0.25.40 h1:za/YLZRUFWHWfF/EYo3Hz9QFED5Mr/ptRumHb/bqxEI= +kmodules.xyz/client-go v0.25.40/go.mod h1:ijkpW+0nkrKf8zpK7V/UQQzjWMZpnMX887jfYLHBMIM= kmodules.xyz/crd-schema-fuzz v0.25.0 h1:c5ZxNRqJak1bkGhECmyrKpzKGThFMB4088Kynyvngbc= kmodules.xyz/custom-resources v0.25.2 h1:+PJgUZvbbSgyNT7EX9gUZ3PIzY2LAW03TDW8cevvXqo= kmodules.xyz/custom-resources v0.25.2/go.mod h1:b9XjjKQMZ6KrLHXKqQz7YwV3M3BK8Hwi4KEwu5RadCo= @@ -2151,8 +2151,8 @@ kmodules.xyz/monitoring-agent-api v0.25.4 h1:OwkvtV23QhUy3f7o9lxPWaAW3jiJMGAMPPR kmodules.xyz/monitoring-agent-api v0.25.4/go.mod h1:3LhrLDGQKQXhxYcjA/WNaO4HPpopYQzOutsEp2i3008= kmodules.xyz/offshoot-api v0.25.4 h1:IjJNvkphcdYUG8XO/pBwXpuP8W+jxAWJZ3yH8vgI/as= kmodules.xyz/offshoot-api v0.25.4/go.mod h1:PUk4EuJFhhyQykCflHj7EgXcljGIqs9vi0IN0RpxtY4= -kmodules.xyz/resource-metadata v0.17.31 h1:OMFUXF5Ys44s/5MV/yWxa5CIMJNc20dRD7cpMnlx0uM= -kmodules.xyz/resource-metadata v0.17.31/go.mod h1:qA/yeimciDU7szGPyRT3jHDPIvm7uJiVOzcB5tIJgxE= +kmodules.xyz/resource-metadata v0.17.35 h1:pXpKA1zDyLUzlzus3B3Z5jYNebRzndH6ebuKFHfUjwQ= +kmodules.xyz/resource-metadata v0.17.35/go.mod h1:rZFQgchXscdXQTpsj0WWSzne7VRmvoIfvuFLaBANP6w= kmodules.xyz/resource-metrics v0.25.7 h1:ne2cK/dlnfYcuu0+pHX15Y53rcKBQq9DuCtQVcx6rY8= kmodules.xyz/resource-metrics v0.25.7/go.mod h1:y7pDmTWuVLNGSjwckKCwJFhCgi5fhbwS7PAcH2rmGcY= kmodules.xyz/sets v0.25.0 h1:belY/3trp/M/CKc1TEteA40jb2uCIdwKHhjpvrIxG+8= @@ -2188,5 +2188,5 @@ sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= -x-helm.dev/apimachinery v0.0.13 h1:wtulWSq+LxGVJDv026KX/4CmNCzuMwr7bgTS/IMF1N4= -x-helm.dev/apimachinery v0.0.13/go.mod h1:wpYBmu0U/uETX6Kv6TXequ9FPmhI24KquLK2B30wOs8= +x-helm.dev/apimachinery v0.0.15 h1:+q1bdvVdDC311RRboRcWk0P2aaM5ZyOhxN/H+VJzJTs= +x-helm.dev/apimachinery v0.0.15/go.mod h1:wpYBmu0U/uETX6Kv6TXequ9FPmhI24KquLK2B30wOs8= diff --git a/vendor/kmodules.xyz/client-go/api/v1/object.go b/vendor/kmodules.xyz/client-go/api/v1/object.go index 4e16224ed..419d3cab3 100644 --- a/vendor/kmodules.xyz/client-go/api/v1/object.go +++ b/vendor/kmodules.xyz/client-go/api/v1/object.go @@ -216,8 +216,8 @@ type ObjectInfo struct { Ref ObjectReference `json:"ref" protobuf:"bytes,2,opt,name=ref"` } -// +kubebuilder:validation:Enum=authn;authz;auth_secret;backup_via;catalog;cert_issuer;config;connect_via;exposed_by;event;located_on;monitored_by;ocm_bind;offshoot;ops;placed_into;policy;recommended_for;restore_into;scaled_by;storage;view -// ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,storage,view) +// +kubebuilder:validation:Enum=authn;authz;auth_secret;backup_via;catalog;cert_issuer;config;connect_via;exposed_by;event;located_on;monitored_by;ocm_bind;offshoot;ops;placed_into;policy;recommended_for;restore_into;scaled_by;source;storage;view +// ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) type EdgeLabel string func (e EdgeLabel) Direct() bool { diff --git a/vendor/kmodules.xyz/client-go/api/v1/object_enum.go b/vendor/kmodules.xyz/client-go/api/v1/object_enum.go index 403d3aed1..65792ec2b 100644 --- a/vendor/kmodules.xyz/client-go/api/v1/object_enum.go +++ b/vendor/kmodules.xyz/client-go/api/v1/object_enum.go @@ -52,6 +52,8 @@ const ( EdgeLabelRestoreInto EdgeLabel = "restore_into" // EdgeLabelScaledBy is a EdgeLabel of type scaled_by. EdgeLabelScaledBy EdgeLabel = "scaled_by" + // EdgeLabelSource is a EdgeLabel of type source. + EdgeLabelSource EdgeLabel = "source" // EdgeLabelStorage is a EdgeLabel of type storage. EdgeLabelStorage EdgeLabel = "storage" // EdgeLabelView is a EdgeLabel of type view. @@ -81,6 +83,7 @@ var _EdgeLabelNames = []string{ string(EdgeLabelRecommendedFor), string(EdgeLabelRestoreInto), string(EdgeLabelScaledBy), + string(EdgeLabelSource), string(EdgeLabelStorage), string(EdgeLabelView), } @@ -115,6 +118,7 @@ func EdgeLabelValues() []EdgeLabel { EdgeLabelRecommendedFor, EdgeLabelRestoreInto, EdgeLabelScaledBy, + EdgeLabelSource, EdgeLabelStorage, EdgeLabelView, } @@ -153,6 +157,7 @@ var _EdgeLabelValue = map[string]EdgeLabel{ "recommended_for": EdgeLabelRecommendedFor, "restore_into": EdgeLabelRestoreInto, "scaled_by": EdgeLabelScaledBy, + "source": EdgeLabelSource, "storage": EdgeLabelStorage, "view": EdgeLabelView, } diff --git a/vendor/kmodules.xyz/resource-metadata/apis/core/v1alpha1/openapi_generated.go b/vendor/kmodules.xyz/resource-metadata/apis/core/v1alpha1/openapi_generated.go index d14294edd..37e35f2f2 100644 --- a/vendor/kmodules.xyz/resource-metadata/apis/core/v1alpha1/openapi_generated.go +++ b/vendor/kmodules.xyz/resource-metadata/apis/core/v1alpha1/openapi_generated.go @@ -328,10 +328,17 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kmodules.xyz/resource-metadata/apis/shared.ActionInfo": schema_kmodulesxyz_resource_metadata_apis_shared_ActionInfo(ref), "kmodules.xyz/resource-metadata/apis/shared.ActionTemplate": schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplate(ref), "kmodules.xyz/resource-metadata/apis/shared.ActionTemplateGroup": schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplateGroup(ref), + "kmodules.xyz/resource-metadata/apis/shared.BootstrapPresets": schema_kmodulesxyz_resource_metadata_apis_shared_BootstrapPresets(ref), "kmodules.xyz/resource-metadata/apis/shared.Dashboard": schema_kmodulesxyz_resource_metadata_apis_shared_Dashboard(ref), "kmodules.xyz/resource-metadata/apis/shared.DashboardVar": schema_kmodulesxyz_resource_metadata_apis_shared_DashboardVar(ref), "kmodules.xyz/resource-metadata/apis/shared.DeploymentParameters": schema_kmodulesxyz_resource_metadata_apis_shared_DeploymentParameters(ref), + "kmodules.xyz/resource-metadata/apis/shared.HelmInfo": schema_kmodulesxyz_resource_metadata_apis_shared_HelmInfo(ref), + "kmodules.xyz/resource-metadata/apis/shared.HelmRelease": schema_kmodulesxyz_resource_metadata_apis_shared_HelmRelease(ref), + "kmodules.xyz/resource-metadata/apis/shared.HelmRepository": schema_kmodulesxyz_resource_metadata_apis_shared_HelmRepository(ref), "kmodules.xyz/resource-metadata/apis/shared.If": schema_kmodulesxyz_resource_metadata_apis_shared_If(ref), + "kmodules.xyz/resource-metadata/apis/shared.ImageRegistrySpec": schema_kmodulesxyz_resource_metadata_apis_shared_ImageRegistrySpec(ref), + "kmodules.xyz/resource-metadata/apis/shared.RegistryInfo": schema_kmodulesxyz_resource_metadata_apis_shared_RegistryInfo(ref), + "kmodules.xyz/resource-metadata/apis/shared.RegistryProxies": schema_kmodulesxyz_resource_metadata_apis_shared_RegistryProxies(ref), "kmodules.xyz/resource-metadata/apis/shared.ResourceLocator": schema_kmodulesxyz_resource_metadata_apis_shared_ResourceLocator(ref), "kmodules.xyz/resource-metadata/apis/shared.ResourceQuery": schema_kmodulesxyz_resource_metadata_apis_shared_ResourceQuery(ref), "kmodules.xyz/resource-metadata/apis/shared.SourceLocator": schema_kmodulesxyz_resource_metadata_apis_shared_SourceLocator(ref), @@ -16334,6 +16341,39 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplateGroup(ref co } } +func schema_kmodulesxyz_resource_metadata_apis_shared_BootstrapPresets(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "image": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.ImageRegistrySpec"), + }, + }, + "registry": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.RegistryInfo"), + }, + }, + "helm": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.HelmInfo"), + }, + }, + }, + Required: []string{"image", "registry", "helm"}, + }, + }, + Dependencies: []string{ + "kmodules.xyz/resource-metadata/apis/shared.HelmInfo", "kmodules.xyz/resource-metadata/apis/shared.ImageRegistrySpec", "kmodules.xyz/resource-metadata/apis/shared.RegistryInfo"}, + } +} + func schema_kmodulesxyz_resource_metadata_apis_shared_Dashboard(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -16450,6 +16490,137 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_DeploymentParameters(ref c } } +func schema_kmodulesxyz_resource_metadata_apis_shared_HelmInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "repositories": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.HelmRepository"), + }, + }, + }, + }, + }, + "releases": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.HelmRelease"), + }, + }, + }, + }, + }, + }, + Required: []string{"repositories", "releases"}, + }, + }, + Dependencies: []string{ + "kmodules.xyz/resource-metadata/apis/shared.HelmRelease", "kmodules.xyz/resource-metadata/apis/shared.HelmRepository"}, + } +} + +func schema_kmodulesxyz_resource_metadata_apis_shared_HelmRelease(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enabled": { + SchemaProps: spec.SchemaProps{ + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "values": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + Required: []string{"enabled", "version"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_kmodulesxyz_resource_metadata_apis_shared_HelmRepository(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "url": { + SchemaProps: spec.SchemaProps{ + Description: "URL of the Helm repository, a valid URL contains at least a protocol and host.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "secretName": { + SchemaProps: spec.SchemaProps{ + Description: "SecretRef specifies the Secret containing authentication credentials for the HelmRepository. For HTTP/S basic auth the secret must contain 'username' and 'password' fields. For TLS the secret must contain a 'certFile' and 'keyFile', and/or 'caFile' fields.", + Type: []string{"string"}, + Format: "", + }, + }, + "interval": { + SchemaProps: spec.SchemaProps{ + Description: "Interval at which to check the URL for updates.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "timeout": { + SchemaProps: spec.SchemaProps{ + Description: "The timeout of index downloading, defaults to 60s.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of the HelmRepository. When this field is set to \"oci\", the URL field value must be prefixed with \"oci://\".", + Type: []string{"string"}, + Format: "", + }, + }, + "provider": { + SchemaProps: spec.SchemaProps{ + Description: "Provider used for authentication, can be 'aws', 'azure', 'gcp' or 'generic'. This field is optional, and only taken into account if the .spec.type field is set to 'oci'. When not specified, defaults to 'generic'.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"url"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + func schema_kmodulesxyz_resource_metadata_apis_shared_If(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -16475,6 +16646,121 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_If(ref common.ReferenceCal } } +func schema_kmodulesxyz_resource_metadata_apis_shared_ImageRegistrySpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "registryFQDN": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "proxies": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.RegistryProxies"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kmodules.xyz/resource-metadata/apis/shared.RegistryProxies"}, + } +} + +func schema_kmodulesxyz_resource_metadata_apis_shared_RegistryInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "credentials": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"credentials"}, + }, + }, + } +} + +func schema_kmodulesxyz_resource_metadata_apis_shared_RegistryProxies(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "dockerHub": { + SchemaProps: spec.SchemaProps{ + Description: "company/bin:1.23", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "dockerLibrary": { + SchemaProps: spec.SchemaProps{ + Description: "alpine, nginx etc.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "ghcr": { + SchemaProps: spec.SchemaProps{ + Description: "ghcr.io", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "quay": { + SchemaProps: spec.SchemaProps{ + Description: "quay.io", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "kubernetes": { + SchemaProps: spec.SchemaProps{ + Description: "registry.k8s.io", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "appscode": { + SchemaProps: spec.SchemaProps{ + Description: "r.appscode.com", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + func schema_kmodulesxyz_resource_metadata_apis_shared_ResourceLocator(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/vendor/kmodules.xyz/resource-metadata/apis/management/v1alpha1/openapi_generated.go b/vendor/kmodules.xyz/resource-metadata/apis/management/v1alpha1/openapi_generated.go index 79fea5773..b0e0140c2 100644 --- a/vendor/kmodules.xyz/resource-metadata/apis/management/v1alpha1/openapi_generated.go +++ b/vendor/kmodules.xyz/resource-metadata/apis/management/v1alpha1/openapi_generated.go @@ -308,10 +308,17 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kmodules.xyz/resource-metadata/apis/shared.ActionInfo": schema_kmodulesxyz_resource_metadata_apis_shared_ActionInfo(ref), "kmodules.xyz/resource-metadata/apis/shared.ActionTemplate": schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplate(ref), "kmodules.xyz/resource-metadata/apis/shared.ActionTemplateGroup": schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplateGroup(ref), + "kmodules.xyz/resource-metadata/apis/shared.BootstrapPresets": schema_kmodulesxyz_resource_metadata_apis_shared_BootstrapPresets(ref), "kmodules.xyz/resource-metadata/apis/shared.Dashboard": schema_kmodulesxyz_resource_metadata_apis_shared_Dashboard(ref), "kmodules.xyz/resource-metadata/apis/shared.DashboardVar": schema_kmodulesxyz_resource_metadata_apis_shared_DashboardVar(ref), "kmodules.xyz/resource-metadata/apis/shared.DeploymentParameters": schema_kmodulesxyz_resource_metadata_apis_shared_DeploymentParameters(ref), + "kmodules.xyz/resource-metadata/apis/shared.HelmInfo": schema_kmodulesxyz_resource_metadata_apis_shared_HelmInfo(ref), + "kmodules.xyz/resource-metadata/apis/shared.HelmRelease": schema_kmodulesxyz_resource_metadata_apis_shared_HelmRelease(ref), + "kmodules.xyz/resource-metadata/apis/shared.HelmRepository": schema_kmodulesxyz_resource_metadata_apis_shared_HelmRepository(ref), "kmodules.xyz/resource-metadata/apis/shared.If": schema_kmodulesxyz_resource_metadata_apis_shared_If(ref), + "kmodules.xyz/resource-metadata/apis/shared.ImageRegistrySpec": schema_kmodulesxyz_resource_metadata_apis_shared_ImageRegistrySpec(ref), + "kmodules.xyz/resource-metadata/apis/shared.RegistryInfo": schema_kmodulesxyz_resource_metadata_apis_shared_RegistryInfo(ref), + "kmodules.xyz/resource-metadata/apis/shared.RegistryProxies": schema_kmodulesxyz_resource_metadata_apis_shared_RegistryProxies(ref), "kmodules.xyz/resource-metadata/apis/shared.ResourceLocator": schema_kmodulesxyz_resource_metadata_apis_shared_ResourceLocator(ref), "kmodules.xyz/resource-metadata/apis/shared.ResourceQuery": schema_kmodulesxyz_resource_metadata_apis_shared_ResourceQuery(ref), "kmodules.xyz/resource-metadata/apis/shared.SourceLocator": schema_kmodulesxyz_resource_metadata_apis_shared_SourceLocator(ref), @@ -15085,6 +15092,39 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplateGroup(ref co } } +func schema_kmodulesxyz_resource_metadata_apis_shared_BootstrapPresets(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "image": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.ImageRegistrySpec"), + }, + }, + "registry": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.RegistryInfo"), + }, + }, + "helm": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.HelmInfo"), + }, + }, + }, + Required: []string{"image", "registry", "helm"}, + }, + }, + Dependencies: []string{ + "kmodules.xyz/resource-metadata/apis/shared.HelmInfo", "kmodules.xyz/resource-metadata/apis/shared.ImageRegistrySpec", "kmodules.xyz/resource-metadata/apis/shared.RegistryInfo"}, + } +} + func schema_kmodulesxyz_resource_metadata_apis_shared_Dashboard(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -15201,6 +15241,137 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_DeploymentParameters(ref c } } +func schema_kmodulesxyz_resource_metadata_apis_shared_HelmInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "repositories": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.HelmRepository"), + }, + }, + }, + }, + }, + "releases": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.HelmRelease"), + }, + }, + }, + }, + }, + }, + Required: []string{"repositories", "releases"}, + }, + }, + Dependencies: []string{ + "kmodules.xyz/resource-metadata/apis/shared.HelmRelease", "kmodules.xyz/resource-metadata/apis/shared.HelmRepository"}, + } +} + +func schema_kmodulesxyz_resource_metadata_apis_shared_HelmRelease(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enabled": { + SchemaProps: spec.SchemaProps{ + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "values": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + Required: []string{"enabled", "version"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_kmodulesxyz_resource_metadata_apis_shared_HelmRepository(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "url": { + SchemaProps: spec.SchemaProps{ + Description: "URL of the Helm repository, a valid URL contains at least a protocol and host.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "secretName": { + SchemaProps: spec.SchemaProps{ + Description: "SecretRef specifies the Secret containing authentication credentials for the HelmRepository. For HTTP/S basic auth the secret must contain 'username' and 'password' fields. For TLS the secret must contain a 'certFile' and 'keyFile', and/or 'caFile' fields.", + Type: []string{"string"}, + Format: "", + }, + }, + "interval": { + SchemaProps: spec.SchemaProps{ + Description: "Interval at which to check the URL for updates.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "timeout": { + SchemaProps: spec.SchemaProps{ + Description: "The timeout of index downloading, defaults to 60s.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of the HelmRepository. When this field is set to \"oci\", the URL field value must be prefixed with \"oci://\".", + Type: []string{"string"}, + Format: "", + }, + }, + "provider": { + SchemaProps: spec.SchemaProps{ + Description: "Provider used for authentication, can be 'aws', 'azure', 'gcp' or 'generic'. This field is optional, and only taken into account if the .spec.type field is set to 'oci'. When not specified, defaults to 'generic'.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"url"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + func schema_kmodulesxyz_resource_metadata_apis_shared_If(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -15226,6 +15397,121 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_If(ref common.ReferenceCal } } +func schema_kmodulesxyz_resource_metadata_apis_shared_ImageRegistrySpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "registryFQDN": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "proxies": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.RegistryProxies"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kmodules.xyz/resource-metadata/apis/shared.RegistryProxies"}, + } +} + +func schema_kmodulesxyz_resource_metadata_apis_shared_RegistryInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "credentials": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"credentials"}, + }, + }, + } +} + +func schema_kmodulesxyz_resource_metadata_apis_shared_RegistryProxies(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "dockerHub": { + SchemaProps: spec.SchemaProps{ + Description: "company/bin:1.23", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "dockerLibrary": { + SchemaProps: spec.SchemaProps{ + Description: "alpine, nginx etc.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "ghcr": { + SchemaProps: spec.SchemaProps{ + Description: "ghcr.io", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "quay": { + SchemaProps: spec.SchemaProps{ + Description: "quay.io", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "kubernetes": { + SchemaProps: spec.SchemaProps{ + Description: "registry.k8s.io", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "appscode": { + SchemaProps: spec.SchemaProps{ + Description: "r.appscode.com", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + func schema_kmodulesxyz_resource_metadata_apis_shared_ResourceLocator(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/vendor/kmodules.xyz/resource-metadata/apis/meta/v1alpha1/openapi_generated.go b/vendor/kmodules.xyz/resource-metadata/apis/meta/v1alpha1/openapi_generated.go index 19ab7a1c1..429a3dc2c 100644 --- a/vendor/kmodules.xyz/resource-metadata/apis/meta/v1alpha1/openapi_generated.go +++ b/vendor/kmodules.xyz/resource-metadata/apis/meta/v1alpha1/openapi_generated.go @@ -393,10 +393,17 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kmodules.xyz/resource-metadata/apis/shared.ActionInfo": schema_kmodulesxyz_resource_metadata_apis_shared_ActionInfo(ref), "kmodules.xyz/resource-metadata/apis/shared.ActionTemplate": schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplate(ref), "kmodules.xyz/resource-metadata/apis/shared.ActionTemplateGroup": schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplateGroup(ref), + "kmodules.xyz/resource-metadata/apis/shared.BootstrapPresets": schema_kmodulesxyz_resource_metadata_apis_shared_BootstrapPresets(ref), "kmodules.xyz/resource-metadata/apis/shared.Dashboard": schema_kmodulesxyz_resource_metadata_apis_shared_Dashboard(ref), "kmodules.xyz/resource-metadata/apis/shared.DashboardVar": schema_kmodulesxyz_resource_metadata_apis_shared_DashboardVar(ref), "kmodules.xyz/resource-metadata/apis/shared.DeploymentParameters": schema_kmodulesxyz_resource_metadata_apis_shared_DeploymentParameters(ref), + "kmodules.xyz/resource-metadata/apis/shared.HelmInfo": schema_kmodulesxyz_resource_metadata_apis_shared_HelmInfo(ref), + "kmodules.xyz/resource-metadata/apis/shared.HelmRelease": schema_kmodulesxyz_resource_metadata_apis_shared_HelmRelease(ref), + "kmodules.xyz/resource-metadata/apis/shared.HelmRepository": schema_kmodulesxyz_resource_metadata_apis_shared_HelmRepository(ref), "kmodules.xyz/resource-metadata/apis/shared.If": schema_kmodulesxyz_resource_metadata_apis_shared_If(ref), + "kmodules.xyz/resource-metadata/apis/shared.ImageRegistrySpec": schema_kmodulesxyz_resource_metadata_apis_shared_ImageRegistrySpec(ref), + "kmodules.xyz/resource-metadata/apis/shared.RegistryInfo": schema_kmodulesxyz_resource_metadata_apis_shared_RegistryInfo(ref), + "kmodules.xyz/resource-metadata/apis/shared.RegistryProxies": schema_kmodulesxyz_resource_metadata_apis_shared_RegistryProxies(ref), "kmodules.xyz/resource-metadata/apis/shared.ResourceLocator": schema_kmodulesxyz_resource_metadata_apis_shared_ResourceLocator(ref), "kmodules.xyz/resource-metadata/apis/shared.ResourceQuery": schema_kmodulesxyz_resource_metadata_apis_shared_ResourceQuery(ref), "kmodules.xyz/resource-metadata/apis/shared.SourceLocator": schema_kmodulesxyz_resource_metadata_apis_shared_SourceLocator(ref), @@ -19054,6 +19061,39 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplateGroup(ref co } } +func schema_kmodulesxyz_resource_metadata_apis_shared_BootstrapPresets(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "image": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.ImageRegistrySpec"), + }, + }, + "registry": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.RegistryInfo"), + }, + }, + "helm": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.HelmInfo"), + }, + }, + }, + Required: []string{"image", "registry", "helm"}, + }, + }, + Dependencies: []string{ + "kmodules.xyz/resource-metadata/apis/shared.HelmInfo", "kmodules.xyz/resource-metadata/apis/shared.ImageRegistrySpec", "kmodules.xyz/resource-metadata/apis/shared.RegistryInfo"}, + } +} + func schema_kmodulesxyz_resource_metadata_apis_shared_Dashboard(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -19170,6 +19210,137 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_DeploymentParameters(ref c } } +func schema_kmodulesxyz_resource_metadata_apis_shared_HelmInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "repositories": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.HelmRepository"), + }, + }, + }, + }, + }, + "releases": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.HelmRelease"), + }, + }, + }, + }, + }, + }, + Required: []string{"repositories", "releases"}, + }, + }, + Dependencies: []string{ + "kmodules.xyz/resource-metadata/apis/shared.HelmRelease", "kmodules.xyz/resource-metadata/apis/shared.HelmRepository"}, + } +} + +func schema_kmodulesxyz_resource_metadata_apis_shared_HelmRelease(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enabled": { + SchemaProps: spec.SchemaProps{ + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "values": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + Required: []string{"enabled", "version"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_kmodulesxyz_resource_metadata_apis_shared_HelmRepository(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "url": { + SchemaProps: spec.SchemaProps{ + Description: "URL of the Helm repository, a valid URL contains at least a protocol and host.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "secretName": { + SchemaProps: spec.SchemaProps{ + Description: "SecretRef specifies the Secret containing authentication credentials for the HelmRepository. For HTTP/S basic auth the secret must contain 'username' and 'password' fields. For TLS the secret must contain a 'certFile' and 'keyFile', and/or 'caFile' fields.", + Type: []string{"string"}, + Format: "", + }, + }, + "interval": { + SchemaProps: spec.SchemaProps{ + Description: "Interval at which to check the URL for updates.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "timeout": { + SchemaProps: spec.SchemaProps{ + Description: "The timeout of index downloading, defaults to 60s.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of the HelmRepository. When this field is set to \"oci\", the URL field value must be prefixed with \"oci://\".", + Type: []string{"string"}, + Format: "", + }, + }, + "provider": { + SchemaProps: spec.SchemaProps{ + Description: "Provider used for authentication, can be 'aws', 'azure', 'gcp' or 'generic'. This field is optional, and only taken into account if the .spec.type field is set to 'oci'. When not specified, defaults to 'generic'.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"url"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + func schema_kmodulesxyz_resource_metadata_apis_shared_If(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -19195,6 +19366,121 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_If(ref common.ReferenceCal } } +func schema_kmodulesxyz_resource_metadata_apis_shared_ImageRegistrySpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "registryFQDN": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "proxies": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.RegistryProxies"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kmodules.xyz/resource-metadata/apis/shared.RegistryProxies"}, + } +} + +func schema_kmodulesxyz_resource_metadata_apis_shared_RegistryInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "credentials": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"credentials"}, + }, + }, + } +} + +func schema_kmodulesxyz_resource_metadata_apis_shared_RegistryProxies(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "dockerHub": { + SchemaProps: spec.SchemaProps{ + Description: "company/bin:1.23", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "dockerLibrary": { + SchemaProps: spec.SchemaProps{ + Description: "alpine, nginx etc.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "ghcr": { + SchemaProps: spec.SchemaProps{ + Description: "ghcr.io", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "quay": { + SchemaProps: spec.SchemaProps{ + Description: "quay.io", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "kubernetes": { + SchemaProps: spec.SchemaProps{ + Description: "registry.k8s.io", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "appscode": { + SchemaProps: spec.SchemaProps{ + Description: "r.appscode.com", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + func schema_kmodulesxyz_resource_metadata_apis_shared_ResourceLocator(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/vendor/kmodules.xyz/resource-metadata/apis/shared/helm.go b/vendor/kmodules.xyz/resource-metadata/apis/shared/helm.go new file mode 100644 index 000000000..c594f11d2 --- /dev/null +++ b/vendor/kmodules.xyz/resource-metadata/apis/shared/helm.go @@ -0,0 +1,113 @@ +/* +Copyright AppsCode Inc. and Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package shared + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" +) + +type BootstrapPresets struct { + Image ImageRegistrySpec `json:"image"` + Registry RegistryInfo `json:"registry"` + Helm HelmInfo `json:"helm"` +} + +type ImageRegistrySpec struct { + //+optional + RegistryFQDN string `json:"registryFQDN"` + //+optional + Proxies RegistryProxies `json:"proxies"` +} + +type RegistryProxies struct { + // company/bin:1.23 + //+optional + DockerHub string `json:"dockerHub"` + // alpine, nginx etc. + //+optional + DockerLibrary string `json:"dockerLibrary"` + // ghcr.io + //+optional + GHCR string `json:"ghcr"` + // quay.io + //+optional + Quay string `json:"quay"` + // registry.k8s.io + //+optional + Kubernetes string `json:"kubernetes"` + // r.appscode.com + //+optional + AppsCode string `json:"appscode"` +} + +type RepositoryCredential map[string]string + +type RegistryInfo struct { + Credentials RepositoryCredential `json:"credentials"` +} + +type HelmInfo struct { + Repositories map[string]*HelmRepository `json:"repositories"` + Releases map[string]*HelmRelease `json:"releases"` +} + +type HelmRepository struct { + // URL of the Helm repository, a valid URL contains at least a protocol and + // host. + // +required + URL string `json:"url"` + + // SecretRef specifies the Secret containing authentication credentials + // for the HelmRepository. + // For HTTP/S basic auth the secret must contain 'username' and 'password' + // fields. + // For TLS the secret must contain a 'certFile' and 'keyFile', and/or + // 'caFile' fields. + // +optional + SecretName string `json:"secretName,omitempty"` + + // Interval at which to check the URL for updates. + // +kubebuilder:validation:Type=string + // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$" + // +optional + Interval *metav1.Duration `json:"interval,omitempty"` + + // The timeout of index downloading, defaults to 60s. + // +optional + Timeout *metav1.Duration `json:"timeout,omitempty"` + + // Type of the HelmRepository. + // When this field is set to "oci", the URL field value must be prefixed with "oci://". + // +kubebuilder:validation:Enum=default;oci + // +optional + Type string `json:"type,omitempty"` + + // Provider used for authentication, can be 'aws', 'azure', 'gcp' or 'generic'. + // This field is optional, and only taken into account if the .spec.type field is set to 'oci'. + // When not specified, defaults to 'generic'. + // +kubebuilder:validation:Enum=generic;aws;azure;gcp + // +kubebuilder:default:=generic + // +optional + Provider string `json:"provider,omitempty"` +} + +type HelmRelease struct { + Enabled bool `json:"enabled"` + Version string `json:"version"` + Values *runtime.RawExtension `json:"values,omitempty"` +} diff --git a/vendor/kmodules.xyz/resource-metadata/apis/shared/helpers.go b/vendor/kmodules.xyz/resource-metadata/apis/shared/helpers.go index 41d35a841..f4c03f563 100644 --- a/vendor/kmodules.xyz/resource-metadata/apis/shared/helpers.go +++ b/vendor/kmodules.xyz/resource-metadata/apis/shared/helpers.go @@ -24,6 +24,7 @@ import ( "text/template" kmapi "kmodules.xyz/client-go/api/v1" + "kmodules.xyz/go-containerregistry/name" "github.com/Masterminds/sprig/v3" "github.com/pkg/errors" @@ -91,3 +92,128 @@ func (r ResourceLocator) GraphQuery(oid kmapi.OID) (string, map[string]interface } return "", nil, fmt.Errorf("unknown query type %+v, oid %s", r, oid) } + +func (r ImageRegistrySpec) DockerHubProxy() string { + addr := r.Proxies.DockerHub + if addr == "" { + addr = r.RegistryFQDN + } + addr = strings.TrimSpace(addr) + addr = strings.TrimSuffix(addr, "/") + return addr +} + +func (r ImageRegistrySpec) DockerLibraryProxy() string { + addr := r.Proxies.DockerLibrary + if addr == "" { + addr = r.Proxies.DockerHub + } + if addr == "" { + addr = r.RegistryFQDN + } + addr = strings.TrimSpace(addr) + addr = strings.TrimSuffix(addr, "/") + return addr +} + +func (r ImageRegistrySpec) GHCRProxy() string { + addr := r.Proxies.GHCR + if addr == "" { + addr = r.RegistryFQDN + } + addr = strings.TrimSpace(addr) + addr = strings.TrimSuffix(addr, "/") + return addr +} + +func (r ImageRegistrySpec) QuayProxy() string { + addr := r.Proxies.Quay + if addr == "" { + addr = r.RegistryFQDN + } + addr = strings.TrimSpace(addr) + addr = strings.TrimSuffix(addr, "/") + return addr +} + +func (r ImageRegistrySpec) KubernetesRegistryProxy() string { + addr := r.Proxies.Kubernetes + if addr == "" { + addr = r.RegistryFQDN + } + addr = strings.TrimSpace(addr) + addr = strings.TrimSuffix(addr, "/") + return addr +} + +func (r ImageRegistrySpec) AppsCodeRegistryProxy() string { + addr := r.Proxies.AppsCode + if addr == "" { + addr = r.RegistryFQDN + } + addr = strings.TrimSpace(addr) + addr = strings.TrimSuffix(addr, "/") + return addr +} + +const defaultTag = "latest" + +func NewRef(spec ImageRegistrySpec, img string) (string, error) { + if spec.RegistryFQDN == "" { + return img, nil + } + + ref, err := name.ParseReference(img) + if err != nil { + return "", err + } + + // https://github.com/kmodules/go-containerregistry/blob/master/name/lib_test.go + switch ref.Registry { + case "index.docker.io": + var result string + _, bin, found := strings.Cut(ref.Repository, "library/") + if found { + result = spec.DockerLibraryProxy() + "/" + bin + } else { + result = spec.DockerHubProxy() + "/" + ref.Repository + } + if ref.Tag != "" && ref.Tag != defaultTag { + result += ":" + ref.Tag + } + return result, nil + case "ghcr.io": + result := spec.GHCRProxy() + "/" + ref.Repository + if ref.Tag != "" && ref.Tag != defaultTag { + result += ":" + ref.Tag + } + return result, nil + case "quay.io": + result := spec.QuayProxy() + "/" + ref.Repository + if ref.Tag != "" && ref.Tag != defaultTag { + result += ":" + ref.Tag + } + return result, nil + case "registry.k8s.io": + result := spec.KubernetesRegistryProxy() + "/" + ref.Repository + if ref.Tag != "" && ref.Tag != defaultTag { + result += ":" + ref.Tag + } + return result, nil + case "r.appscode.com": + result := spec.AppsCodeRegistryProxy() + "/" + ref.Repository + if ref.Tag != "" && ref.Tag != defaultTag { + result += ":" + ref.Tag + } + return result, nil + } + return "", fmt.Errorf("registry not support for image %s", img) +} + +func MustNewRef(spec ImageRegistrySpec, img string) string { + out, err := NewRef(spec, img) + if err != nil { + panic(err) + } + return out +} diff --git a/vendor/kmodules.xyz/resource-metadata/apis/shared/openapi_generated.go b/vendor/kmodules.xyz/resource-metadata/apis/shared/openapi_generated.go index 212960e98..2f1c8fccd 100644 --- a/vendor/kmodules.xyz/resource-metadata/apis/shared/openapi_generated.go +++ b/vendor/kmodules.xyz/resource-metadata/apis/shared/openapi_generated.go @@ -35,10 +35,17 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kmodules.xyz/resource-metadata/apis/shared.ActionInfo": schema_kmodulesxyz_resource_metadata_apis_shared_ActionInfo(ref), "kmodules.xyz/resource-metadata/apis/shared.ActionTemplate": schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplate(ref), "kmodules.xyz/resource-metadata/apis/shared.ActionTemplateGroup": schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplateGroup(ref), + "kmodules.xyz/resource-metadata/apis/shared.BootstrapPresets": schema_kmodulesxyz_resource_metadata_apis_shared_BootstrapPresets(ref), "kmodules.xyz/resource-metadata/apis/shared.Dashboard": schema_kmodulesxyz_resource_metadata_apis_shared_Dashboard(ref), "kmodules.xyz/resource-metadata/apis/shared.DashboardVar": schema_kmodulesxyz_resource_metadata_apis_shared_DashboardVar(ref), "kmodules.xyz/resource-metadata/apis/shared.DeploymentParameters": schema_kmodulesxyz_resource_metadata_apis_shared_DeploymentParameters(ref), + "kmodules.xyz/resource-metadata/apis/shared.HelmInfo": schema_kmodulesxyz_resource_metadata_apis_shared_HelmInfo(ref), + "kmodules.xyz/resource-metadata/apis/shared.HelmRelease": schema_kmodulesxyz_resource_metadata_apis_shared_HelmRelease(ref), + "kmodules.xyz/resource-metadata/apis/shared.HelmRepository": schema_kmodulesxyz_resource_metadata_apis_shared_HelmRepository(ref), "kmodules.xyz/resource-metadata/apis/shared.If": schema_kmodulesxyz_resource_metadata_apis_shared_If(ref), + "kmodules.xyz/resource-metadata/apis/shared.ImageRegistrySpec": schema_kmodulesxyz_resource_metadata_apis_shared_ImageRegistrySpec(ref), + "kmodules.xyz/resource-metadata/apis/shared.RegistryInfo": schema_kmodulesxyz_resource_metadata_apis_shared_RegistryInfo(ref), + "kmodules.xyz/resource-metadata/apis/shared.RegistryProxies": schema_kmodulesxyz_resource_metadata_apis_shared_RegistryProxies(ref), "kmodules.xyz/resource-metadata/apis/shared.ResourceLocator": schema_kmodulesxyz_resource_metadata_apis_shared_ResourceLocator(ref), "kmodules.xyz/resource-metadata/apis/shared.ResourceQuery": schema_kmodulesxyz_resource_metadata_apis_shared_ResourceQuery(ref), "kmodules.xyz/resource-metadata/apis/shared.SourceLocator": schema_kmodulesxyz_resource_metadata_apis_shared_SourceLocator(ref), @@ -289,6 +296,39 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplateGroup(ref co } } +func schema_kmodulesxyz_resource_metadata_apis_shared_BootstrapPresets(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "image": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.ImageRegistrySpec"), + }, + }, + "registry": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.RegistryInfo"), + }, + }, + "helm": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.HelmInfo"), + }, + }, + }, + Required: []string{"image", "registry", "helm"}, + }, + }, + Dependencies: []string{ + "kmodules.xyz/resource-metadata/apis/shared.HelmInfo", "kmodules.xyz/resource-metadata/apis/shared.ImageRegistrySpec", "kmodules.xyz/resource-metadata/apis/shared.RegistryInfo"}, + } +} + func schema_kmodulesxyz_resource_metadata_apis_shared_Dashboard(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -405,6 +445,137 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_DeploymentParameters(ref c } } +func schema_kmodulesxyz_resource_metadata_apis_shared_HelmInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "repositories": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.HelmRepository"), + }, + }, + }, + }, + }, + "releases": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.HelmRelease"), + }, + }, + }, + }, + }, + }, + Required: []string{"repositories", "releases"}, + }, + }, + Dependencies: []string{ + "kmodules.xyz/resource-metadata/apis/shared.HelmRelease", "kmodules.xyz/resource-metadata/apis/shared.HelmRepository"}, + } +} + +func schema_kmodulesxyz_resource_metadata_apis_shared_HelmRelease(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enabled": { + SchemaProps: spec.SchemaProps{ + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "values": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + Required: []string{"enabled", "version"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_kmodulesxyz_resource_metadata_apis_shared_HelmRepository(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "url": { + SchemaProps: spec.SchemaProps{ + Description: "URL of the Helm repository, a valid URL contains at least a protocol and host.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "secretName": { + SchemaProps: spec.SchemaProps{ + Description: "SecretRef specifies the Secret containing authentication credentials for the HelmRepository. For HTTP/S basic auth the secret must contain 'username' and 'password' fields. For TLS the secret must contain a 'certFile' and 'keyFile', and/or 'caFile' fields.", + Type: []string{"string"}, + Format: "", + }, + }, + "interval": { + SchemaProps: spec.SchemaProps{ + Description: "Interval at which to check the URL for updates.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "timeout": { + SchemaProps: spec.SchemaProps{ + Description: "The timeout of index downloading, defaults to 60s.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of the HelmRepository. When this field is set to \"oci\", the URL field value must be prefixed with \"oci://\".", + Type: []string{"string"}, + Format: "", + }, + }, + "provider": { + SchemaProps: spec.SchemaProps{ + Description: "Provider used for authentication, can be 'aws', 'azure', 'gcp' or 'generic'. This field is optional, and only taken into account if the .spec.type field is set to 'oci'. When not specified, defaults to 'generic'.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"url"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + func schema_kmodulesxyz_resource_metadata_apis_shared_If(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -430,6 +601,121 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_If(ref common.ReferenceCal } } +func schema_kmodulesxyz_resource_metadata_apis_shared_ImageRegistrySpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "registryFQDN": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "proxies": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.RegistryProxies"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kmodules.xyz/resource-metadata/apis/shared.RegistryProxies"}, + } +} + +func schema_kmodulesxyz_resource_metadata_apis_shared_RegistryInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "credentials": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"credentials"}, + }, + }, + } +} + +func schema_kmodulesxyz_resource_metadata_apis_shared_RegistryProxies(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "dockerHub": { + SchemaProps: spec.SchemaProps{ + Description: "company/bin:1.23", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "dockerLibrary": { + SchemaProps: spec.SchemaProps{ + Description: "alpine, nginx etc.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "ghcr": { + SchemaProps: spec.SchemaProps{ + Description: "ghcr.io", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "quay": { + SchemaProps: spec.SchemaProps{ + Description: "quay.io", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "kubernetes": { + SchemaProps: spec.SchemaProps{ + Description: "registry.k8s.io", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "appscode": { + SchemaProps: spec.SchemaProps{ + Description: "r.appscode.com", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + func schema_kmodulesxyz_resource_metadata_apis_shared_ResourceLocator(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/vendor/kmodules.xyz/resource-metadata/apis/shared/zz_generated.deepcopy.go b/vendor/kmodules.xyz/resource-metadata/apis/shared/zz_generated.deepcopy.go index f7f82bd53..d44bb467d 100644 --- a/vendor/kmodules.xyz/resource-metadata/apis/shared/zz_generated.deepcopy.go +++ b/vendor/kmodules.xyz/resource-metadata/apis/shared/zz_generated.deepcopy.go @@ -22,6 +22,8 @@ limitations under the License. package shared import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" v1alpha1 "x-helm.dev/apimachinery/apis/releases/v1alpha1" apisshared "x-helm.dev/apimachinery/apis/shared" ) @@ -144,6 +146,25 @@ func (in *ActionTemplateGroup) DeepCopy() *ActionTemplateGroup { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BootstrapPresets) DeepCopyInto(out *BootstrapPresets) { + *out = *in + out.Image = in.Image + in.Registry.DeepCopyInto(&out.Registry) + in.Helm.DeepCopyInto(&out.Helm) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BootstrapPresets. +func (in *BootstrapPresets) DeepCopy() *BootstrapPresets { + if in == nil { + return nil + } + out := new(BootstrapPresets) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Dashboard) DeepCopyInto(out *Dashboard) { *out = *in @@ -212,6 +233,99 @@ func (in *DeploymentParameters) DeepCopy() *DeploymentParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmInfo) DeepCopyInto(out *HelmInfo) { + *out = *in + if in.Repositories != nil { + in, out := &in.Repositories, &out.Repositories + *out = make(map[string]*HelmRepository, len(*in)) + for key, val := range *in { + var outVal *HelmRepository + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = new(HelmRepository) + (*in).DeepCopyInto(*out) + } + (*out)[key] = outVal + } + } + if in.Releases != nil { + in, out := &in.Releases, &out.Releases + *out = make(map[string]*HelmRelease, len(*in)) + for key, val := range *in { + var outVal *HelmRelease + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = new(HelmRelease) + (*in).DeepCopyInto(*out) + } + (*out)[key] = outVal + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmInfo. +func (in *HelmInfo) DeepCopy() *HelmInfo { + if in == nil { + return nil + } + out := new(HelmInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmRelease) DeepCopyInto(out *HelmRelease) { + *out = *in + if in.Values != nil { + in, out := &in.Values, &out.Values + *out = new(runtime.RawExtension) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRelease. +func (in *HelmRelease) DeepCopy() *HelmRelease { + if in == nil { + return nil + } + out := new(HelmRelease) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmRepository) DeepCopyInto(out *HelmRepository) { + *out = *in + if in.Interval != nil { + in, out := &in.Interval, &out.Interval + *out = new(v1.Duration) + **out = **in + } + if in.Timeout != nil { + in, out := &in.Timeout, &out.Timeout + *out = new(v1.Duration) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRepository. +func (in *HelmRepository) DeepCopy() *HelmRepository { + if in == nil { + return nil + } + out := new(HelmRepository) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *If) DeepCopyInto(out *If) { *out = *in @@ -233,6 +347,84 @@ func (in *If) DeepCopy() *If { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageRegistrySpec) DeepCopyInto(out *ImageRegistrySpec) { + *out = *in + out.Proxies = in.Proxies + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageRegistrySpec. +func (in *ImageRegistrySpec) DeepCopy() *ImageRegistrySpec { + if in == nil { + return nil + } + out := new(ImageRegistrySpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RegistryInfo) DeepCopyInto(out *RegistryInfo) { + *out = *in + if in.Credentials != nil { + in, out := &in.Credentials, &out.Credentials + *out = make(RepositoryCredential, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistryInfo. +func (in *RegistryInfo) DeepCopy() *RegistryInfo { + if in == nil { + return nil + } + out := new(RegistryInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RegistryProxies) DeepCopyInto(out *RegistryProxies) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistryProxies. +func (in *RegistryProxies) DeepCopy() *RegistryProxies { + if in == nil { + return nil + } + out := new(RegistryProxies) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in RepositoryCredential) DeepCopyInto(out *RepositoryCredential) { + { + in := &in + *out = make(RepositoryCredential, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositoryCredential. +func (in RepositoryCredential) DeepCopy() RepositoryCredential { + if in == nil { + return nil + } + out := new(RepositoryCredential) + in.DeepCopyInto(out) + return *out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ResourceLocator) DeepCopyInto(out *ResourceLocator) { *out = *in 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 188449cce..57d24f982 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 @@ -302,10 +302,17 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kmodules.xyz/resource-metadata/apis/shared.ActionInfo": schema_kmodulesxyz_resource_metadata_apis_shared_ActionInfo(ref), "kmodules.xyz/resource-metadata/apis/shared.ActionTemplate": schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplate(ref), "kmodules.xyz/resource-metadata/apis/shared.ActionTemplateGroup": schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplateGroup(ref), + "kmodules.xyz/resource-metadata/apis/shared.BootstrapPresets": schema_kmodulesxyz_resource_metadata_apis_shared_BootstrapPresets(ref), "kmodules.xyz/resource-metadata/apis/shared.Dashboard": schema_kmodulesxyz_resource_metadata_apis_shared_Dashboard(ref), "kmodules.xyz/resource-metadata/apis/shared.DashboardVar": schema_kmodulesxyz_resource_metadata_apis_shared_DashboardVar(ref), "kmodules.xyz/resource-metadata/apis/shared.DeploymentParameters": schema_kmodulesxyz_resource_metadata_apis_shared_DeploymentParameters(ref), + "kmodules.xyz/resource-metadata/apis/shared.HelmInfo": schema_kmodulesxyz_resource_metadata_apis_shared_HelmInfo(ref), + "kmodules.xyz/resource-metadata/apis/shared.HelmRelease": schema_kmodulesxyz_resource_metadata_apis_shared_HelmRelease(ref), + "kmodules.xyz/resource-metadata/apis/shared.HelmRepository": schema_kmodulesxyz_resource_metadata_apis_shared_HelmRepository(ref), "kmodules.xyz/resource-metadata/apis/shared.If": schema_kmodulesxyz_resource_metadata_apis_shared_If(ref), + "kmodules.xyz/resource-metadata/apis/shared.ImageRegistrySpec": schema_kmodulesxyz_resource_metadata_apis_shared_ImageRegistrySpec(ref), + "kmodules.xyz/resource-metadata/apis/shared.RegistryInfo": schema_kmodulesxyz_resource_metadata_apis_shared_RegistryInfo(ref), + "kmodules.xyz/resource-metadata/apis/shared.RegistryProxies": schema_kmodulesxyz_resource_metadata_apis_shared_RegistryProxies(ref), "kmodules.xyz/resource-metadata/apis/shared.ResourceLocator": schema_kmodulesxyz_resource_metadata_apis_shared_ResourceLocator(ref), "kmodules.xyz/resource-metadata/apis/shared.ResourceQuery": schema_kmodulesxyz_resource_metadata_apis_shared_ResourceQuery(ref), "kmodules.xyz/resource-metadata/apis/shared.SourceLocator": schema_kmodulesxyz_resource_metadata_apis_shared_SourceLocator(ref), @@ -14845,6 +14852,39 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplateGroup(ref co } } +func schema_kmodulesxyz_resource_metadata_apis_shared_BootstrapPresets(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "image": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.ImageRegistrySpec"), + }, + }, + "registry": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.RegistryInfo"), + }, + }, + "helm": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.HelmInfo"), + }, + }, + }, + Required: []string{"image", "registry", "helm"}, + }, + }, + Dependencies: []string{ + "kmodules.xyz/resource-metadata/apis/shared.HelmInfo", "kmodules.xyz/resource-metadata/apis/shared.ImageRegistrySpec", "kmodules.xyz/resource-metadata/apis/shared.RegistryInfo"}, + } +} + func schema_kmodulesxyz_resource_metadata_apis_shared_Dashboard(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -14961,6 +15001,137 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_DeploymentParameters(ref c } } +func schema_kmodulesxyz_resource_metadata_apis_shared_HelmInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "repositories": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.HelmRepository"), + }, + }, + }, + }, + }, + "releases": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.HelmRelease"), + }, + }, + }, + }, + }, + }, + Required: []string{"repositories", "releases"}, + }, + }, + Dependencies: []string{ + "kmodules.xyz/resource-metadata/apis/shared.HelmRelease", "kmodules.xyz/resource-metadata/apis/shared.HelmRepository"}, + } +} + +func schema_kmodulesxyz_resource_metadata_apis_shared_HelmRelease(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enabled": { + SchemaProps: spec.SchemaProps{ + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "values": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + Required: []string{"enabled", "version"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_kmodulesxyz_resource_metadata_apis_shared_HelmRepository(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "url": { + SchemaProps: spec.SchemaProps{ + Description: "URL of the Helm repository, a valid URL contains at least a protocol and host.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "secretName": { + SchemaProps: spec.SchemaProps{ + Description: "SecretRef specifies the Secret containing authentication credentials for the HelmRepository. For HTTP/S basic auth the secret must contain 'username' and 'password' fields. For TLS the secret must contain a 'certFile' and 'keyFile', and/or 'caFile' fields.", + Type: []string{"string"}, + Format: "", + }, + }, + "interval": { + SchemaProps: spec.SchemaProps{ + Description: "Interval at which to check the URL for updates.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "timeout": { + SchemaProps: spec.SchemaProps{ + Description: "The timeout of index downloading, defaults to 60s.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of the HelmRepository. When this field is set to \"oci\", the URL field value must be prefixed with \"oci://\".", + Type: []string{"string"}, + Format: "", + }, + }, + "provider": { + SchemaProps: spec.SchemaProps{ + Description: "Provider used for authentication, can be 'aws', 'azure', 'gcp' or 'generic'. This field is optional, and only taken into account if the .spec.type field is set to 'oci'. When not specified, defaults to 'generic'.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"url"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + func schema_kmodulesxyz_resource_metadata_apis_shared_If(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -14986,6 +15157,121 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_If(ref common.ReferenceCal } } +func schema_kmodulesxyz_resource_metadata_apis_shared_ImageRegistrySpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "registryFQDN": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "proxies": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.RegistryProxies"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kmodules.xyz/resource-metadata/apis/shared.RegistryProxies"}, + } +} + +func schema_kmodulesxyz_resource_metadata_apis_shared_RegistryInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "credentials": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"credentials"}, + }, + }, + } +} + +func schema_kmodulesxyz_resource_metadata_apis_shared_RegistryProxies(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "dockerHub": { + SchemaProps: spec.SchemaProps{ + Description: "company/bin:1.23", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "dockerLibrary": { + SchemaProps: spec.SchemaProps{ + Description: "alpine, nginx etc.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "ghcr": { + SchemaProps: spec.SchemaProps{ + Description: "ghcr.io", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "quay": { + SchemaProps: spec.SchemaProps{ + Description: "quay.io", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "kubernetes": { + SchemaProps: spec.SchemaProps{ + Description: "registry.k8s.io", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "appscode": { + SchemaProps: spec.SchemaProps{ + Description: "r.appscode.com", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + func schema_kmodulesxyz_resource_metadata_apis_shared_ResourceLocator(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceblockdefinitions.yaml b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceblockdefinitions.yaml index d72ba0104..9205bca18 100644 --- a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceblockdefinitions.yaml +++ b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceblockdefinitions.yaml @@ -84,7 +84,7 @@ spec: query: properties: byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,storage,view) + description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) enum: - authn - authz @@ -106,6 +106,7 @@ spec: - recommended_for - restore_into - scaled_by + - source - storage - view type: string diff --git a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcedescriptors.yaml b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcedescriptors.yaml index b606bd118..19d0917b8 100644 --- a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcedescriptors.yaml +++ b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcedescriptors.yaml @@ -46,7 +46,7 @@ spec: properties: labels: items: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,storage,view) + description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) enum: - authn - authz @@ -68,6 +68,7 @@ spec: - recommended_for - restore_into - scaled_by + - source - storage - view type: string @@ -205,7 +206,7 @@ spec: query: properties: byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,storage,view) + description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) enum: - authn - authz @@ -227,6 +228,7 @@ spec: - recommended_for - restore_into - scaled_by + - source - storage - view type: string diff --git a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcelayouts.yaml b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcelayouts.yaml index f9be1fb58..d172c2e83 100644 --- a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcelayouts.yaml +++ b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcelayouts.yaml @@ -85,7 +85,7 @@ spec: query: properties: byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,storage,view) + description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) enum: - authn - authz @@ -107,6 +107,7 @@ spec: - recommended_for - restore_into - scaled_by + - source - storage - view type: string @@ -322,7 +323,7 @@ spec: query: properties: byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,storage,view) + description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) enum: - authn - authz @@ -344,6 +345,7 @@ spec: - recommended_for - restore_into - scaled_by + - source - storage - view type: string @@ -585,7 +587,7 @@ spec: query: properties: byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,storage,view) + description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) enum: - authn - authz @@ -607,6 +609,7 @@ spec: - recommended_for - restore_into - scaled_by + - source - storage - view type: string @@ -821,7 +824,7 @@ spec: query: properties: byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,storage,view) + description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) enum: - authn - authz @@ -843,6 +846,7 @@ spec: - recommended_for - restore_into - scaled_by + - source - storage - view type: string @@ -1087,7 +1091,7 @@ spec: query: properties: byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,storage,view) + description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) enum: - authn - authz @@ -1109,6 +1113,7 @@ spec: - recommended_for - restore_into - scaled_by + - source - storage - view type: string diff --git a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceoutlines.yaml b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceoutlines.yaml index 899013797..1ac4810d2 100644 --- a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceoutlines.yaml +++ b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceoutlines.yaml @@ -172,7 +172,7 @@ spec: query: properties: byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,storage,view) + description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) enum: - authn - authz @@ -194,6 +194,7 @@ spec: - recommended_for - restore_into - scaled_by + - source - storage - view type: string @@ -411,7 +412,7 @@ spec: query: properties: byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,storage,view) + description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) enum: - authn - authz @@ -433,6 +434,7 @@ spec: - recommended_for - restore_into - scaled_by + - source - storage - view type: string @@ -676,7 +678,7 @@ spec: query: properties: byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,storage,view) + description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) enum: - authn - authz @@ -698,6 +700,7 @@ spec: - recommended_for - restore_into - scaled_by + - source - storage - view type: string @@ -914,7 +917,7 @@ spec: query: properties: byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,storage,view) + description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) enum: - authn - authz @@ -936,6 +939,7 @@ spec: - recommended_for - restore_into - scaled_by + - source - storage - view type: string @@ -1182,7 +1186,7 @@ spec: query: properties: byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,storage,view) + description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) enum: - authn - authz @@ -1204,6 +1208,7 @@ spec: - recommended_for - restore_into - scaled_by + - source - storage - view type: string diff --git a/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_resourcedashboards.yaml b/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_resourcedashboards.yaml index 724bc2219..745fde731 100644 --- a/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_resourcedashboards.yaml +++ b/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_resourcedashboards.yaml @@ -51,7 +51,7 @@ spec: query: properties: byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,storage,view) + description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) enum: - authn - authz @@ -73,6 +73,7 @@ spec: - recommended_for - restore_into - scaled_by + - source - storage - view type: string diff --git a/vendor/kmodules.xyz/resource-metadata/hub/helm.go b/vendor/kmodules.xyz/resource-metadata/hub/helm.go new file mode 100644 index 000000000..f11b20a8a --- /dev/null +++ b/vendor/kmodules.xyz/resource-metadata/hub/helm.go @@ -0,0 +1,150 @@ +/* +Copyright AppsCode Inc. and Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package hub + +import ( + "context" + "encoding/json" + "os" + + kmapi "kmodules.xyz/client-go/api/v1" + "kmodules.xyz/resource-metadata/apis/shared" + + fluxsrc "github.com/fluxcd/source-controller/api/v1beta2" + "sigs.k8s.io/controller-runtime/pkg/client" + chartsapi "x-helm.dev/apimachinery/apis/charts/v1alpha1" + releasesapi "x-helm.dev/apimachinery/apis/releases/v1alpha1" +) + +const ( + AppsCodeChartsLegacyURL = "https://charts.appscode.com/stable" + AppsCodeChartsOCIURL = "oci://r.appscode.com/charts" + FluxCDChartsURL = "https://fluxcd-community.github.io/helm-charts" +) + +const ( + bootstrapHelmRepositoryName = "bootstrap" + EnvVarBootstrapHelmRepositoryName = "BOOTSTRAP_HELM_REPOSITORY_NAME" + + bootstrapHelmRepositoryNamespace = "kubeops" + EnvVarBootstrapHelmRepositoryNamespace = "BOOTSTRAP_HELM_REPOSITORY_NAMESPACE" + + fluxcdHelmRepositoryName = "fluxcd-community" + EnvVarFluxcdHelmRepositoryName = "FLUXCD_HELM_REPOSITORY_NAME" + + BootstrapPresetsName = "bootstrap-presets" + + ChartACE = "ace" + ChartACEInstaller = "ace-installer" + ChartLicenseProxyServer = "license-proxyserver" + ChartOpscenterFeatures = "opscenter-features" + + ChartFluxCD = "flux2" + ChartFluxCDReleaseNamespace = "flux-system" +) + +func BootstrapHelmRepositoryNamespace() string { + ns := os.Getenv(EnvVarBootstrapHelmRepositoryNamespace) + if ns != "" { + return ns + } + return bootstrapHelmRepositoryNamespace +} + +func BootstrapHelmRepositoryName() string { + ns := os.Getenv(EnvVarBootstrapHelmRepositoryName) + if ns != "" { + return ns + } + return bootstrapHelmRepositoryName +} + +func FluxCDHelmRepositoryName() string { + ns := os.Getenv(EnvVarFluxcdHelmRepositoryName) + if ns != "" { + return ns + } + return fluxcdHelmRepositoryName +} + +func BootstrapHelmRepository(kc client.Client) kmapi.TypedObjectReference { + if kc != nil { + var repo fluxsrc.HelmRepository + err := kc.Get(context.TODO(), client.ObjectKey{Name: BootstrapHelmRepositoryName(), Namespace: BootstrapHelmRepositoryNamespace()}, &repo) + if err == nil { + return kmapi.TypedObjectReference{ + APIGroup: releasesapi.SourceGroupHelmRepository, + Kind: releasesapi.SourceKindHelmRepository, + Namespace: BootstrapHelmRepositoryNamespace(), + Name: BootstrapHelmRepositoryName(), + } + } + } + return kmapi.TypedObjectReference{ + APIGroup: releasesapi.SourceGroupLegacy, + Kind: releasesapi.SourceKindLegacy, + Namespace: "", + Name: AppsCodeChartsLegacyURL, + } +} + +func FluxCDHelmRepository(kc client.Client) kmapi.TypedObjectReference { + if kc != nil { + var repo fluxsrc.HelmRepository + err := kc.Get(context.TODO(), client.ObjectKey{Name: FluxCDHelmRepositoryName(), Namespace: BootstrapHelmRepositoryNamespace()}, &repo) + if err == nil { + return kmapi.TypedObjectReference{ + APIGroup: releasesapi.SourceGroupHelmRepository, + Kind: releasesapi.SourceKindHelmRepository, + Namespace: FluxCDHelmRepositoryName(), + Name: BootstrapHelmRepositoryName(), + } + } + } + return kmapi.TypedObjectReference{ + APIGroup: releasesapi.SourceGroupLegacy, + Kind: releasesapi.SourceKindLegacy, + Namespace: "", + Name: FluxCDChartsURL, + } +} + +func GetBootstrapPresets(kc client.Client) (*shared.BootstrapPresets, bool) { + if kc != nil { + var ccp chartsapi.ClusterChartPreset + err := kc.Get(context.TODO(), client.ObjectKey{Name: BootstrapPresetsName}, &ccp) + if err == nil { + var preset shared.BootstrapPresets + err := json.Unmarshal(ccp.Spec.Values.Raw, &preset) + if err == nil { + return &preset, true + } + } + } + return nil, false +} + +func FeatureVersion(kc client.Client, featureName string) string { + preset, found := GetBootstrapPresets(kc) + if found { + hr := preset.Helm.Releases[featureName] + if hr != nil { + return hr.Version + } + } + return "" +} diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceblockdefinitions/helm.toolkit.fluxcd.io/v2beta1/helmreleases.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceblockdefinitions/helm.toolkit.fluxcd.io/v2beta1/helmreleases.yaml index 577211189..1ff2d5999 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceblockdefinitions/helm.toolkit.fluxcd.io/v2beta1/helmreleases.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceblockdefinitions/helm.toolkit.fluxcd.io/v2beta1/helmreleases.yaml @@ -11,11 +11,32 @@ spec: kind: Connection name: HelmRepository query: - byLabel: offshoot + raw: |- + query Find($src: String!, $targetGroup: String!, $targetKind: String!) { + find(oid: $src) { + offshoot(group: "source.toolkit.fluxcd.io", kind: "HelmChart") { + refs: source(group: $targetGroup, kind: $targetKind) { + namespace + name + } + } + } + } type: GraphQL ref: group: source.toolkit.fluxcd.io kind: HelmRepository + - actions: + create: Never + displayMode: List + kind: Connection + name: HelmChart + query: + byLabel: offshoot + type: GraphQL + ref: + group: source.toolkit.fluxcd.io + kind: HelmChart resource: group: helm.toolkit.fluxcd.io kind: HelmRelease diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceblockdefinitions/source.toolkit.fluxcd.io/v1beta2/helmcharts.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceblockdefinitions/source.toolkit.fluxcd.io/v1beta2/helmcharts.yaml index 0466ff70f..7ef0c3478 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceblockdefinitions/source.toolkit.fluxcd.io/v1beta2/helmcharts.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceblockdefinitions/source.toolkit.fluxcd.io/v1beta2/helmcharts.yaml @@ -11,11 +11,22 @@ spec: kind: Connection name: HelmRepository query: - byLabel: offshoot + byLabel: source type: GraphQL ref: group: source.toolkit.fluxcd.io kind: HelmRepository + - actions: + create: Never + displayMode: List + kind: Connection + name: HelmRelease + query: + byLabel: offshoot + type: GraphQL + ref: + group: helm.toolkit.fluxcd.io + kind: HelmRelease resource: group: source.toolkit.fluxcd.io kind: HelmChart diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceblockdefinitions/source.toolkit.fluxcd.io/v1beta2/helmrepositories.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceblockdefinitions/source.toolkit.fluxcd.io/v1beta2/helmrepositories.yaml index 733d0222b..ad86b934d 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceblockdefinitions/source.toolkit.fluxcd.io/v1beta2/helmrepositories.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceblockdefinitions/source.toolkit.fluxcd.io/v1beta2/helmrepositories.yaml @@ -11,7 +11,7 @@ spec: kind: Connection name: HelmCharts query: - byLabel: offshoot + byLabel: source type: GraphQL ref: group: source.toolkit.fluxcd.io @@ -22,7 +22,17 @@ spec: kind: Connection name: HelmReleases query: - byLabel: offshoot + raw: |- + query Find($src: String!, $targetGroup: String!, $targetKind: String!) { + find(oid: $src) { + source(group: "source.toolkit.fluxcd.io", kind: "HelmChart") { + refs: offshoot(group: $targetGroup, kind: $targetKind) { + namespace + name + } + } + } + } type: GraphQL ref: group: helm.toolkit.fluxcd.io diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/helm.toolkit.fluxcd.io/v2beta1/helmreleases.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/helm.toolkit.fluxcd.io/v2beta1/helmreleases.yaml index 9f4b4bf01..d7dddbf8a 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/helm.toolkit.fluxcd.io/v2beta1/helmreleases.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/helm.toolkit.fluxcd.io/v2beta1/helmreleases.yaml @@ -13,10 +13,10 @@ spec: - labels: - offshoot references: - - '{.spec.chart.spec.sourceRef.name}' + - '{.metadata.namespace}-{.spec.chart.spec.chart}' target: apiVersion: source.toolkit.fluxcd.io/v1beta2 - kind: HelmRepository + kind: HelmChart type: MatchRef resource: group: helm.toolkit.fluxcd.io diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/source.toolkit.fluxcd.io/v1beta2/helmcharts.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/source.toolkit.fluxcd.io/v1beta2/helmcharts.yaml index 60aef085d..8f305a49b 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/source.toolkit.fluxcd.io/v1beta2/helmcharts.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/source.toolkit.fluxcd.io/v1beta2/helmcharts.yaml @@ -11,7 +11,7 @@ metadata: spec: connections: - labels: - - offshoot + - source references: - '{.spec.sourceRef.name}' target: diff --git a/vendor/modules.txt b/vendor/modules.txt index 3345149ac..cd53b25bc 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1803,7 +1803,7 @@ kmodules.xyz/authorizer/apiserver kmodules.xyz/authorizer/rbac kmodules.xyz/authorizer/rbac/helpers kmodules.xyz/authorizer/rbac/validation -# kmodules.xyz/client-go v0.25.39 +# kmodules.xyz/client-go v0.25.40 ## explicit; go 1.18 kmodules.xyz/client-go kmodules.xyz/client-go/api/v1 @@ -1839,7 +1839,7 @@ kmodules.xyz/monitoring-agent-api/client # kmodules.xyz/offshoot-api v0.25.4 ## explicit; go 1.18 kmodules.xyz/offshoot-api/api/v1 -# kmodules.xyz/resource-metadata v0.17.31 +# kmodules.xyz/resource-metadata v0.17.35 ## explicit; go 1.18 kmodules.xyz/resource-metadata/apis/core/install kmodules.xyz/resource-metadata/apis/core/v1alpha1 @@ -2039,7 +2039,7 @@ sigs.k8s.io/structured-merge-diff/v4/value # sigs.k8s.io/yaml v1.3.0 ## explicit; go 1.12 sigs.k8s.io/yaml -# x-helm.dev/apimachinery v0.0.13 +# x-helm.dev/apimachinery v0.0.15 ## explicit; go 1.19 x-helm.dev/apimachinery/apis/charts/v1alpha1 x-helm.dev/apimachinery/apis/releases/v1alpha1