From 2fb0733b7858d84d7fdf28d2ea813701a7d5f549 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Sun, 29 Oct 2023 18:37:13 -0700 Subject: [PATCH] Modify ace options schema Signed-off-by: Tamal Saha --- apis/installer/v1alpha1/ace_options_types.go | 12 ++- .../v1alpha1/zz_generated.deepcopy.go | 26 +++++-- .../ace-options/values.openapiv3_schema.yaml | 73 +++++++++++-------- 3 files changed, 70 insertions(+), 41 deletions(-) diff --git a/apis/installer/v1alpha1/ace_options_types.go b/apis/installer/v1alpha1/ace_options_types.go index eb5bbf530..63ee3b43a 100644 --- a/apis/installer/v1alpha1/ace_options_types.go +++ b/apis/installer/v1alpha1/ace_options_types.go @@ -70,15 +70,21 @@ type AceOptionsSpec struct { } type RegistrySpec struct { - shared.ImageRegistrySpec `json:",inline,omitempty"` //+optional - Repositories HelmRepositories `json:"repositories"` + Image shared.ImageRegistrySpec `json:"image"` + //+optional + Registry shared.RegistryInfo `json:"registry"` + //+optional + Helm HelmOptions `json:"helm"` //+optional AllowNondistributableArtifacts bool `json:"allowNondistributableArtifacts"` //+optional Insecure bool `json:"insecure"` +} + +type HelmOptions struct { //+optional - ImagePullSecrets []string `json:"imagePullSecrets"` + Repositories HelmRepositories `json:"repositories"` } type HelmRepositories struct { diff --git a/apis/installer/v1alpha1/zz_generated.deepcopy.go b/apis/installer/v1alpha1/zz_generated.deepcopy.go index a2a94298c..1ebf62817 100644 --- a/apis/installer/v1alpha1/zz_generated.deepcopy.go +++ b/apis/installer/v1alpha1/zz_generated.deepcopy.go @@ -2875,6 +2875,22 @@ func (in *HealthcheckSpec) DeepCopy() *HealthcheckSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmOptions) DeepCopyInto(out *HelmOptions) { + *out = *in + out.Repositories = in.Repositories +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmOptions. +func (in *HelmOptions) DeepCopy() *HelmOptions { + if in == nil { + return nil + } + out := new(HelmOptions) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *HelmRepositories) DeepCopyInto(out *HelmRepositories) { *out = *in @@ -6120,13 +6136,9 @@ func (in *ProviderMount) DeepCopy() *ProviderMount { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RegistrySpec) DeepCopyInto(out *RegistrySpec) { *out = *in - out.ImageRegistrySpec = in.ImageRegistrySpec - out.Repositories = in.Repositories - if in.ImagePullSecrets != nil { - in, out := &in.ImagePullSecrets, &out.ImagePullSecrets - *out = make([]string, len(*in)) - copy(*out, *in) - } + out.Image = in.Image + in.Registry.DeepCopyInto(&out.Registry) + out.Helm = in.Helm } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistrySpec. diff --git a/schema/ace-options/values.openapiv3_schema.yaml b/schema/ace-options/values.openapiv3_schema.yaml index 8f932a45a..2ee2a78e3 100644 --- a/schema/ace-options/values.openapiv3_schema.yaml +++ b/schema/ace-options/values.openapiv3_schema.yaml @@ -1014,42 +1014,53 @@ properties: properties: allowNondistributableArtifacts: type: boolean - imagePullSecrets: - items: - type: string - type: array - insecure: - type: boolean - proxies: + helm: properties: - appscode: - description: r.appscode.com - type: string - dockerHub: - description: company/bin:1.23 - type: string - dockerLibrary: - description: alpine, nginx etc. - type: string - ghcr: - description: ghcr.io - type: string - kubernetes: - description: registry.k8s.io - type: string - quay: - description: quay.io - type: string + repositories: + properties: + appscode-charts-legacy: + type: string + appscode-charts-oci: + type: string + type: object type: object - registryFQDN: - type: string - repositories: + image: properties: - appscode-charts-legacy: - type: string - appscode-charts-oci: + proxies: + properties: + appscode: + description: r.appscode.com + type: string + dockerHub: + description: company/bin:1.23 + type: string + dockerLibrary: + description: alpine, nginx etc. + type: string + ghcr: + description: ghcr.io + type: string + kubernetes: + description: registry.k8s.io + type: string + quay: + description: quay.io + type: string + type: object + registryFQDN: type: string type: object + insecure: + type: boolean + registry: + properties: + credentials: + additionalProperties: + type: string + type: object + required: + - credentials + type: object type: object release: description: ObjectReference contains enough information to let you inspect or