Skip to content

Commit

Permalink
Update the remoteconfig platform test to set the expected environment…
Browse files Browse the repository at this point in the history
… variables

Signed-off-by: Pete Wall <[email protected]>
  • Loading branch information
petewall committed Jan 13, 2025
1 parent 039c0d7 commit 4a2960a
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,31 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
-
name: CLUSTER_NAME
valueFrom:
configMapKeyRef:
key: CLUSTER
name: test-variables
-
name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
-
name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
-
name: GCLOUD_FM_COLLECTOR_ID
value: $(CLUSTER_NAME)-$(NAMESPACE)-$(POD_NAME)
-
name: GCLOUD_RW_API_KEY
valueFrom:
secretKeyRef:
key: GRAFANA_CLOUD_FLEET_MGMT_TOKEN
name: grafana-cloud-credentials
envFrom:
- secretRef:
name: grafana-cloud-credentials
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
- secretRef: {name: grafana-cloud-credentials}
- configMapRef: {name: test-variables}
queries:
- query: alloy_build_info{cluster="$CLUSTER"}
- query: alloy_build_info{cluster="$CLUSTER", job="integrations/self"}
type: promql

# DPM check
Expand Down
21 changes: 21 additions & 0 deletions charts/k8s-monitoring/tests/platform/remote-config/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,27 @@ alloy-metrics:
passwordFrom: env("GRAFANA_CLOUD_FLEET_MGMT_TOKEN")
alloy:
stabilityLevel: public-preview
extraEnv:
- name: CLUSTER_NAME
valueFrom:
configMapKeyRef:
name: test-variables
key: CLUSTER
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: GCLOUD_FM_COLLECTOR_ID
value: $(CLUSTER_NAME)-$(NAMESPACE)-$(POD_NAME)
- name: GCLOUD_RW_API_KEY
valueFrom:
secretKeyRef:
name: grafana-cloud-credentials
key: GRAFANA_CLOUD_FLEET_MGMT_TOKEN
envFrom:
- secretRef:
name: grafana-cloud-credentials
Expand Down

0 comments on commit 4a2960a

Please sign in to comment.