diff --git a/clusterIssuer/README.md b/clusterIssuer/README.md index 13cbf74..508d79f 100644 --- a/clusterIssuer/README.md +++ b/clusterIssuer/README.md @@ -4,9 +4,9 @@ This chart deploys cluster issuers for prod and staging and for dns and http. ## Parameters -### ACME parameters +### Acme parameters -| Name | Description | Value | -| ------------- | -------------------------- | ------------------- | -| `acme.email` | The email address for ACME | `login@example.com` | -| `acme.solver` | The solver for ACME | `infomaniak` | +| Name | Description | Value | +| ------------- | --------------------------- | ------------------- | +| `acme.email` | Registration e-mail adresss | `login@example.com` | +| `acme.solver` | Setup dns solver | `infomaniak` | diff --git a/clusterIssuer/templates/cluster-issuer.yaml b/clusterIssuer/templates/ciss.yaml similarity index 100% rename from clusterIssuer/templates/cluster-issuer.yaml rename to clusterIssuer/templates/ciss.yaml diff --git a/clusterIssuer/templates/api-credentials.yaml b/clusterIssuer/templates/secret.yaml similarity index 100% rename from clusterIssuer/templates/api-credentials.yaml rename to clusterIssuer/templates/secret.yaml diff --git a/hugo/README.md b/hugo/README.md index 344e8f6..559ee3b 100644 --- a/hugo/README.md +++ b/hugo/README.md @@ -12,10 +12,3 @@ This Helm chart deploys Hugo site. | `ingress.className` | The class name for the ingress | `nginx` | | `ingress.clusterIssuerRef` | The cluster issuer reference for the ingress | `nil` | | `ingress.host` | The host for the ingress | `hugo.knd.local` | - -### Hugo parameters - -| Name | Description | Value | -| ----------------- | -------------------------- | ------------------------------------- | -| `image` | The image for Hugo | `janikvonrotz/janikvonrotz.ch:latest` | -| `imagePullPolicy` | Pull policy for hugo image | `Always` | diff --git a/hugo/templates/hugo-deploy.yaml b/hugo/templates/deploy.yaml similarity index 100% rename from hugo/templates/hugo-deploy.yaml rename to hugo/templates/deploy.yaml diff --git a/hugo/templates/hugo-ingress.yaml b/hugo/templates/ingress.yaml similarity index 100% rename from hugo/templates/hugo-ingress.yaml rename to hugo/templates/ingress.yaml diff --git a/hugo/templates/hugo-svc.yaml b/hugo/templates/svc.yaml similarity index 100% rename from hugo/templates/hugo-svc.yaml rename to hugo/templates/svc.yaml diff --git a/odoo/templates/odoo-cm.yaml b/odoo/templates/cm.yaml similarity index 100% rename from odoo/templates/odoo-cm.yaml rename to odoo/templates/cm.yaml diff --git a/odoo/templates/odoo-deploy.yaml b/odoo/templates/deploy.yaml similarity index 100% rename from odoo/templates/odoo-deploy.yaml rename to odoo/templates/deploy.yaml diff --git a/odoo/templates/odoo-ingress.yaml b/odoo/templates/ingress.yaml similarity index 100% rename from odoo/templates/odoo-ingress.yaml rename to odoo/templates/ingress.yaml diff --git a/odoo/templates/odoo-secret.yaml b/odoo/templates/secret.yaml similarity index 80% rename from odoo/templates/odoo-secret.yaml rename to odoo/templates/secret.yaml index 9074450..00b79ec 100644 --- a/odoo/templates/odoo-secret.yaml +++ b/odoo/templates/secret.yaml @@ -6,7 +6,7 @@ metadata: app: odoo data: GITHUB_PERSONAL_ACCESS_TOKEN: {{ .Values.githubPersonalAccessToken | b64enc | quote }} -{{- if .Values.postgresql.enabled }} +{{- if and .Values.postgresql.enabled (not (lookup "v1" "Secret" .Release.Namespace .Values.postgresql.auth.existingSecret)) }} --- apiVersion: v1 kind: Secret diff --git a/odoo/templates/odoo-svc.yaml b/odoo/templates/svc.yaml similarity index 100% rename from odoo/templates/odoo-svc.yaml rename to odoo/templates/svc.yaml diff --git a/postgres/README.md b/postgres/README.md index 6622308..041999d 100644 --- a/postgres/README.md +++ b/postgres/README.md @@ -16,4 +16,4 @@ This chart deploys a Postgres container and stores the credentials in a secret. | `password` | If not set a password will be generated | `nil` | | `secretRef` | The secret reference for Postgres | `postgres` | | `userPasswordKey` | The user password key for Postgres | `password` | -| `storageClassName` | Set the storage class | `standard` | +| `storageClassName` | Set the storage class | `nil` | diff --git a/postgres/templates/postgres-deploy.yaml b/postgres/templates/deploy.yaml similarity index 100% rename from postgres/templates/postgres-deploy.yaml rename to postgres/templates/deploy.yaml diff --git a/postgres/templates/postgres-secret.yaml b/postgres/templates/postgres-secret.yaml deleted file mode 100644 index 1ada7aa..0000000 --- a/postgres/templates/postgres-secret.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: {{ .Values.secretRef }} - labels: - app: postgres -data: - port: {{ .Values.port | toString | b64enc | quote }} - db: {{ .Values.db | b64enc | quote }} - user: {{ .Values.user | b64enc | quote }} - {{ .Values.userPasswordKey }}: {{ .Values.password | default (randAlphaNum 20) | b64enc | quote }} diff --git a/postgres/templates/postgres-pvc.yaml b/postgres/templates/pvc.yaml similarity index 100% rename from postgres/templates/postgres-pvc.yaml rename to postgres/templates/pvc.yaml diff --git a/postgres/templates/secret.yaml b/postgres/templates/secret.yaml new file mode 100644 index 0000000..7f8ad9e --- /dev/null +++ b/postgres/templates/secret.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: Secret +metadata: + name: {{ .Values.secretRef }} + labels: + app: postgres +type: Opaque +data: + port: {{ .Values.port | toString | b64enc | quote }} + db: {{ .Values.db | b64enc | quote }} + user: {{ .Values.user | b64enc | quote }} + {{- $passwordKey := .Values.userPasswordKey }} + {{- $existingSecret := lookup "v1" "Secret" .Release.Namespace .Values.secretRef }} + {{- if and $existingSecret (index $existingSecret.data $passwordKey) }} + {{ $passwordKey }}: {{ index $existingSecret.data $passwordKey }} + {{- else }} + {{ $passwordKey }}: {{ .Values.password | default (randAlphaNum 20) | b64enc | quote }} + {{- end }} diff --git a/postgres/templates/postgres-svc.yaml b/postgres/templates/svc.yaml similarity index 100% rename from postgres/templates/postgres-svc.yaml rename to postgres/templates/svc.yaml