Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for setting NATS Pod annotations via Helm Chart #272

Merged
merged 3 commits into from
Jun 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions helm/nats-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ their default values.
| `cluster.namespace` | Namespace to deploy the NATS Cluster in, only possible if `clusterScoped` is set to `true` | `nats-io` |
| `cluster.version` | Version of NATS Cluster | `1.4.1` |
| `cluster.size` | Number of NATS Cluster nodes | `3` |
| `cluster.annotations` | Optional custom annotations to add to Pods in the cluster | `{}` |
| `cluster.resources` | Optional CPU/Memory resource requests/limits to set on Pods in the cluster | `{}` |
| `cluster.auth.enabled` | Switch to enable/disable client authentication | `true` |
| `cluster.auth.enableServiceAccounts` | Enable ServiceAccounts permissions | `false` |
| `cluster.auth.username` | Client authentication username | `true` |
Expand Down
9 changes: 5 additions & 4 deletions helm/nats-operator/templates/natscluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,18 @@ spec:
version: {{ .Values.cluster.version }}

pod:
{{- if .Values.cluster.annotations }}
annotations: {{ .Values.cluster.annotations | toYaml | nindent 6 }}
{{- end }}
{{- if .Values.cluster.resources }}
resources:
{{ .Values.cluster.resources | toYaml | nindent 6 }}
resources: {{ .Values.cluster.resources | toYaml | nindent 6 }}
{{- end }}
enableConfigReload: {{ .Values.cluster.configReload.enabled }}
reloaderImage: {{ .Values.cluster.configReload.repository }}
reloaderImageTag: {{ .Values.cluster.configReload.tag }}
reloaderImagePullPolicy: {{ .Values.cluster.configReload.pullPolicy }}
{{- if .Values.cluster.configReload.resources }}
reloaderResources:
{{ .Values.cluster.configReload.resources | toYaml | nindent 6 }}
reloaderResources: {{ .Values.cluster.configReload.resources | toYaml | nindent 6 }}
{{- end }}
enableMetrics: {{ .Values.cluster.metrics.enabled }}
metricsImage: {{ .Values.cluster.metrics.repository }}
Expand Down
3 changes: 3 additions & 0 deletions helm/nats-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ cluster:
## Cluster Size
size: 3

## Optional custom annotations to add to Pods in the cluster
annotations: {}

resources: {}
# limits:
# cpu: 500m
Expand Down