Skip to content

Commit

Permalink
feat: add controller annotations (#5649)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcanevet authored Nov 3, 2023
1 parent d27f011 commit 00cb90f
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions operations/helm/charts/grafana-agent/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Unreleased
### Enhancements

- Expose the `ui-path-prefix` flag on the Helm chart (@mlcdf)
- Expose controller `extraAnnotations` on the Helm chart (@mcanevet)

0.27.1 (2023-10-26)
----------
Expand Down
1 change: 1 addition & 0 deletions operations/helm/charts/grafana-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ use the older mode (called "static mode"), set the `agent.mode` value to
| controller.autoscaling.targetMemoryUtilizationPercentage | int | `80` | Average Memory utilization across all relevant pods, a percentage of the requested value of the resource for the pods. Setting `targetMemoryUtilizationPercentage` to 0 will disable Memory scaling. |
| controller.dnsPolicy | string | `"ClusterFirst"` | Configures the DNS policy for the pod. https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy |
| controller.enableStatefulSetAutoDeletePVC | bool | `false` | Whether to enable automatic deletion of stale PVCs due to a scale down operation, when controller.type is 'statefulset'. |
| controller.extraAnnotations | object | `{}` | Annotations to add to controller. |
| controller.hostNetwork | bool | `false` | Configures Pods to use the host network. When set to true, the ports that will be used must be specified. |
| controller.hostPID | bool | `false` | Configures Pods to use the host PID namespace. |
| controller.initContainers | list | `[]` | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ metadata:
name: {{ include "grafana-agent.fullname" . }}
labels:
{{- include "grafana-agent.labels" . | nindent 4 }}
{{- with .Values.controller.extraAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if ge (int .Capabilities.KubeVersion.Minor) 22 }}
minReadySeconds: 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ metadata:
name: {{ include "grafana-agent.fullname" . }}
labels:
{{- include "grafana-agent.labels" . | nindent 4 }}
{{- with .Values.controller.extraAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if not .Values.controller.autoscaling.enabled }}
replicas: {{ .Values.controller.replicas }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ metadata:
name: {{ include "grafana-agent.fullname" . }}
labels:
{{- include "grafana-agent.labels" . | nindent 4 }}
{{- with .Values.controller.extraAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if not .Values.controller.autoscaling.enabled }}
replicas: {{ .Values.controller.replicas }}
Expand Down
3 changes: 3 additions & 0 deletions operations/helm/charts/grafana-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ controller:
# -- Number of pods to deploy. Ignored when controller.type is 'daemonset'.
replicas: 1

# -- Annotations to add to controller.
extraAnnotations: {}

# -- Whether to deploy pods in parallel. Only used when controller.type is
# 'statefulset'.
parallelRollout: true
Expand Down
1 change: 0 additions & 1 deletion operations/helm/ct.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ remote: origin
target-branch: main
chart-dirs:
- operations/helm/charts
helm-extra-args: --timeout 600s
validate-maintainers: false
check-version-increment: false # Don't require every change to be released

0 comments on commit 00cb90f

Please sign in to comment.