Skip to content

Commit

Permalink
Add override for test image in agent-operator
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Zareichuk <[email protected]>
  • Loading branch information
8osm committed Mar 29, 2024
1 parent 7b85764 commit 0dfb439
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/agent-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: grafana-agent-operator
description: A Helm chart for Grafana Agent Operator
type: application
version: 0.3.19
version: 0.3.20
appVersion: "0.40.3"
home: https://grafana.com/docs/agent/v0.40/
icon: https://raw.githubusercontent.com/grafana/agent/v0.40.3/docs/sources/assets/logo_and_name.png
Expand Down
3 changes: 3 additions & 0 deletions charts/agent-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an
| image.registry | string | `"docker.io"` | Image registry |
| image.repository | string | `"grafana/agent-operator"` | Image repo |
| image.tag | string | `"v0.40.3"` | Image tag |
| test.image.registry | string | `"docker.io"` | Test image registry |
| test.image.repository | string | `"library/busybox"` | Test image repo |
| test.image.tag | string | `"latest"` | Test image tag |
| kubeletService | object | `{"namespace":"default","serviceName":"kubelet"}` | If both are set, Agent Operator will create and maintain a service for scraping kubelets https://grafana.com/docs/agent/latest/operator/getting-started/#monitor-kubelets |
| nameOverride | string | `""` | Overrides the chart's name |
| nodeSelector | object | `{}` | nodeSelector configuration |
Expand Down
4 changes: 2 additions & 2 deletions charts/agent-operator/templates/tests/test-grafanaagent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ metadata:
spec:
containers:
- name: busybox
image: busybox
image: "{{ .Values.test.image.registry }}/{{ .Values.test.image.repository }}:{{ .Values.test.image.tag }}"
command: ['wget']
args: ['grafana-agent-test-operated:8080/-/healthy']
# Wait for GrafanaAgent CR
initContainers:
- name: sleep
image: busybox
image: "{{ .Values.test.image.registry }}/{{ .Values.test.image.repository }}:{{ .Values.test.image.tag }}"
command: ['sleep', '60']
restartPolicy: Never
9 changes: 9 additions & 0 deletions charts/agent-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ image:
# -- Image pull secrets
pullSecrets: []

test:
image:
# -- Test image registry
registry: docker.io
# -- Test image repo
repository: library/busybox
# -- Test image tag
tag: latest

# -- hostAliases to add
hostAliases: []
# - ip: 1.2.3.4
Expand Down

0 comments on commit 0dfb439

Please sign in to comment.