Skip to content

Commit

Permalink
Merge pull request #285 from percona/psmdb-operator-annotations-support
Browse files Browse the repository at this point in the history
K8SPSMDB-1037 - psmdb-operator add annotations for deployment, pod and service account
  • Loading branch information
tplavcic authored Jan 30, 2024
2 parents f5b644b + 528bed6 commit 37ea961
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/psmdb-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ appVersion: "1.15.0"
description: A Helm chart for deploying the Percona Operator for MongoDB
name: psmdb-operator
home: https://docs.percona.com/percona-operator-for-mongodb/
version: 1.15.0
version: 1.15.1
maintainers:
- name: tplavcic
email: [email protected]
Expand Down
3 changes: 3 additions & 0 deletions charts/psmdb-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ The chart can be customized using the following configurable parameters:
| `image.pullSecrets` | PSMDB Operator Pod pull secret | `[]` |
| `replicaCount` | PSMDB Operator Pod quantity | `1` |
| `tolerations` | List of node taints to tolerate | `[]` |
| `annotations` | PSMDB Operator Deployment annotations | `{}` |
| `podAnnotations` | PSMDB Operator Pod annotations | `{}` |
| `resources` | Resource requests and limits | `{}` |
| `nodeSelector` | Labels for Pod assignment | `{}` |
| `podAnnotations` | Annotations for pod | `{}` |
Expand All @@ -40,6 +42,7 @@ The chart can be customized using the following configurable parameters:
| `rbac.create` | If false RBAC will not be created. RBAC resources will need to be created manually | `true` |
| `securityContext` | Container Security Context | `{}` |
| `serviceAccount.create` | If false the ServiceAccounts will not be created. The ServiceAccounts must be created manually | `true` |
| `serviceAccount.annotations` | PSMDB Operator ServiceAccount annotations | `{}` |
| `logStructured` | Force PSMDB operator to print JSON-wrapped log messages | `false` |
| `logLevel` | PSMDB Operator logging level | `INFO` |
| `disableTelemetry` | Disable sending PSMDB Operator telemetry data to Percona | `false` |
Expand Down
6 changes: 5 additions & 1 deletion charts/psmdb-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ metadata:
name: {{ include "psmdb-operator.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{ include "psmdb-operator.labels" . | indent 4 }}
{{- include "psmdb-operator.labels" . | nindent 4 }}
{{- with .Values.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
Expand Down
4 changes: 4 additions & 0 deletions charts/psmdb-operator/templates/role-binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ kind: ServiceAccount
metadata:
name: {{ include "psmdb-operator.fullname" . }}
namespace: {{ .Release.Namespace }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
---
{{- end }}
{{- if .Values.rbac.create }}
Expand Down
6 changes: 6 additions & 0 deletions charts/psmdb-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ rbac:
serviceAccount:
# serviceAccount.create: Whether to create the Service Accounts or not
create: true
# annotations to add to the service account
annotations: {}

# annotations to add to the operator deployment
annotations: {}

# annotations to add to the operator pod
podAnnotations: {}
# prometheus.io/scrape: "true"
# prometheus.io/port: "8080"
Expand Down

0 comments on commit 37ea961

Please sign in to comment.