diff --git a/charts/s3gw/templates/_helpers.tpl b/charts/s3gw/templates/_helpers.tpl index b6dc68a..24ee363 100644 --- a/charts/s3gw/templates/_helpers.tpl +++ b/charts/s3gw/templates/_helpers.tpl @@ -120,7 +120,7 @@ Default Access Credentials Backend service name */}} {{- define "s3gw.serviceName" -}} -{{- $dsn := printf "%s-%s" .Release.Name .Release.Namespace }} +{{- $dsn := printf "%s-%s-s3gw" .Release.Name .Release.Namespace }} {{- $name := default $dsn .Values.serviceName }} {{- $name }} {{- end }} @@ -129,7 +129,7 @@ Backend service name Frontend service name */}} {{- define "s3gw.uiServiceName" -}} -{{- $dsn := printf "%s-%s-ui" .Release.Name .Release.Namespace }} +{{- $dsn := printf "%s-%s-ui-s3gw" .Release.Name .Release.Namespace }} {{- $name := default $dsn .Values.ui.serviceName }} {{- $name }} {{- end }} @@ -138,7 +138,7 @@ Frontend service name User credentials secret for S3 backend service */}} {{- define "s3gw.defaultUserCredentialsSecret" -}} -{{- $dsn := printf "%s-%s-creds" .Release.Name .Release.Namespace }} +{{- $dsn := printf "%s-%s-creds-s3gw" .Release.Name .Release.Namespace }} {{- $name := default $dsn .Values.defaultUserCredentialsSecret }} {{- $name }} {{- end }} @@ -147,7 +147,7 @@ User credentials secret for S3 backend service Config map name */}} {{- define "s3gw.configMap" -}} -{{- $dcmn := printf "%s-%s-config" .Release.Name .Release.Namespace }} +{{- $dcmn := printf "%s-%s-config-s3gw" .Release.Name .Release.Namespace }} {{- $name := $dcmn }} {{- $name }} {{- end }} @@ -156,7 +156,7 @@ Config map name Traefik Middleware CORS name */}} {{- define "s3gw.CORSMiddlewareName" -}} -{{- $dmcn := printf "%s-%s-cors-header" .Release.Name .Release.Namespace }} +{{- $dmcn := printf "%s-%s-cors-header-s3gw" .Release.Name .Release.Namespace }} {{- $name := $dmcn }} {{- $name }} {{- end }} @@ -198,7 +198,7 @@ COSI driver name COSI service account name */}} {{- define "s3gw-cosi.ServiceAccountName" -}} -{{- $dcsan := printf "%s-%s-objectstorage-provisioner-sa" .Release.Name .Release.Namespace }} +{{- $dcsan := printf "%s-%s-objectstorage-provisioner-sa-s3gw" .Release.Name .Release.Namespace }} {{- $name := $dcsan }} {{- $name }} {{- end }} @@ -207,7 +207,7 @@ COSI service account name COSI driver secret name */}} {{- define "s3gw-cosi.driverSecretName" -}} -{{- $ddsn := printf "%s-%s-objectstorage-provisioner" .Release.Name .Release.Namespace }} +{{- $ddsn := printf "%s-%s-objectstorage-provisioner-s3gw" .Release.Name .Release.Namespace }} {{- $name := $ddsn }} {{- $name }} {{- end }} @@ -216,7 +216,7 @@ COSI driver secret name COSI cluster role name */}} {{- define "s3gw-cosi.ClusterRoleName" -}} -{{- $dcrn := printf "%s-%s-objectstorage-provisioner-role" .Release.Name .Release.Namespace }} +{{- $dcrn := printf "%s-%s-objectstorage-provisioner-role-s3gw" .Release.Name .Release.Namespace }} {{- $name := $dcrn }} {{- $name }} {{- end }} @@ -225,7 +225,7 @@ COSI cluster role name COSI cluster role binding name */}} {{- define "s3gw-cosi.ClusterRoleBindingName" -}} -{{- $dcrn := printf "%s-%s-objectstorage-provisioner-role-binding" .Release.Name .Release.Namespace }} +{{- $dcrn := printf "%s-%s-objectstorage-provisioner-role-binding-s3gw" .Release.Name .Release.Namespace }} {{- $name := $dcrn }} {{- $name }} {{- end }} diff --git a/charts/s3gw/templates/certificate.yaml b/charts/s3gw/templates/certificate.yaml index aa0f796..3e1c7bd 100644 --- a/charts/s3gw/templates/certificate.yaml +++ b/charts/s3gw/templates/certificate.yaml @@ -4,26 +4,26 @@ apiVersion: cert-manager.io/v1 kind: Certificate metadata: - name: {{ .Release.Name }}-{{ .Release.Namespace }}-ca-cert + name: {{ .Release.Name }}-{{ .Release.Namespace }}-s3gw-ca-cert namespace: {{ .Values.certManagerNamespace }} labels: {{ include "s3gw.labels" . | indent 4}} spec: - commonName: {{ .Release.Name }}-{{ .Release.Namespace }}-ca + commonName: {{ .Release.Name }}-{{ .Release.Namespace }}-s3gw-ca isCA: true issuerRef: kind: ClusterIssuer - name: {{ .Release.Name }}-{{ .Release.Namespace }}-self-signed-issuer + name: {{ .Release.Name }}-{{ .Release.Namespace }}-s3gw-self-signed-issuer privateKey: algorithm: ECDSA size: 256 - secretName: {{ .Release.Name }}-{{ .Release.Namespace }}-ca-root + secretName: {{ .Release.Name }}-{{ .Release.Namespace }}-s3gw-ca-root --- # s3gw internal service certificate (private domain) apiVersion: cert-manager.io/v1 kind: Certificate metadata: - name: {{ .Release.Name }}-{{ .Release.Namespace }}-cluster-ip-cert + name: {{ .Release.Name }}-{{ .Release.Namespace }}-s3gw-cluster-ip-cert namespace: {{ .Release.Namespace }} labels: {{ include "s3gw.labels" . | indent 4}} @@ -33,6 +33,6 @@ spec: - '*.{{ include "s3gw.serviceName" . }}.{{ .Release.Namespace }}.{{ .Values.privateDomain }}' issuerRef: kind: ClusterIssuer - name: {{ .Release.Name }}-{{ .Release.Namespace }}-issuer - secretName: {{ .Release.Name }}-{{ .Release.Namespace }}-cluster-ip-tls + name: {{ .Release.Name }}-{{ .Release.Namespace }}-s3gw-issuer + secretName: {{ .Release.Name }}-{{ .Release.Namespace }}-s3gw-cluster-ip-tls {{- end }} diff --git a/charts/s3gw/templates/cosi-driver-deployment.yaml b/charts/s3gw/templates/cosi-driver-deployment.yaml index 0b6e5b4..d180b31 100644 --- a/charts/s3gw/templates/cosi-driver-deployment.yaml +++ b/charts/s3gw/templates/cosi-driver-deployment.yaml @@ -3,7 +3,7 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ .Release.Name }}-objectstorage-provisioner + name: {{ .Release.Name }}-s3gw-objectstorage-provisioner labels: {{ include "s3gw.labels" . | indent 4}} namespace: {{ .Release.Namespace }} diff --git a/charts/s3gw/templates/deployment.yaml b/charts/s3gw/templates/deployment.yaml index 646a75b..4252f14 100644 --- a/charts/s3gw/templates/deployment.yaml +++ b/charts/s3gw/templates/deployment.yaml @@ -2,7 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ .Release.Name }} + name: {{ .Release.Name }}-s3gw namespace: {{ .Release.Namespace }} labels: {{ include "s3gw.labels" . | indent 4 }} @@ -79,17 +79,17 @@ spec: volumes: - name: s3gw-lh-store persistentVolumeClaim: - claimName: {{ .Release.Name }}-pvc + claimName: {{ .Release.Name }}-s3gw-pvc - name: s3gw-cluster-ip-tls secret: - secretName: {{ .Release.Name }}-{{ .Release.Namespace }}-cluster-ip-tls + secretName: {{ .Release.Name }}-{{ .Release.Namespace }}-s3gw-cluster-ip-tls optional: false {{- if .Values.ui.enabled }} --- apiVersion: apps/v1 kind: Deployment metadata: - name: '{{ .Release.Name }}-ui' + name: '{{ .Release.Name }}-s3gw-ui' namespace: {{ .Release.Namespace }} labels: {{ include "s3gw.labels" . | indent 4 }} diff --git a/charts/s3gw/templates/ingress-traefik.yaml b/charts/s3gw/templates/ingress-traefik.yaml index fff133c..08583f5 100644 --- a/charts/s3gw/templates/ingress-traefik.yaml +++ b/charts/s3gw/templates/ingress-traefik.yaml @@ -4,7 +4,7 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: '{{ .Release.Name }}' + name: '{{ .Release.Name }}-s3gw' namespace: {{ .Release.Namespace }} labels: {{ include "s3gw.labels" . | indent 4 }} @@ -45,7 +45,7 @@ spec: apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: '{{ .Release.Name }}-no-tls' + name: '{{ .Release.Name }}-s3gw-no-tls' namespace: {{ .Release.Namespace }} labels: {{ include "s3gw.labels" . | indent 4 }} @@ -80,7 +80,7 @@ spec: apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: '{{ .Release.Name }}-ui' + name: '{{ .Release.Name }}-s3gw-ui' namespace: {{ .Release.Namespace }} labels: {{ include "s3gw.labels" . | indent 4 }} @@ -110,7 +110,7 @@ spec: apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: '{{ .Release.Name }}-ui-no-tls' + name: '{{ .Release.Name }}-s3gw-ui-no-tls' namespace: {{ .Release.Namespace }} labels: {{ include "s3gw.labels" . | indent 4 }} diff --git a/charts/s3gw/templates/secret.yaml b/charts/s3gw/templates/secret.yaml index 1f794ed..a2d4c0f 100644 --- a/charts/s3gw/templates/secret.yaml +++ b/charts/s3gw/templates/secret.yaml @@ -17,7 +17,7 @@ stringData: apiVersion: v1 kind: Secret metadata: - name: '{{ .Release.Name }}-image-pull-secret' + name: '{{ .Release.Name }}-s3gw-image-pull-secret' namespace: {{ .Release.Namespace }} labels: {{ include "s3gw.labels" . | indent 4 }} diff --git a/charts/s3gw/templates/storage.yaml b/charts/s3gw/templates/storage.yaml index ede394c..0cc12db 100644 --- a/charts/s3gw/templates/storage.yaml +++ b/charts/s3gw/templates/storage.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: '{{ .Release.Name }}-pvc' + name: '{{ .Release.Name }}-s3gw-pvc' namespace: {{ .Release.Namespace }} labels: {{ include "s3gw.labels" . | indent 4 }} @@ -39,7 +39,7 @@ parameters: apiVersion: v1 kind: PersistentVolume metadata: - name: '{{ .Release.Name }}.{{ .Release.Namespace }}-local-pv' + name: '{{ .Release.Name }}.{{ .Release.Namespace }}-s3gw-local-pv' labels: {{ include "s3gw.labels" . | indent 4 }} type: local diff --git a/charts/s3gw/templates/tests/smoke-bucket-create.yaml b/charts/s3gw/templates/tests/smoke-bucket-create.yaml index a999cb3..2b6f361 100644 --- a/charts/s3gw/templates/tests/smoke-bucket-create.yaml +++ b/charts/s3gw/templates/tests/smoke-bucket-create.yaml @@ -2,7 +2,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: 'smoke-{{ .Release.Name }}-bucket-create' + name: 'smoke-{{ .Release.Name }}-s3gw-bucket-create' namespace: '{{ .Release.Namespace }}' annotations: helm.sh/hook: test diff --git a/charts/s3gw/templates/tls-issuer.yaml b/charts/s3gw/templates/tls-issuer.yaml index e9ae249..2cb25aa 100644 --- a/charts/s3gw/templates/tls-issuer.yaml +++ b/charts/s3gw/templates/tls-issuer.yaml @@ -5,7 +5,7 @@ apiVersion: cert-manager.io/v1 kind: ClusterIssuer metadata: - name: {{ .Release.Name }}-{{ .Release.Namespace }}-self-signed-issuer + name: {{ .Release.Name }}-{{ .Release.Namespace }}-s3gw-self-signed-issuer labels: {{ include "s3gw.labels" . | indent 4}} spec: @@ -15,19 +15,19 @@ spec: apiVersion: cert-manager.io/v1 kind: ClusterIssuer metadata: - name: {{ .Release.Name }}-{{ .Release.Namespace }}-issuer + name: {{ .Release.Name }}-{{ .Release.Namespace }}-s3gw-issuer labels: {{ include "s3gw.labels" . | indent 4}} spec: ca: - secretName: {{ .Release.Name }}-{{ .Release.Namespace }}-ca-root + secretName: {{ .Release.Name }}-{{ .Release.Namespace }}-s3gw-ca-root {{- else if eq .Values.tlsIssuer "s3gw-letsencrypt-issuer" }} --- # Let's encrypt production issuer apiVersion: cert-manager.io/v1 kind: ClusterIssuer metadata: - name: {{ .Release.Name }}-{{ .Release.Namespace }}-letsencrypt-issuer + name: {{ .Release.Name }}-{{ .Release.Namespace }}-s3gw-letsencrypt-issuer labels: {{ include "s3gw.labels" . | indent 4}} spec: @@ -35,7 +35,7 @@ spec: email: {{ .Values.email }} preferredChain: "" privateKeySecretRef: - name: {{ .Release.Name }}-{{ .Release.Namespace }}-letsencrypt + name: {{ .Release.Name }}-{{ .Release.Namespace }}-s3gw-letsencrypt server: https://acme-v02.api.letsencrypt.org/directory solvers: - http01: diff --git a/charts/s3gw/templates/tls-secret.yaml b/charts/s3gw/templates/tls-secret.yaml index 919e6c8..a33347b 100644 --- a/charts/s3gw/templates/tls-secret.yaml +++ b/charts/s3gw/templates/tls-secret.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: Secret metadata: - name: {{ .Release.Name }}-{{ .Release.Namespace }}-ingress-tls + name: {{ .Release.Name }}-{{ .Release.Namespace }}-s3gw-ingress-tls namespace: {{ .Release.Namespace }} labels: {{ include "s3gw.labels" . | indent 4 }} @@ -17,7 +17,7 @@ data: apiVersion: v1 kind: Secret metadata: - name: {{ .Release.Name }}-{{ .Release.Namespace }}-cluster-ip-tls + name: {{ .Release.Name }}-{{ .Release.Namespace }}-s3gw-cluster-ip-tls namespace: {{ .Release.Namespace }} labels: {{ include "s3gw.labels" . | indent 4 }} @@ -32,7 +32,7 @@ data: apiVersion: v1 kind: Secret metadata: - name: {{ .Release.Name }}-{{ .Release.Namespace }}-ui-ingress-tls + name: {{ .Release.Name }}-{{ .Release.Namespace }}-s3gw-ui-ingress-tls namespace: {{ .Release.Namespace }} labels: {{ include "s3gw.labels" . | indent 4 }} diff --git a/charts/s3gw/tests/cosi_test.yaml b/charts/s3gw/tests/cosi_test.yaml index ae7c835..cac1c65 100644 --- a/charts/s3gw/tests/cosi_test.yaml +++ b/charts/s3gw/tests/cosi_test.yaml @@ -31,7 +31,7 @@ tests: - containsDocument: kind: Secret apiVersion: v1 - name: s3gw-name-s3gw-namespace-objectstorage-provisioner + name: s3gw-name-s3gw-namespace-objectstorage-provisioner-s3gw namespace: s3gw-namespace template: cosi-driver-secret.yaml @@ -99,7 +99,7 @@ tests: - containsDocument: kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 - name: s3gw-name-s3gw-namespace-objectstorage-provisioner-role + name: s3gw-name-s3gw-namespace-objectstorage-provisioner-role-s3gw documentIndex: 0 template: cosi-rbac.yaml @@ -111,7 +111,7 @@ tests: - containsDocument: kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 - name: s3gw-name-s3gw-namespace-objectstorage-provisioner-role-binding + name: s3gw-name-s3gw-namespace-objectstorage-provisioner-role-binding-s3gw documentIndex: 1 template: cosi-rbac.yaml @@ -122,7 +122,7 @@ tests: - containsDocument: kind: ServiceAccount apiVersion: v1 - name: s3gw-name-s3gw-namespace-objectstorage-provisioner-sa + name: s3gw-name-s3gw-namespace-objectstorage-provisioner-sa-s3gw namespace: s3gw-namespace template: cosi-sa.yaml @@ -135,7 +135,7 @@ tests: path: subjects content: kind: ServiceAccount - name: s3gw-name-s3gw-namespace-objectstorage-provisioner-sa + name: s3gw-name-s3gw-namespace-objectstorage-provisioner-sa-s3gw namespace: s3gw-namespace any: true documentIndex: 1 @@ -146,7 +146,7 @@ tests: content: kind: ClusterRole apiGroup: rbac.authorization.k8s.io - name: s3gw-name-s3gw-namespace-objectstorage-provisioner-role + name: s3gw-name-s3gw-namespace-objectstorage-provisioner-role-s3gw any: true documentIndex: 1 template: cosi-rbac.yaml diff --git a/charts/s3gw/tests/credentials_test.yaml b/charts/s3gw/tests/credentials_test.yaml index f01c70f..cdd8528 100644 --- a/charts/s3gw/tests/credentials_test.yaml +++ b/charts/s3gw/tests/credentials_test.yaml @@ -22,7 +22,7 @@ tests: - containsDocument: kind: Secret apiVersion: v1 - name: s3gw-release-s3gw-system-creds + name: s3gw-release-s3gw-system-creds-s3gw namespace: s3gw-system documentIndex: 0 templates: diff --git a/charts/s3gw/tests/deployment_test.yaml b/charts/s3gw/tests/deployment_test.yaml index 8457aae..c8f0841 100644 --- a/charts/s3gw/tests/deployment_test.yaml +++ b/charts/s3gw/tests/deployment_test.yaml @@ -16,7 +16,7 @@ tests: - containsDocument: kind: Deployment apiVersion: apps/v1 - name: s3gw-release + name: s3gw-release-s3gw namespace: s3gw-namespace documentIndex: 0 templates: @@ -36,7 +36,7 @@ tests: - containsDocument: kind: Deployment apiVersion: apps/v1 - name: s3gw-release-ui + name: s3gw-release-ui-s3gw namespace: s3gw-namespace documentIndex: 0 templates: @@ -45,7 +45,7 @@ tests: - containsDocument: kind: Deployment apiVersion: apps/v1 - name: s3gw-release-ui-ui + name: s3gw-release-ui-s3gw-ui namespace: s3gw-namespace documentIndex: 1 templates: @@ -65,7 +65,7 @@ tests: - containsDocument: kind: Deployment apiVersion: apps/v1 - name: s3gw-release + name: s3gw-release-s3gw namespace: s3gw-namespace documentIndex: 0 templates: