Skip to content
This repository was archived by the owner on Jul 28, 2026. It is now read-only.
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ Main (unreleased)
- Set the `Content-Type` HTTP header to `application/json` for API endpoints
returning json objects. (@marctc)

- Operator: fix issue where a `username_file` field was incorrectly set.
(@rfratto)

### Other changes

- Update base image of official Docker containers from Debian buster to Debian
Expand Down
4 changes: 2 additions & 2 deletions pkg/operator/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func TestBuildConfigMetrics(t *testing.T) {
basicAuth:
username:
name: example-secret
key: uname
key: key
password:
name: example-secret
key: pword
Expand Down Expand Up @@ -113,7 +113,7 @@ func TestBuildConfigMetrics(t *testing.T) {
remote_write:
- url: http://localhost:9090/api/v1/write
basic_auth:
username_file: /var/lib/grafana-agent/secrets/_secrets_default_example_secret_uname
username: somesecret
password_file: /var/lib/grafana-agent/secrets/_secrets_default_example_secret_pword
tls_config:
ca_file: /var/lib/grafana-agent/secrets/_configMaps_default_example_cm_key
Expand Down
2 changes: 1 addition & 1 deletion pkg/operator/config/metrics_templates_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ func TestRemoteWrite(t *testing.T) {
expect: util.Untab(`
url: http://cortex/api/prom/push
basic_auth:
username_file: /var/lib/grafana-agent/secrets/_secrets_operator_obj_key
username: secretkey
password_file: /var/lib/grafana-agent/secrets/_secrets_operator_obj_key
`),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function(namespace, rw) {

basic_auth: (
if rw.BasicAuth != null then {
username_file: secrets.pathForSecret(namespace, rw.BasicAuth.Username),
username: secrets.valueForSecret(namespace, rw.BasicAuth.Username),
password_file: secrets.pathForSecret(namespace, rw.BasicAuth.Password),
}
),
Expand Down