From 17c9e7ff83c9be1d82c424f5a1e50e238c570f79 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Wed, 7 Feb 2024 01:31:07 -0800 Subject: [PATCH] Add petset,sidekick,superisor charts to kubedb Signed-off-by: Tamal Saha --- apis/installer/v1alpha1/kubedb_types.go | 19 +++++++ .../v1alpha1/zz_generated.deepcopy.go | 51 +++++++++++++++++++ charts/kubedb/Chart.lock | 13 ++++- charts/kubedb/Chart.yaml | 12 +++++ charts/kubedb/README.md | 3 ++ charts/kubedb/ci/ci-values.yaml | 13 +++++ charts/kubedb/templates/_helpers.tpl | 14 +++++ charts/kubedb/values.openapiv3_schema.yaml | 21 ++++++++ charts/kubedb/values.yaml | 9 ++++ 9 files changed, 153 insertions(+), 2 deletions(-) diff --git a/apis/installer/v1alpha1/kubedb_types.go b/apis/installer/v1alpha1/kubedb_types.go index 4ba33352e..447b4a540 100644 --- a/apis/installer/v1alpha1/kubedb_types.go +++ b/apis/installer/v1alpha1/kubedb_types.go @@ -43,6 +43,13 @@ type Kubedb struct { type KubedbSpec struct { Global GlobalValues `json:"global"` + //+optional + Petset PetsetValues `json:"petset"` + //+optional + Sidekick SidekickValues `json:"sidekick"` + //+optional + Supervisor SupervisorValues `json:"supervisor"` + //+optional KubedbCrdManager KubedbCrdManagerValues `json:"kubedb-crd-manager"` @@ -71,6 +78,18 @@ type KubedbSpec struct { KubedbMetrics KubedbMetricsValues `json:"kubedb-metrics"` } +type PetsetValues struct { + Enabled bool `json:"enabled"` +} + +type SidekickValues struct { + Enabled bool `json:"enabled"` +} + +type SupervisorValues struct { + Enabled bool `json:"enabled"` +} + type KubedbCrdManagerValues struct { Enabled *bool `json:"enabled"` *KubedbCrdManagerSpec `json:",inline,omitempty"` diff --git a/apis/installer/v1alpha1/zz_generated.deepcopy.go b/apis/installer/v1alpha1/zz_generated.deepcopy.go index 244979b52..83173c521 100644 --- a/apis/installer/v1alpha1/zz_generated.deepcopy.go +++ b/apis/installer/v1alpha1/zz_generated.deepcopy.go @@ -1834,6 +1834,9 @@ func (in *KubedbSchemaManagerValues) DeepCopy() *KubedbSchemaManagerValues { func (in *KubedbSpec) DeepCopyInto(out *KubedbSpec) { *out = *in in.Global.DeepCopyInto(&out.Global) + out.Petset = in.Petset + out.Sidekick = in.Sidekick + out.Supervisor = in.Supervisor in.KubedbCrdManager.DeepCopyInto(&out.KubedbCrdManager) in.KubedbProvisioner.DeepCopyInto(&out.KubedbProvisioner) in.KubedbCatalog.DeepCopyInto(&out.KubedbCatalog) @@ -2513,6 +2516,22 @@ func (in *PSPSpec) DeepCopy() *PSPSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PetsetValues) DeepCopyInto(out *PetsetValues) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PetsetValues. +func (in *PetsetValues) DeepCopy() *PetsetValues { + if in == nil { + return nil + } + out := new(PetsetValues) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PostgresBackup) DeepCopyInto(out *PostgresBackup) { *out = *in @@ -2836,6 +2855,22 @@ func (in *ServingCerts) DeepCopy() *ServingCerts { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SidekickValues) DeepCopyInto(out *SidekickValues) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SidekickValues. +func (in *SidekickValues) DeepCopy() *SidekickValues { + if in == nil { + return nil + } + out := new(SidekickValues) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *StashElasticsearchSpec) DeepCopyInto(out *StashElasticsearchSpec) { *out = *in @@ -3005,6 +3040,22 @@ func (in *StorageClassSpec) DeepCopy() *StorageClassSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SupervisorValues) DeepCopyInto(out *SupervisorValues) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SupervisorValues. +func (in *SupervisorValues) DeepCopy() *SupervisorValues { + if in == nil { + return nil + } + out := new(SupervisorValues) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *WebHookSpec) DeepCopyInto(out *WebHookSpec) { *out = *in diff --git a/charts/kubedb/Chart.lock b/charts/kubedb/Chart.lock index f42f2bc49..44aa8463a 100644 --- a/charts/kubedb/Chart.lock +++ b/charts/kubedb/Chart.lock @@ -1,4 +1,13 @@ dependencies: +- name: petset + repository: oci://ghcr.io/appscode-charts + version: v0.0.1 +- name: sidekick + repository: oci://ghcr.io/appscode-charts + version: v2024.2.6 +- name: supervisor + repository: oci://ghcr.io/appscode-charts + version: v2024.2.6 - name: kubedb-crd-manager repository: file://../kubedb-crd-manager version: v0.0.4 @@ -26,5 +35,5 @@ dependencies: - name: kubedb-kubestash-catalog repository: file://../kubedb-kubestash-catalog version: v2024.1.31 -digest: sha256:b817553303178bd22bbf044e0ef78f700015aa275f8d6f8607b024c31c438d04 -generated: "2024-02-02T03:23:18.689980961Z" +digest: sha256:6b8546db94a95c1dd3320e7ed84376aa02941852d7b4c9d933dfc7c4d068f406 +generated: "2024-02-07T01:21:45.653134-08:00" diff --git a/charts/kubedb/Chart.yaml b/charts/kubedb/Chart.yaml index 285d83bea..06575eb41 100644 --- a/charts/kubedb/Chart.yaml +++ b/charts/kubedb/Chart.yaml @@ -12,6 +12,18 @@ maintainers: - name: appscode email: support@appscode.com dependencies: +- name: petset + repository: oci://ghcr.io/appscode-charts + condition: petset.enabled + version: v0.0.1 +- name: sidekick + repository: oci://ghcr.io/appscode-charts + condition: sidekick.enabled + version: v2024.2.6 +- name: supervisor + repository: oci://ghcr.io/appscode-charts + condition: supervisor.enabled + version: v2024.2.6 - name: kubedb-crd-manager repository: file://../kubedb-crd-manager condition: kubedb-crd-manager.enabled diff --git a/charts/kubedb/README.md b/charts/kubedb/README.md index 0b32ed1ed..37c67f247 100644 --- a/charts/kubedb/README.md +++ b/charts/kubedb/README.md @@ -74,6 +74,9 @@ The following table lists the configurable parameters of the `kubedb` chart and | global.featureGates.ZooKeeper | | false | | global.monitoring.agent | Name of monitoring agent (one of "prometheus.io", "prometheus.io/operator", "prometheus.io/builtin") | "" | | global.monitoring.serviceMonitor.labels | Specify the labels for ServiceMonitor. Prometheus crd will select ServiceMonitor using these labels. Only usable when monitoring agent is `prometheus.io/operator`. | {"monitoring.appscode.com/prometheus":"auto"} | +| petset.enabled | If enabled, installs the petset chart | true | +| sidekick.enabled | If enabled, installs the sidekick chart | true | +| supervisor.enabled | If enabled, installs the supervisor chart | true | | kubedb-crd-manager.enabled | If enabled, installs the kubedb-crd-manager chart | true | | kubedb-provisioner.enabled | If enabled, installs the kubedb-provisioner chart | true | | kubedb-webhook-server.enabled | If enabled, installs the kubedb-webhook-server chart | true | diff --git a/charts/kubedb/ci/ci-values.yaml b/charts/kubedb/ci/ci-values.yaml index a46a7166a..229f9fdd8 100644 --- a/charts/kubedb/ci/ci-values.yaml +++ b/charts/kubedb/ci/ci-values.yaml @@ -31,3 +31,16 @@ kubedb-webhook-server: securityContext: seccompProfile: type: RuntimeDefault +petset: + operator: + securityContext: + seccompProfile: + type: RuntimeDefault + rbacproxy: + securityContext: + seccompProfile: + type: RuntimeDefault + cleaner: + securityContext: + seccompProfile: + type: RuntimeDefault diff --git a/charts/kubedb/templates/_helpers.tpl b/charts/kubedb/templates/_helpers.tpl index 15913a557..fc93b5771 100644 --- a/charts/kubedb/templates/_helpers.tpl +++ b/charts/kubedb/templates/_helpers.tpl @@ -102,6 +102,20 @@ Returns the registry used for cleaner docker image {{- list (default .Values.registryFQDN .Values.global.registryFQDN) (default .Values.cleaner.registry .Values.global.registry) | compact | join "/" }} {{- end }} +{{/* +Returns the registry used for image docker image +*/}} +{{- define "image.registry" -}} +{{- list (default .Values.registryFQDN .Values.global.registryFQDN) (default .Values.image.registry .Values.global.registry) | compact | join "/" }} +{{- end }} + +{{/* +Returns the registry used for rbacproxy docker rbacproxy +*/}} +{{- define "rbacproxy.registry" -}} +{{- list (default .Values.registryFQDN .Values.global.registryFQDN) (default .Values.rbacproxy.registry .Values.global.registry) | compact | join "/" }} +{{- end }} + {{/* Returns the appscode image pull secrets */}} diff --git a/charts/kubedb/values.openapiv3_schema.yaml b/charts/kubedb/values.openapiv3_schema.yaml index e967baf1c..f05bf996b 100644 --- a/charts/kubedb/values.openapiv3_schema.yaml +++ b/charts/kubedb/values.openapiv3_schema.yaml @@ -9029,6 +9029,27 @@ properties: - server - serviceAccount type: object + petset: + properties: + enabled: + type: boolean + required: + - enabled + type: object + sidekick: + properties: + enabled: + type: boolean + required: + - enabled + type: object + supervisor: + properties: + enabled: + type: boolean + required: + - enabled + type: object required: - global type: object diff --git a/charts/kubedb/values.yaml b/charts/kubedb/values.yaml index 4b6b9d5aa..8d75f2e20 100644 --- a/charts/kubedb/values.yaml +++ b/charts/kubedb/values.yaml @@ -71,6 +71,15 @@ global: labels: # +doc-gen:break monitoring.appscode.com/prometheus: auto +petset: + # If enabled, installs the petset chart + enabled: true +sidekick: + # If enabled, installs the sidekick chart + enabled: true +supervisor: + # If enabled, installs the supervisor chart + enabled: true kubedb-crd-manager: # If enabled, installs the kubedb-crd-manager chart enabled: true