-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
All is working except the random numbers in the tests
Signed-off-by: Pete Wall <[email protected]>
- Loading branch information
Showing
14 changed files
with
70 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
export GCP_SERVICE_ACCOUNT=$(op --account grafana.1password.com read "op://Kubernetes Monitoring/GCP k8s-monitoring-helm-cluster-creator/username") | ||
op --account grafana.1password.com read "op://Kubernetes Monitoring/GCP k8s-monitoring-helm-cluster-creator/credential" > sak.json | ||
export GCP_SERVICE_ACCOUNT=$(op --account grafana.1password.com read "op://Kubernetes Monitoring/GCP k8s-monitoring-helm-cluster-creator/username") | ||
op --account grafana.1password.com read --out-file sak.json "op://Kubernetes Monitoring/GCP k8s-monitoring-helm-cluster-creator/credential" | ||
gcloud auth activate-service-account "${GCP_SERVICE_ACCOUNT}" --key-file=sak.json | ||
rm sak.json | ||
|
||
export GRAFANA_CLOUD_METRICS_USERNAME=$(op --account grafana.1password.com read "op://Kubernetes Monitoring/helmchart Prometheus/username") | ||
export GRAFANA_CLOUD_LOGS_USERNAME=$(op --account grafana.1password.com read "op://Kubernetes Monitoring/helmchart Loki/username") | ||
export GRAFANA_CLOUD_TRACES_USERNAME=$(op --account grafana.1password.com read "op://Kubernetes Monitoring/helmchart Tempo/username") | ||
export GRAFANA_CLOUD_RW_POLICY_TOKEN=$(op --account grafana.1password.com read "op://Kubernetes Monitoring/helmchart Prometheus/password") | ||
export GRAFANA_CLOUD_METRICS_QUERY_URL=https://prometheus-prod-13-prod-us-east-0.grafana.net/api/prom/push | ||
export GRAFANA_CLOUD_METRICS_USERNAME=$(op --account grafana.1password.com read "op://Kubernetes Monitoring/helmchart Prometheus/username") | ||
export GRAFANA_CLOUD_LOGS_QUERY_URL=https://logs-prod-006.grafana.net/loki/api/v1/query | ||
export GRAFANA_CLOUD_LOGS_USERNAME=$(op --account grafana.1password.com read "op://Kubernetes Monitoring/helmchart Loki/username") | ||
export GRAFANA_CLOUD_RW_POLICY_TOKEN=$(op --account grafana.1password.com read "op://Kubernetes Monitoring/helmchart Prometheus/password") | ||
export RANDOM_NUMBER=$(shuf -i 100000-999999 -n 1) |
2 changes: 2 additions & 0 deletions
2
charts/k8s-monitoring/tests/platform/gke-autopilot/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
deployments/grafana-cloud-credentials.yaml | ||
deployments/test-variables.yaml |
19 changes: 19 additions & 0 deletions
19
charts/k8s-monitoring/tests/platform/gke-autopilot/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
all: deployments/test-variables.yaml deployments/grafana-cloud-credentials.yaml | ||
clean: | ||
rm -f deployments/test-variables.yaml deployments/grafana-cloud-credentials.yaml | ||
|
||
deployments/test-variables.yaml: | ||
kubectl create configmap test-variables \ | ||
--from-literal=CLUSTER="$(shell yq eval '.cluster.name' values.yaml)-$$RANDOM_NUMBER" \ | ||
--from-literal=RANDOM_NUMBER="$$RANDOM_NUMBER" \ | ||
-o yaml --dry-run=client > $@ | ||
|
||
deployments/grafana-cloud-credentials.yaml: | ||
kubectl create secret generic grafana-cloud-credentials \ | ||
--from-literal=PROMETHEUS_URL="$$GRAFANA_CLOUD_METRICS_QUERY_URL" \ | ||
--from-literal=PROMETHEUS_USER="$$GRAFANA_CLOUD_METRICS_USERNAME" \ | ||
--from-literal=PROMETHEUS_PASS="$$GRAFANA_CLOUD_RW_POLICY_TOKEN" \ | ||
--from-literal=LOKI_URL="$$GRAFANA_CLOUD_LOGS_QUERY_URL" \ | ||
--from-literal=LOKI_USER="$$GRAFANA_CLOUD_LOGS_USERNAME" \ | ||
--from-literal=LOKI_PASS="$$GRAFANA_CLOUD_RW_POLICY_TOKEN" \ | ||
-o yaml --dry-run=client > $@ |
12 changes: 0 additions & 12 deletions
12
...ts/k8s-monitoring/tests/platform/gke-autopilot/deployments/grafana-cloud-credentials.yaml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletions
7
charts/k8s-monitoring/tests/platform/gke-autopilot/deployments/test-variables.yaml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
export GRAFANA_CLOUD_FLEET_MGMT_USER=$(op --account grafana.1password.com read "op://Kubernetes Monitoring/helmchart Fleet Management/username") | ||
export GRAFANA_CLOUD_FLEET_MGMT_TOKEN=$(op --account grafana.1password.com read "op://Kubernetes Monitoring/helmchart Fleet Management/password") | ||
export GRAFANA_CLOUD_METRICS_QUERY_URL=https://prometheus-prod-13-prod-us-east-0.grafana.net/api/prom/push | ||
export GRAFANA_CLOUD_METRICS_USERNAME=$(op --account grafana.1password.com read "op://Kubernetes Monitoring/helmchart Prometheus/username") | ||
export GRAFANA_CLOUD_LOGS_USERNAME=$(op --account grafana.1password.com read "op://Kubernetes Monitoring/helmchart Loki/username") | ||
export GRAFANA_CLOUD_RW_POLICY_TOKEN=$(op --account grafana.1password.com read "op://Kubernetes Monitoring/helmchart Loki/password") | ||
export GRAFANA_CLOUD_RW_POLICY_TOKEN=$(op --account grafana.1password.com read "op://Kubernetes Monitoring/helmchart Prometheus/password") | ||
export RANDOM_NUMBER=$(shuf -i 100000-999999 -n 1) |
2 changes: 2 additions & 0 deletions
2
charts/k8s-monitoring/tests/platform/remote-config/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
deployments/grafana-cloud-credentials.yaml | ||
deployments/test-variables.yaml |
18 changes: 18 additions & 0 deletions
18
charts/k8s-monitoring/tests/platform/remote-config/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
all: deployments/test-variables.yaml deployments/grafana-cloud-credentials.yaml | ||
clean: | ||
rm -f deployments/test-variables.yaml deployments/grafana-cloud-credentials.yaml | ||
|
||
deployments/test-variables.yaml: | ||
kubectl create configmap test-variables \ | ||
--from-literal=CLUSTER="$(shell yq eval '.cluster.name' values.yaml)-$$RANDOM_NUMBER" \ | ||
--from-literal=RANDOM_NUMBER="$$RANDOM_NUMBER" \ | ||
-o yaml --dry-run=client > $@ | ||
|
||
deployments/grafana-cloud-credentials.yaml: | ||
kubectl create secret generic grafana-cloud-credentials \ | ||
--from-literal=GRAFANA_CLOUD_FLEET_MGMT_USER="$$GRAFANA_CLOUD_FLEET_MGMT_USER" \ | ||
--from-literal=GRAFANA_CLOUD_FLEET_MGMT_TOKEN="$$GRAFANA_CLOUD_FLEET_MGMT_TOKEN" \ | ||
--from-literal=PROMETHEUS_URL="$$GRAFANA_CLOUD_METRICS_QUERY_URL" \ | ||
--from-literal=PROMETHEUS_USER="$$GRAFANA_CLOUD_METRICS_USERNAME" \ | ||
--from-literal=PROMETHEUS_PASS="$$GRAFANA_CLOUD_RW_POLICY_TOKEN" \ | ||
-o yaml --dry-run=client > $@ |
13 changes: 0 additions & 13 deletions
13
...ts/k8s-monitoring/tests/platform/remote-config/deployments/grafana-cloud-credentials.yaml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
charts/k8s-monitoring/tests/platform/remote-config/deployments/test-variables.yaml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
cluster: | ||
name: remote-config-platform-test | ||
name: remote-config-test | ||
|
||
alloy-metrics: | ||
enabled: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters