diff --git a/apis/installer/v1alpha1/ace_options_types.go b/apis/installer/v1alpha1/ace_options_types.go index e9ca3c3bc..829710c8a 100644 --- a/apis/installer/v1alpha1/ace_options_types.go +++ b/apis/installer/v1alpha1/ace_options_types.go @@ -91,6 +91,9 @@ type RegistryProxies struct { // ghcr.io //+optional GHCR string `json:"ghcr"` + // quay.io + //+optional + Quay string `json:"quay"` // registry.k8s.io //+optional Kubernetes string `json:"kubernetes"` diff --git a/charts/ace-installer/README.md b/charts/ace-installer/README.md index bf7ac8a2f..5cb58cc83 100644 --- a/charts/ace-installer/README.md +++ b/charts/ace-installer/README.md @@ -45,65 +45,66 @@ The command removes all the Kubernetes components associated with the chart and The following table lists the configurable parameters of the `ace-installer` chart and their default values. -| Parameter | Description | Default | -|--------------------------------------------------------------------------|-------------------------|---------------------------------------------------------| -| nameOverride | | "" | -| fullnameOverride | | "" | -| image.registryFQDN | | "" | -| image.proxies.appscode | r.appscode.com | "" | -| image.proxies.dockerHub | company/bin:tag | "" | -| image.proxies.dockerLibrary | alpine, nginx etc. | "" | -| image.proxies.ghcr | ghcr.io/company/bin:tag | "" | -| image.proxies.kubernetes | registry.k8s.io/bin:tag | "" | -| registry.credentials | | {} | -| helm.repositories.bootstrap.interval | | 1h0m0s | -| helm.repositories.bootstrap.url | | https://charts.appscode.com/stable | -| helm.repositories.stakater.interval | | 1h0m0s | -| helm.repositories.stakater.url | | https://stakater.github.io/stakater-charts | -| helm.releases.ace.enabled | | false | -| helm.releases.ace.version | | "v2023.10.18" | -| helm.releases.cert-manager-csi-driver-cacerts.enabled | | true | -| helm.releases.cert-manager-csi-driver-cacerts.version | | "v2023.10.1" | -| helm.releases.cert-manager-webhook-ace.enabled | | true | -| helm.releases.cert-manager-webhook-ace.version | | "v2023.10.18" | -| helm.releases.cert-manager.enabled | | true | -| helm.releases.cert-manager.version | | "v1.11.0" | -| helm.releases.cert-manager.values.installCRDs | | true | -| helm.releases.kubedb.enabled | | true | -| helm.releases.kubedb.version | | "v2023.10.26-rc.0" | -| helm.releases.kubedb.values.kubedb-provisioner.enabled | | true | -| helm.releases.kubedb.values.kubedb-catalog.enabled | | true | -| helm.releases.kubedb.values.kubedb-ops-manager.enabled | | true | -| helm.releases.kubedb.values.kubedb-autoscaler.enabled | | false | -| helm.releases.kubedb.values.kubedb-dashboard.enabled | | false | -| helm.releases.kubedb.values.kubedb-schema-manager.enabled | | false | -| helm.releases.kubedb.values.kubedb-metrics.enabled | | false | -| helm.releases.docker-machine-operator.enabled | | true | -| helm.releases.docker-machine-operator.version | | "v2023.10.18" | -| helm.releases.external-dns-operator.enabled | | true | -| helm.releases.external-dns-operator.version | | "v2023.10.1" | -| helm.releases.license-proxyserver.enabled | | true | -| helm.releases.license-proxyserver.version | | "v2023.10.18" | -| helm.releases.reloader.enabled | | true | -| helm.releases.reloader.version | | "v1.0.24" | -| helm.releases.kube-prometheus-stack.enabled | | true | -| helm.releases.kube-prometheus-stack.version | | "" | -| helm.releases.opscenter-features.enabled | | true | -| helm.releases.opscenter-features.version | | "v2023.10.18" | -| helm.releases.panopticon.enabled | | true | -| helm.releases.panopticon.version | | "v2023.10.1" | -| helm.releases.panopticon.values.monitoring.enabled | | true | -| helm.releases.panopticon.values.monitoring.agent | | prometheus.io/operator | -| helm.releases.panopticon.values.monitoring.serviceMonitor.labels.release | | kube-prometheus-stack | -| helm.releases.stash.enabled | | true | -| helm.releases.stash.version | | "v2023.10.9" | -| helm.releases.stash.values.features.enterprise | | true | +| Parameter | Description | Default | +|--------------------------------------------------------------------------|-------------|---------------------------------------------------------| +| nameOverride | | "" | +| fullnameOverride | | "" | +| image.registryFQDN | | harbor.appscode.ninja | +| image.proxies.dockerHub | | harbor.appscode.ninja/dockerhub | +| image.proxies.dockerLibrary | | "" | +| image.proxies.ghcr | | harbor.appscode.ninja/ghcr | +| image.proxies.quay | | harbor.appscode.ninja/quay | +| image.proxies.kubernetes | | harbor.appscode.ninja/k8s | +| image.proxies.appscode | | harbor.appscode.ninja/ac | +| registry.credentials | | {} | +| helm.repositories.bootstrap.interval | | 1h0m0s | +| helm.repositories.bootstrap.url | | https://charts.appscode.com/stable | +| helm.repositories.stakater.interval | | 1h0m0s | +| helm.repositories.stakater.url | | https://stakater.github.io/stakater-charts | +| helm.releases.ace.enabled | | false | +| helm.releases.ace.version | | "v2023.10.18" | +| helm.releases.cert-manager-csi-driver-cacerts.enabled | | true | +| helm.releases.cert-manager-csi-driver-cacerts.version | | "v2023.10.1" | +| helm.releases.cert-manager-webhook-ace.enabled | | true | +| helm.releases.cert-manager-webhook-ace.version | | "v2023.10.18" | +| helm.releases.cert-manager.enabled | | true | +| helm.releases.cert-manager.version | | "v1.11.0" | +| helm.releases.cert-manager.values.installCRDs | | true | +| helm.releases.kubedb.enabled | | true | +| helm.releases.kubedb.version | | "v2023.10.26-rc.0" | +| helm.releases.kubedb.values.kubedb-provisioner.enabled | | true | +| helm.releases.kubedb.values.kubedb-catalog.enabled | | true | +| helm.releases.kubedb.values.kubedb-ops-manager.enabled | | true | +| helm.releases.kubedb.values.kubedb-autoscaler.enabled | | false | +| helm.releases.kubedb.values.kubedb-dashboard.enabled | | false | +| helm.releases.kubedb.values.kubedb-schema-manager.enabled | | false | +| helm.releases.kubedb.values.kubedb-metrics.enabled | | false | +| helm.releases.docker-machine-operator.enabled | | true | +| helm.releases.docker-machine-operator.version | | "v2023.10.18" | +| helm.releases.external-dns-operator.enabled | | true | +| helm.releases.external-dns-operator.version | | "v2023.10.1" | +| helm.releases.license-proxyserver.enabled | | true | +| helm.releases.license-proxyserver.version | | "v2023.10.18" | +| helm.releases.reloader.enabled | | true | +| helm.releases.reloader.version | | "v1.0.24" | +| helm.releases.kube-prometheus-stack.enabled | | true | +| helm.releases.kube-prometheus-stack.version | | "" | +| helm.releases.opscenter-features.enabled | | true | +| helm.releases.opscenter-features.version | | "v2023.10.18" | +| helm.releases.panopticon.enabled | | true | +| helm.releases.panopticon.version | | "v2023.10.1" | +| helm.releases.panopticon.values.monitoring.enabled | | true | +| helm.releases.panopticon.values.monitoring.agent | | prometheus.io/operator | +| helm.releases.panopticon.values.monitoring.serviceMonitor.labels.release | | kube-prometheus-stack | +| helm.releases.stash.enabled | | true | +| helm.releases.stash.version | | "v2023.10.9" | +| helm.releases.stash.values.features.enterprise | | true | Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade -i`. For example: ```bash -$ helm upgrade -i ace-installer appscode/ace-installer -n kubeops --create-namespace --version=v2023.10.18 --set helm.repositories.bootstrap.interval=1h0m0s +$ helm upgrade -i ace-installer appscode/ace-installer -n kubeops --create-namespace --version=v2023.10.18 --set image.registryFQDN=harbor.appscode.ninja ``` Alternatively, a YAML file that specifies the values for the parameters can be provided while diff --git a/charts/ace-installer/templates/_helpers.tpl b/charts/ace-installer/templates/_helpers.tpl index 23f2f90aa..81360da94 100644 --- a/charts/ace-installer/templates/_helpers.tpl +++ b/charts/ace-installer/templates/_helpers.tpl @@ -49,3 +49,57 @@ Selector labels app.kubernetes.io/name: {{ include "ace-installer.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} + +{{/* +Registry Proxy Templates +*/}} +{{- define "registry.dockerHub" -}} +{{ prepend (list ._repo) (list .Values.image.proxies.dockerHub .Values.image.registryFQDN | compact | first) | compact | join "/" }} +{{- end }} + +{{- define "registry.dockerLibrary" -}} +{{ prepend (list ._repo) (list .Values.image.proxies.dockerLibrary .Values.image.proxies.dockerHub .Values.image.registryFQDN | compact | first) | compact | join "/" }} +{{- end }} + +{{- define "registry.ghcr" -}} +{{ prepend (list ._repo) (list .Values.image.proxies.ghcr .Values.image.registryFQDN | compact | first) | compact | join "/" }} +{{- end }} + +{{- define "registry.quay" -}} +{{ prepend (list ._repo) (list .Values.image.proxies.quay .Values.image.registryFQDN | compact | first) | compact | join "/" }} +{{- end }} + +{{- define "registry.kubernetes" -}} +{{ prepend (list ._repo) (list .Values.image.proxies.kubernetes .Values.image.registryFQDN | compact | first) | compact | join "/" }} +{{- end }} + +{{- define "registry.appscode" -}} +{{ prepend (list ._repo) (list .Values.image.proxies.appscode .Values.image.registryFQDN | compact | first) | compact | join "/" }} +{{- end }} + +{{/* +Image Templates +*/}} +{{- define "image.dockerHub" -}} +{{ prepend (list ._repo) (list .Values.image.proxies.dockerHub .Values.image.registryFQDN | compact | first) | compact | join "/" }} +{{- end }} + +{{- define "image.dockerLibrary" -}} +{{ prepend (list ._repo) (list .Values.image.proxies.dockerLibrary .Values.image.proxies.dockerHub .Values.image.registryFQDN | compact | first) | compact | join "/" }} +{{- end }} + +{{- define "image.ghcr" -}} +{{ prepend (list ._repo) (list .Values.image.proxies.ghcr .Values.image.registryFQDN | compact | first) | compact | join "/" }} +{{- end }} + +{{- define "image.quay" -}} +{{ prepend (list ._repo) (list .Values.image.proxies.quay .Values.image.registryFQDN | compact | first) | compact | join "/" }} +{{- end }} + +{{- define "image.kubernetes" -}} +{{ prepend (list ._repo) (list .Values.image.proxies.kubernetes .Values.image.registryFQDN | compact | first) | compact | join "/" }} +{{- end }} + +{{- define "image.appscode" -}} +{{ prepend (list ._repo) (list .Values.image.proxies.appscode .Values.image.registryFQDN | compact | first) | compact | join "/" }} +{{- end }} diff --git a/charts/ace-installer/templates/apps/cert-manager/cert-manager-csi-driver-cacerts.yaml b/charts/ace-installer/templates/apps/cert-manager/cert-manager-csi-driver-cacerts.yaml index 5fab03f5e..c24578186 100644 --- a/charts/ace-installer/templates/apps/cert-manager/cert-manager-csi-driver-cacerts.yaml +++ b/charts/ace-installer/templates/apps/cert-manager/cert-manager-csi-driver-cacerts.yaml @@ -1,6 +1,11 @@ {{- with (index .Values "helm" "releases" "cert-manager-csi-driver-cacerts") }} {{- if .enabled }} +{{ $overrides := dict "registryFQDN" (include "registry.ghcr" $) }} + +{{ $vals := dig "values" dict . }} +{{ $vals = mergeOverwrite $vals $overrides }} + apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: @@ -35,7 +40,7 @@ spec: kind: HelmRepository name: kubeops namespace: {{ $.Release.Namespace }} -{{- with (dig "values" dict .) }} +{{- with $vals }} {{- dict "values" . | toYaml | nindent 2 }} {{- end }} diff --git a/charts/ace-installer/templates/apps/cert-manager/cert-manager-webhook-ace.yaml b/charts/ace-installer/templates/apps/cert-manager/cert-manager-webhook-ace.yaml index 0b9fab257..63b07dfaa 100644 --- a/charts/ace-installer/templates/apps/cert-manager/cert-manager-webhook-ace.yaml +++ b/charts/ace-installer/templates/apps/cert-manager/cert-manager-webhook-ace.yaml @@ -1,6 +1,11 @@ {{- with (index .Values "helm" "releases" "cert-manager-webhook-ace") }} {{- if .enabled }} +{{ $overrides := dict "registryFQDN" (include "registry.ghcr" $) }} + +{{ $vals := dig "values" dict . }} +{{ $vals = mergeOverwrite $vals $overrides }} + apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: @@ -35,7 +40,7 @@ spec: kind: HelmRepository name: bytebuilders namespace: {{ $.Release.Namespace }} -{{- with (dig "values" dict .) }} +{{- with $vals }} {{- dict "values" . | toYaml | nindent 2 }} {{- end }} diff --git a/charts/ace-installer/templates/apps/cert-manager/cert-manager.yaml b/charts/ace-installer/templates/apps/cert-manager/cert-manager.yaml index c757030cd..ba2a5790b 100644 --- a/charts/ace-installer/templates/apps/cert-manager/cert-manager.yaml +++ b/charts/ace-installer/templates/apps/cert-manager/cert-manager.yaml @@ -1,6 +1,16 @@ {{- with (index .Values "helm" "releases" "cert-manager") }} {{- if .enabled }} +{{ $overrides := printf ` +image: + repository: %s +webhook: + image: + repository: %s` (include "image.quay" (merge (dict "_repo" "jetstack/cert-manager-controller") $)) (include "image.quay" (merge (dict "_repo" "jetstack/cert-manager-webhook") $)) | fromYaml }} + +{{ $vals := dig "values" dict . }} +{{ $vals = mergeOverwrite $vals $overrides }} + apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: @@ -33,7 +43,7 @@ spec: kind: HelmRepository name: jetstack namespace: {{ $.Release.Namespace }} -{{- with (dig "values" dict .) }} +{{- with $vals }} {{- dict "values" . | toYaml | nindent 2 }} {{- end }} diff --git a/charts/ace-installer/templates/apps/kubedb/kubedb.yaml b/charts/ace-installer/templates/apps/kubedb/kubedb.yaml index 9df539505..9efe7878a 100644 --- a/charts/ace-installer/templates/apps/kubedb/kubedb.yaml +++ b/charts/ace-installer/templates/apps/kubedb/kubedb.yaml @@ -1,6 +1,15 @@ {{- with (index .Values "helm" "releases" "kubedb") }} {{- if .enabled }} +{{ $overrides := printf ` +global: + registryFQDN: %q + ` (include "registry.ghcr" $) | fromYaml }} +{{ $_ := set $overrides.global "kubedb-catalog" $.Values.image }} + +{{ $vals := dig "values" dict . }} +{{ $vals = mergeOverwrite $vals $overrides }} + apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: @@ -39,7 +48,7 @@ spec: kind: HelmRepository name: kubedb namespace: {{ $.Release.Namespace }} -{{- with (dig "values" dict .) }} +{{- with $vals }} {{- dict "values" . | toYaml | nindent 2 }} {{- end }} diff --git a/charts/ace-installer/templates/apps/kubeops/docker-machine-operator.yaml b/charts/ace-installer/templates/apps/kubeops/docker-machine-operator.yaml index c621ee3a3..3d223c128 100644 --- a/charts/ace-installer/templates/apps/kubeops/docker-machine-operator.yaml +++ b/charts/ace-installer/templates/apps/kubeops/docker-machine-operator.yaml @@ -1,6 +1,11 @@ {{- with (index .Values "helm" "releases" "docker-machine-operator") }} {{- if .enabled }} +{{ $overrides := dict "registryFQDN" (include "registry.ghcr" $) }} + +{{ $vals := dig "values" dict . }} +{{ $vals = mergeOverwrite $vals $overrides }} + apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: @@ -33,7 +38,7 @@ spec: kind: HelmRepository name: kubeops namespace: {{ $.Release.Namespace }} -{{- with (dig "values" dict .) }} +{{- with $vals }} {{- dict "values" . | toYaml | nindent 2 }} {{- end }} diff --git a/charts/ace-installer/templates/apps/kubeops/external-dns-operator.yaml b/charts/ace-installer/templates/apps/kubeops/external-dns-operator.yaml index aec8e7c01..26ed85ffe 100644 --- a/charts/ace-installer/templates/apps/kubeops/external-dns-operator.yaml +++ b/charts/ace-installer/templates/apps/kubeops/external-dns-operator.yaml @@ -1,6 +1,11 @@ {{- with (index .Values "helm" "releases" "external-dns-operator") }} {{- if .enabled }} +{{ $overrides := dict "registryFQDN" (include "registry.ghcr" $) }} + +{{ $vals := dig "values" dict . }} +{{ $vals = mergeOverwrite $vals $overrides }} + apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: @@ -33,7 +38,7 @@ spec: kind: HelmRepository name: kubeops namespace: {{ $.Release.Namespace }} -{{- with (dig "values" dict .) }} +{{- with $vals }} {{- dict "values" . | toYaml | nindent 2 }} {{- end }} diff --git a/charts/ace-installer/templates/apps/kubeops/license-proxyserver.yaml b/charts/ace-installer/templates/apps/kubeops/license-proxyserver.yaml index 597cf58a9..d23ce272a 100644 --- a/charts/ace-installer/templates/apps/kubeops/license-proxyserver.yaml +++ b/charts/ace-installer/templates/apps/kubeops/license-proxyserver.yaml @@ -1,6 +1,11 @@ {{- with (index .Values "helm" "releases" "license-proxyserver") }} {{- if .enabled }} +{{ $overrides := dict "registryFQDN" (include "registry.ghcr" $) }} + +{{ $vals := dig "values" dict . }} +{{ $vals = mergeOverwrite $vals $overrides }} + apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: @@ -33,7 +38,7 @@ spec: kind: HelmRepository name: bytebuilders namespace: {{ $.Release.Namespace }} -{{- with (dig "values" dict .) }} +{{- with $vals }} {{- dict "values" . | toYaml | nindent 2 }} {{- end }} diff --git a/charts/ace-installer/templates/apps/kubeops/reloader.yaml b/charts/ace-installer/templates/apps/kubeops/reloader.yaml index 4ac930388..4fc78f884 100644 --- a/charts/ace-installer/templates/apps/kubeops/reloader.yaml +++ b/charts/ace-installer/templates/apps/kubeops/reloader.yaml @@ -1,6 +1,15 @@ {{- with (index .Values "helm" "releases" "reloader") }} {{- if .enabled }} +{{ $overrides := printf ` +reloader: + deployment: + image: + name: %s` (include "image.ghcr" (merge (dict "_repo" "stakater/reloader") $)) | fromYaml }} + +{{ $vals := dig "values" dict . }} +{{ $vals = mergeOverwrite $vals $overrides }} + apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: @@ -33,7 +42,7 @@ spec: kind: HelmRepository name: stakater namespace: {{ $.Release.Namespace }} -{{- with (dig "values" dict .) }} +{{- with $vals }} {{- dict "values" . | toYaml | nindent 2 }} {{- end }} diff --git a/charts/ace-installer/templates/apps/monitoring/kube-prometheus-stack.yaml b/charts/ace-installer/templates/apps/monitoring/kube-prometheus-stack.yaml index fa6e898c3..bf9b5b875 100644 --- a/charts/ace-installer/templates/apps/monitoring/kube-prometheus-stack.yaml +++ b/charts/ace-installer/templates/apps/monitoring/kube-prometheus-stack.yaml @@ -1,6 +1,69 @@ {{- with (index .Values "helm" "releases" "kube-prometheus-stack") }} {{- if .enabled }} +{{ $alertmanager := printf ` +alertmanager: + alertmanagerSpec: + image: + repository: %s` (include "image.quay" (merge (dict "_repo" "prometheus/alertmanager") $)) | fromYaml }} + +{{ $prometheusOperator := printf ` +prometheusOperator: + image: + repository: %s + prometheusConfigReloader: + image: + repository: %s + thanosImage: + repository: %s` (include "image.quay" (merge (dict "_repo" "prometheus-operator/prometheus-operator") $)) (include "image.quay" (merge (dict "_repo" "prometheus-operator/prometheus-config-reloader") $)) (include "image.quay" (merge (dict "_repo" "thanos/thanos") $)) | fromYaml }} + +{{ $prometheus := printf ` +prometheus: + prometheusSpec: + image: + repository: %s` (include "image.quay" (merge (dict "_repo" "prometheus/prometheus") $)) | fromYaml }} + +{{ $ksm := printf ` +kube-state-metrics: + image: + repository: %s` (include "image.kubernetes" (merge (dict "_repo" "kube-state-metrics/kube-state-metrics") $)) | fromYaml }} + +{{ $node := printf ` +prometheus-node-exporter: + image: + repository: %s` (include "image.quay" (merge (dict "_repo" "prometheus/node-exporter") $)) | fromYaml }} + +# https://github.com/grafana/helm-charts/blob/main/charts/grafana/README.md +{{ $grafana := printf ` +grafana: + # docker + image: + registry: %s + initChownData: + image: + registry: %s + testFramework: + image: + registry: %s + downloadDashboardsImage: + registry: %s + imageRenderer: + image: + registry: %s + # quay.io + sidecar: + image: + registry: %s` + (include "image.dockerHub" $) + (include "image.dockerHub" $) + (include "image.dockerHub" $) + (include "image.dockerHub" $) + (include "image.dockerHub" $) + (include "image.quay" $) | fromYaml }} + +{{ $vals := dig "values" dict . }} +{{ $vals = mergeOverwrite $vals $alertmanager $prometheusOperator $prometheus $ksm $node $grafana }} + apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: @@ -32,7 +95,7 @@ spec: kind: HelmRepository name: prometheus-community namespace: {{ $.Release.Namespace }} -{{- with (dig "values" dict .) }} +{{- with $vals }} {{- dict "values" . | toYaml | nindent 2 }} {{- end }} diff --git a/charts/ace-installer/templates/apps/monitoring/panopticon.yaml b/charts/ace-installer/templates/apps/monitoring/panopticon.yaml index 3c3cdace8..3f44f1369 100644 --- a/charts/ace-installer/templates/apps/monitoring/panopticon.yaml +++ b/charts/ace-installer/templates/apps/monitoring/panopticon.yaml @@ -1,6 +1,11 @@ {{- with (index .Values "helm" "releases" "panopticon") }} {{- if .enabled }} +{{ $overrides := dict "registryFQDN" (include "registry.ghcr" $) }} + +{{ $vals := dig "values" dict . }} +{{ $vals = mergeOverwrite $vals $overrides }} + apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: @@ -34,7 +39,7 @@ spec: kind: HelmRepository name: kubeops namespace: {{ $.Release.Namespace }} -{{- with (dig "values" dict .) }} +{{- with $vals }} {{- dict "values" . | toYaml | nindent 2 }} {{- end }} diff --git a/charts/ace-installer/templates/apps/opscenter-features/opscenter-features.yaml b/charts/ace-installer/templates/apps/opscenter-features/opscenter-features.yaml index 687508cdd..f5a13f618 100644 --- a/charts/ace-installer/templates/apps/opscenter-features/opscenter-features.yaml +++ b/charts/ace-installer/templates/apps/opscenter-features/opscenter-features.yaml @@ -1,6 +1,11 @@ {{- with (index .Values "helm" "releases" "opscenter-features") }} {{- if .enabled }} +{{ $overrides := dict "image" $.Values.image }} + +{{ $vals := dig "values" dict . }} +{{ $vals = mergeOverwrite $vals $overrides }} + apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: @@ -29,7 +34,7 @@ spec: kind: HelmRepository name: bootstrap namespace: {{ $.Release.Namespace }} -{{- with (dig "values" dict .) }} +{{- with $vals }} {{- dict "values" . | toYaml | nindent 2 }} {{- end }} diff --git a/charts/ace-installer/templates/apps/stash/stash.yaml b/charts/ace-installer/templates/apps/stash/stash.yaml index be7872235..ff3668e06 100644 --- a/charts/ace-installer/templates/apps/stash/stash.yaml +++ b/charts/ace-installer/templates/apps/stash/stash.yaml @@ -1,6 +1,16 @@ {{- with (index .Values "helm" "releases" "stash") }} {{- if .enabled }} +{{ $overrides := printf ` +global: + registryFQDN: %s +stash-enterprise: + pushgateway: + registry: %s/prom` (include "registry.ghcr" $) (include "registry.dockerLibrary" $) | fromYaml }} + +{{ $vals := dig "values" dict . }} +{{ $vals = mergeOverwrite $vals $overrides }} + apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: @@ -38,10 +48,9 @@ spec: kind: HelmRepository name: stashed namespace: {{ $.Release.Namespace }} -{{- with (dig "values" dict .) }} +{{- with $vals }} {{- dict "values" . | toYaml | nindent 2 }} {{- end }} {{- end }} {{- end }} - diff --git a/charts/ace-installer/values.openapiv3_schema.yaml b/charts/ace-installer/values.openapiv3_schema.yaml index 11017b5dc..6eddcebe9 100644 --- a/charts/ace-installer/values.openapiv3_schema.yaml +++ b/charts/ace-installer/values.openapiv3_schema.yaml @@ -66,6 +66,8 @@ properties: type: string kubernetes: type: string + quay: + type: string type: object registryFQDN: type: string diff --git a/charts/ace-installer/values.yaml b/charts/ace-installer/values.yaml index 0d58a3e7f..6837c80b1 100644 --- a/charts/ace-installer/values.yaml +++ b/charts/ace-installer/values.yaml @@ -6,18 +6,14 @@ nameOverride: "" fullnameOverride: "" image: - registryFQDN: "" + registryFQDN: harbor.appscode.ninja proxies: - # r.appscode.com - appscode: "" - # company/bin:tag - dockerHub: "" - # alpine, nginx etc. + dockerHub: harbor.appscode.ninja/dockerhub dockerLibrary: "" - # ghcr.io/company/bin:tag - ghcr: "" - # registry.k8s.io/bin:tag - kubernetes: "" + ghcr: harbor.appscode.ninja/ghcr + quay: harbor.appscode.ninja/quay + kubernetes: harbor.appscode.ninja/k8s + appscode: harbor.appscode.ninja/ac registry: credentials: {} diff --git a/charts/opscenter-features/README.md b/charts/opscenter-features/README.md index ce57cf1e0..cccd92f01 100644 --- a/charts/opscenter-features/README.md +++ b/charts/opscenter-features/README.md @@ -55,6 +55,7 @@ The following table lists the configurable parameters of the `opscenter-features | image.proxies.dockerLibrary | alpine, nginx etc. | "" | | image.proxies.ghcr | ghcr.io/company/bin:tag | "" | | image.proxies.kubernetes | registry.k8s.io/bin:tag | "" | +| image.proxies.quay | quay.io/company/bin:tag | "" | | registry.credentials | | {} | | helm.release.channel | Release channel used for charts. Possible values: stable, testing, dev | dev | | helm.repositories.stable.interval | | 30m0s | diff --git a/charts/opscenter-features/values.openapiv3_schema.yaml b/charts/opscenter-features/values.openapiv3_schema.yaml index 0ecc93c20..7e3e47ee8 100644 --- a/charts/opscenter-features/values.openapiv3_schema.yaml +++ b/charts/opscenter-features/values.openapiv3_schema.yaml @@ -83,6 +83,8 @@ properties: type: string kubernetes: type: string + quay: + type: string type: object registryFQDN: type: string diff --git a/charts/opscenter-features/values.yaml b/charts/opscenter-features/values.yaml index 25a75a28a..b2a597b62 100644 --- a/charts/opscenter-features/values.yaml +++ b/charts/opscenter-features/values.yaml @@ -18,6 +18,8 @@ image: ghcr: "" # registry.k8s.io/bin:tag kubernetes: "" + # quay.io/company/bin:tag + quay: "" registry: credentials: {} diff --git a/schema/ace-options/values.openapiv3_schema.yaml b/schema/ace-options/values.openapiv3_schema.yaml index 222c78f0c..8439b63f3 100644 --- a/schema/ace-options/values.openapiv3_schema.yaml +++ b/schema/ace-options/values.openapiv3_schema.yaml @@ -1028,6 +1028,9 @@ properties: kubernetes: description: registry.k8s.io type: string + quay: + description: quay.io + type: string type: object registryFQDN: type: string