Skip to content

Commit

Permalink
Fix registry proxy templates (#692)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha authored Oct 31, 2023
1 parent 9a5b4c6 commit c485d67
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 79 deletions.
2 changes: 0 additions & 2 deletions apis/installer/v1alpha1/kubedb_catalog_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ type KubedbCatalogSpec struct {
//+optional
FullnameOverride string `json:"fullnameOverride"`
//+optional
RegistryFQDN string `json:"registryFQDN"`
//+optional
Proxies RegistryProxies `json:"proxies"`
Catalog Catalog `json:"catalog"`
Psp PSP `json:"psp"`
Expand Down
87 changes: 43 additions & 44 deletions charts/kubedb-catalog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,50 +45,49 @@ The command removes all the Kubernetes components associated with the chart and

The following table lists the configurable parameters of the `kubedb-catalog` chart and their default values.

| Parameter | Description | Default |
|--------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|------------------------------|
| nameOverride | Overrides name template | <code>""</code> |
| fullnameOverride | Overrides fullname template | <code>""</code> |
| registryFQDN | Docker registry fqdn used to pull KubeDB related images Set this to use docker registry hosted at ${registryFQDN}/${registry}/${image} | <code>""</code> |
| proxies.dockerHub | | <code>""</code> |
| proxies.dockerLibrary | | <code>""</code> |
| proxies.ghcr | | <code>ghcr.io</code> |
| proxies.kubernetes | | <code>registry.k8s.io</code> |
| proxies.appscode | | <code>r.appscode.com</code> |
| catalog.elasticsearch | If true, deploys Elasticsearch version catalog | <code>true</code> |
| catalog.etcd | If true, deploys Etcd version catalog | <code>true</code> |
| catalog.memcached | If true, deploys Memcached version catalog | <code>true</code> |
| catalog.mongodb | If true, deploys MongoDB version catalog | <code>true</code> |
| catalog.mysql | If true, deploys MySQL version catalog | <code>true</code> |
| catalog.mariadb | If true, deploys MariaDB version catalog | <code>true</code> |
| catalog.perconaxtradb | If true, deploys Percona XtraDB version catalog | <code>true</code> |
| catalog.pgbouncer | If true, deploys PgBouncer version catalog | <code>true</code> |
| catalog.postgres | If true, deploys PostgreSQL version catalog | <code>true</code> |
| catalog.proxysql | If true, deploys ProxySQL version catalog | <code>true</code> |
| catalog.redis | If true, deploys Redis version catalog | <code>true</code> |
| catalog.kafka | | <code>true</code> |
| psp.enabled | | <code>true</code> |
| psp.elasticsearch.allowPrivilegeEscalation | | <code>true</code> |
| psp.elasticsearch.privileged | | <code>true</code> |
| psp.mariadb.allowPrivilegeEscalation | | <code>false</code> |
| psp.mariadb.privileged | | <code>false</code> |
| psp.memcached.allowPrivilegeEscalation | | <code>false</code> |
| psp.memcached.privileged | | <code>false</code> |
| psp.mongodb.allowPrivilegeEscalation | | <code>false</code> |
| psp.mongodb.privileged | | <code>false</code> |
| psp.mysql.allowPrivilegeEscalation | | <code>false</code> |
| psp.mysql.privileged | | <code>false</code> |
| psp.perconaxtradb.allowPrivilegeEscalation | | <code>false</code> |
| psp.perconaxtradb.privileged | | <code>false</code> |
| psp.postgres.allowPrivilegeEscalation | | <code>false</code> |
| psp.postgres.privileged | | <code>false</code> |
| psp.proxysql.allowPrivilegeEscalation | | <code>false</code> |
| psp.proxysql.privileged | | <code>false</code> |
| psp.redis.allowPrivilegeEscalation | | <code>false</code> |
| psp.redis.privileged | | <code>false</code> |
| psp.kafka.allowPrivilegeEscalation | | <code>false</code> |
| psp.kafka.privileged | | <code>false</code> |
| skipDeprecated | Set true to avoid deploying deprecated versions | <code>true</code> |
| Parameter | Description | Default |
|--------------------------------------------|-------------------------------------------------|------------------------------|
| nameOverride | Overrides name template | <code>""</code> |
| fullnameOverride | Overrides fullname template | <code>""</code> |
| proxies.dockerHub | | <code>""</code> |
| proxies.dockerLibrary | | <code>""</code> |
| proxies.ghcr | | <code>ghcr.io</code> |
| proxies.kubernetes | | <code>registry.k8s.io</code> |
| proxies.appscode | | <code>r.appscode.com</code> |
| catalog.elasticsearch | If true, deploys Elasticsearch version catalog | <code>true</code> |
| catalog.etcd | If true, deploys Etcd version catalog | <code>true</code> |
| catalog.memcached | If true, deploys Memcached version catalog | <code>true</code> |
| catalog.mongodb | If true, deploys MongoDB version catalog | <code>true</code> |
| catalog.mysql | If true, deploys MySQL version catalog | <code>true</code> |
| catalog.mariadb | If true, deploys MariaDB version catalog | <code>true</code> |
| catalog.perconaxtradb | If true, deploys Percona XtraDB version catalog | <code>true</code> |
| catalog.pgbouncer | If true, deploys PgBouncer version catalog | <code>true</code> |
| catalog.postgres | If true, deploys PostgreSQL version catalog | <code>true</code> |
| catalog.proxysql | If true, deploys ProxySQL version catalog | <code>true</code> |
| catalog.redis | If true, deploys Redis version catalog | <code>true</code> |
| catalog.kafka | | <code>true</code> |
| psp.enabled | | <code>true</code> |
| psp.elasticsearch.allowPrivilegeEscalation | | <code>true</code> |
| psp.elasticsearch.privileged | | <code>true</code> |
| psp.mariadb.allowPrivilegeEscalation | | <code>false</code> |
| psp.mariadb.privileged | | <code>false</code> |
| psp.memcached.allowPrivilegeEscalation | | <code>false</code> |
| psp.memcached.privileged | | <code>false</code> |
| psp.mongodb.allowPrivilegeEscalation | | <code>false</code> |
| psp.mongodb.privileged | | <code>false</code> |
| psp.mysql.allowPrivilegeEscalation | | <code>false</code> |
| psp.mysql.privileged | | <code>false</code> |
| psp.perconaxtradb.allowPrivilegeEscalation | | <code>false</code> |
| psp.perconaxtradb.privileged | | <code>false</code> |
| psp.postgres.allowPrivilegeEscalation | | <code>false</code> |
| psp.postgres.privileged | | <code>false</code> |
| psp.proxysql.allowPrivilegeEscalation | | <code>false</code> |
| psp.proxysql.privileged | | <code>false</code> |
| psp.redis.allowPrivilegeEscalation | | <code>false</code> |
| psp.redis.privileged | | <code>false</code> |
| psp.kafka.allowPrivilegeEscalation | | <code>false</code> |
| psp.kafka.privileged | | <code>false</code> |
| skipDeprecated | Set true to avoid deploying deprecated versions | <code>true</code> |


Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade -i`. For example:
Expand Down
10 changes: 5 additions & 5 deletions charts/kubedb-catalog/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,21 @@ Create the name of the service account to use
{{- end }}

{{- define "image.dockerHub" -}}
{{ prepend (list ._repo) (list .Values.proxies.dockerHub .Values.registryFQDN | compact | first) | compact | join "/" }}
{{ list .Values.proxies.dockerHub ._repo | compact | join "/" }}
{{- end }}

{{- define "image.dockerLibrary" -}}
{{ prepend (list ._repo) (list .Values.proxies.dockerLibrary .Values.proxies.dockerHub .Values.registryFQDN | compact | first) | compact | join "/" }}
{{ prepend (list ._repo) (list .Values.proxies.dockerLibrary .Values.proxies.dockerHub | compact | first) | compact | join "/" }}
{{- end }}

{{- define "image.ghcr" -}}
{{ prepend (list ._repo) (list .Values.proxies.ghcr .Values.registryFQDN | compact | first) | compact | join "/" }}
{{ list .Values.proxies.ghcr ._repo | compact | join "/" }}
{{- end }}

{{- define "image.kubernetes" -}}
{{ prepend (list ._repo) (list .Values.proxies.kubernetes .Values.registryFQDN | compact | first) | compact | join "/" }}
{{ list .Values.proxies.kubernetes ._repo | compact | join "/" }}
{{- end }}

{{- define "image.appscode" -}}
{{ prepend (list ._repo) (list .Values.proxies.appscode .Values.registryFQDN | compact | first) | compact | join "/" }}
{{ list .Values.proxies.appscode ._repo | compact | join "/" }}
{{- end }}
2 changes: 0 additions & 2 deletions charts/kubedb-catalog/values.openapiv3_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,6 @@ properties:
- enabled
- kafka
type: object
registryFQDN:
type: string
skipDeprecated:
type: boolean
required:
Expand Down
4 changes: 0 additions & 4 deletions charts/kubedb-catalog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ nameOverride: ""
# Overrides fullname template
fullnameOverride: ""

# Docker registry fqdn used to pull KubeDB related images
# Set this to use docker registry hosted at ${registryFQDN}/${registry}/${image}
registryFQDN: ""

proxies:
dockerHub: ""
dockerLibrary: ""
Expand Down
20 changes: 0 additions & 20 deletions charts/kubedb/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -127,26 +127,6 @@ Returns the --insecure-registries flags
{{- end -}}
{{- end }}

{{- define "image.dockerHub" -}}
{{ prepend (list ._repo) (list .Values.proxies.dockerHub .Values.global.registryFQDN .Values.registryFQDN | compact | first) | compact | join "/" }}
{{- end }}

{{- define "image.dockerLibrary" -}}
{{ prepend (list ._repo) (list .Values.proxies.dockerLibrary .Values.proxies.dockerHub .Values.global.registryFQDN .Values.registryFQDN | compact | first) | compact | join "/" }}
{{- end }}

{{- define "image.ghcr" -}}
{{ prepend (list ._repo) (list .Values.proxies.ghcr .Values.global.registryFQDN .Values.registryFQDN | compact | first) | compact | join "/" }}
{{- end }}

{{- define "image.kubernetes" -}}
{{ prepend (list ._repo) (list .Values.proxies.kubernetes .Values.global.registryFQDN .Values.registryFQDN | compact | first) | compact | join "/" }}
{{- end }}

{{- define "image.appscode" -}}
{{ prepend (list ._repo) (list .Values.proxies.appscode .Values.global.registryFQDN .Values.registryFQDN | compact | first) | compact | join "/" }}
{{- end }}

{{/*
Returns the enabled monitoring agent name
*/}}
Expand Down
2 changes: 0 additions & 2 deletions charts/kubedb/values.openapiv3_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1501,8 +1501,6 @@ properties:
- enabled
- kafka
type: object
registryFQDN:
type: string
skipDeprecated:
type: boolean
required:
Expand Down

0 comments on commit c485d67

Please sign in to comment.