Skip to content

Commit

Permalink
Merge pull request #22 from mongodb/Fix-pod-patch-1.9.1
Browse files Browse the repository at this point in the history
adding HELM annotations
  • Loading branch information
theburi authored Jan 22, 2021
2 parents 50fe9cd + ec3ec11 commit 54a36f1
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/ent-operator-database/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: mongodb-enterprise-database
description: MongoDB Kubernetes Enterprise Operator- MongoDB DataBase charts
version: 0.2.2
version: 0.2.3
kubeVersion: '>=1.15-0'
keywords:
- mongodb
Expand Down
7 changes: 7 additions & 0 deletions charts/ent-operator-database/templates/database-cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ kind: ConfigMap
metadata:
name: {{ .Values.name }}-configmap
namespace: {{ .Release.Namespace }}
annotations:
"meta.helm.sh/release-name": {{ .Release.Name }}
"meta.helm.sh/release-namespace": {{ .Release.Namespace }}
labels:
"helm.sh/chart": {{ $.Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
"app.kubernetes.io/managed-by": {{ .Release.Service }}

data:
projectName: {{ .Values.name }}
baseUrl: {{ .Values.opsManager.URL }}
Expand Down
7 changes: 7 additions & 0 deletions charts/ent-operator-database/templates/database-roles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ metadata:
{{- else }}
namespace: {{ .Release.Namespace }}
{{- end }}
annotations:
"meta.helm.sh/release-name": {{ .Release.Name }}
"meta.helm.sh/release-namespace": {{ .Release.Namespace }}
labels:
"helm.sh/chart": {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
"app.kubernetes.io/managed-by": {{ .Release.Service }}

{{- if .Values.registry.imagePullSecrets}}
imagePullSecrets:
- name: {{ .Values.registry.imagePullSecrets }}
Expand Down
7 changes: 7 additions & 0 deletions charts/ent-operator-database/templates/database-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ kind: Secret
metadata:
name: {{ .Values.name }}-credential
namespace: {{ .Release.Namespace }}
annotations:
"meta.helm.sh/release-name": {{ .Release.Name }}
"meta.helm.sh/release-namespace": {{ .Release.Namespace }}
labels:
"helm.sh/chart": {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
"app.kubernetes.io/managed-by": {{ .Release.Service }}

type: Opaque
data:
user: {{ .Values.opsManager.APIKey | b64enc }}
Expand Down
8 changes: 7 additions & 1 deletion charts/ent-operator-database/templates/database.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ kind: MongoDB
metadata:
name: {{ .Values.name }}
namespace: {{ .Release.Namespace }}

annotations:
"meta.helm.sh/release-name": {{ .Release.Name }}
"meta.helm.sh/release-namespace": {{ .Release.Namespace }}
labels:
"helm.sh/chart": {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
"app.kubernetes.io/managed-by": {{ .Release.Service }}

spec:
type: {{ .Values.type | quote }}
members: {{ .Values.members }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ kind: Secret
metadata:
name: {{ $.Values.name }}-{{ .username }}-secret
namespace: {{ $.Release.Namespace }}
annotations:
"meta.helm.sh/release-name": {{ $.Release.Name }}
"meta.helm.sh/release-namespace": {{ $.Release.Namespace }}
labels:
"helm.sh/chart": {{ $.Chart.Name }}-{{ $.Chart.Version | replace "+" "_" }}
"app.kubernetes.io/managed-by": {{ $.Release.Service }}
type: Opaque
stringData:
password: {{ .password | quote}}
Expand Down
6 changes: 6 additions & 0 deletions charts/ent-operator-database/templates/mongodb-user.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ kind: MongoDBUser
metadata:
name: {{ $.Values.name }}-{{ .username }}-mongodbuser
namespace: {{ $.Release.Namespace }}
annotations:
"meta.helm.sh/release-name": {{ $.Release.Name }}
"meta.helm.sh/release-namespace": {{ $.Release.Namespace }}
labels:
"helm.sh/chart": {{ $.Chart.Name }}-{{ $.Chart.Version | replace "+" "_" }}
"app.kubernetes.io/managed-by": {{ $.Release.Service }}
spec:
passwordSecretKeyRef:
name: {{ $.Values.name }}-{{ .username }}-secret # the name of the secret that stores this user's password
Expand Down

0 comments on commit 54a36f1

Please sign in to comment.