-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
Signed-off-by: Pete Wall <[email protected]>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
cluster-installer-files | ||
deployments/grafana-cloud-credentials.yaml | ||
deployments/test-variables.yaml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
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: | ||
echo "---" > $@ | ||
kubectl create configmap test-variables \ | ||
--from-literal=CLUSTER="$(shell yq eval '.cluster.name' values.yaml)-$$RANDOM_NUMBER" \ | ||
--from-literal=RANDOM_NUMBER="$$RANDOM_NUMBER" \ | ||
--from-literal=ANNOTATION_POD_LOG_SERVICE_NAME="hello-kubernetes-annotation" \ | ||
--from-literal=LABEL_POD_LOG_SERVICE_NAME="hello-kubernetes-label" \ | ||
-o yaml --dry-run=client >> $@ | ||
|
||
deployments/grafana-cloud-credentials.yaml: | ||
echo "---" > $@ | ||
echo "# yamllint disable rule:line-length" >> $@ | ||
kubectl create secret generic grafana-cloud-credentials \ | ||
--from-literal=PROMETHEUS_USER="$$GRAFANA_CLOUD_METRICS_USERNAME" \ | ||
--from-literal=PROMETHEUS_PASS="$$GRAFANA_CLOUD_RW_POLICY_TOKEN" \ | ||
--from-literal=LOKI_USER="$$GRAFANA_CLOUD_LOGS_USERNAME" \ | ||
--from-literal=LOKI_PASS="$$GRAFANA_CLOUD_RW_POLICY_TOKEN" \ | ||
-o yaml --dry-run=client >> $@ | ||
|
||
flux-manifests/flux.yaml: | ||
flux install \ | ||
--components source-controller,helm-controller \ | ||
--export > $@ | ||
|
||
flux-manifests/scc.yaml: | ||
wget https://raw.githubusercontent.com/fluxcd/flux2/main/manifests/openshift/scc.yaml -O $@ | ||
|
||
.PHONY: flux-manifests | ||
flux-manifests: flux-manifests/flux.yaml flux-manifests/scc.yaml | ||
|
||
run-test: | ||
../../../../../scripts/run-cluster-test.sh . |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
apiVersion: source.toolkit.fluxcd.io/v1 | ||
kind: GitRepository | ||
metadata: | ||
name: k8s-monitoring-test | ||
spec: | ||
interval: 1m | ||
url: https://github.com/grafana/k8s-monitoring-helm | ||
ref: | ||
branch: main | ||
ignore: | | ||
/* | ||
!/charts/k8s-monitoring-test | ||
--- | ||
apiVersion: helm.toolkit.fluxcd.io/v2 | ||
kind: HelmRelease | ||
metadata: | ||
name: k8s-monitoring-test | ||
spec: | ||
interval: 1m | ||
chart: | ||
spec: | ||
chart: charts/k8s-monitoring-test | ||
sourceRef: | ||
kind: GitRepository | ||
name: k8s-monitoring-test | ||
interval: 1m | ||
values: | ||
tests: | ||
- env: | ||
PROMETHEUS_URL: https://prometheus-prod-13-prod-us-east-0.grafana.net/api/prom/api/v1/query | ||
LOKI_URL: https://logs-prod-006.grafana.net/loki/api/v1/query | ||
envFrom: | ||
- secretRef: {name: grafana-cloud-credentials} | ||
- configMapRef: {name: test-variables} | ||
queries: | ||
# Self reporting metrics | ||
- query: grafana_kubernetes_monitoring_build_info{cluster="$CLUSTER"} | ||
type: promql | ||
- query: grafana_kubernetes_monitoring_feature_info{cluster="$CLUSTER", feature="clusterMetrics"} | ||
type: promql | ||
- query: grafana_kubernetes_monitoring_feature_info{cluster="$CLUSTER", feature="clusterEvents"} | ||
type: promql | ||
- query: grafana_kubernetes_monitoring_feature_info{cluster="$CLUSTER", feature="podLogs", method="volumes"} | ||
type: promql |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
additionalTrustBundlePolicy: Proxyonly | ||
Check failure on line 1 in charts/k8s-monitoring/tests/platform/openshift/openshift-cluster-config.yaml
|
||
apiVersion: v1 | ||
#metadata: | ||
Check failure on line 3 in charts/k8s-monitoring/tests/platform/openshift/openshift-cluster-config.yaml
|
||
# name: WILL BE REPLACED BY scripts/include/cluster/openshift.sh | ||
baseDomain: okd.grafana.petewall.net | ||
controlPlane: | ||
name: master | ||
replicas: 1 | ||
platform: | ||
gcp: | ||
type: e2-standard-8 | ||
architecture: amd64 | ||
hyperthreading: Enabled | ||
compute: | ||
- name: worker | ||
Check failure on line 15 in charts/k8s-monitoring/tests/platform/openshift/openshift-cluster-config.yaml
|
||
replicas: 0 | ||
platform: | ||
gcp: | ||
type: custom-6-20480 | ||
architecture: amd64 | ||
hyperthreading: Enabled | ||
networking: | ||
clusterNetwork: | ||
- cidr: 10.128.0.0/14 | ||
Check failure on line 24 in charts/k8s-monitoring/tests/platform/openshift/openshift-cluster-config.yaml
|
||
hostPrefix: 23 | ||
machineNetwork: | ||
- cidr: 10.0.0.0/16 | ||
Check failure on line 27 in charts/k8s-monitoring/tests/platform/openshift/openshift-cluster-config.yaml
|
||
networkType: OVNKubernetes | ||
serviceNetwork: | ||
- 172.30.0.0/16 | ||
Check failure on line 30 in charts/k8s-monitoring/tests/platform/openshift/openshift-cluster-config.yaml
|
||
platform: | ||
gcp: | ||
projectID: grafana-k8s-monitoring | ||
region: us-central1 | ||
publish: External | ||
pullSecret: '{"auths":{"fake":{"auth":"aWQ6cGFzcwo="}}}' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
cluster: | ||
Check failure on line 1 in charts/k8s-monitoring/tests/platform/openshift/values.yaml
|
||
name: openshift-test | ||
|
||
global: | ||
platform: openshift | ||
|
||
destinations: | ||
- name: grafanaCloudMetrics | ||
type: prometheus | ||
url: https://prometheus-prod-13-prod-us-east-0.grafana.net/api/prom/push | ||
auth: | ||
type: basic | ||
usernameKey: PROMETHEUS_USER | ||
passwordKey: PROMETHEUS_PASS | ||
secret: | ||
create: false | ||
name: grafana-cloud-credentials | ||
- name: grafanaCloudLogs | ||
type: loki | ||
url: https://logs-prod-006.grafana.net/loki/api/v1/push | ||
auth: | ||
type: basic | ||
usernameKey: LOKI_USER | ||
passwordKey: LOKI_PASS | ||
secret: | ||
create: false | ||
name: grafana-cloud-credentials | ||
|
||
clusterMetrics: | ||
enabled: true | ||
opencost: | ||
enabled: true | ||
metricsSource: grafanaCloudMetrics | ||
opencost: | ||
exporter: | ||
defaultClusterId: k8s-monitoring-gc-feature-test | ||
prometheus: | ||
external: | ||
url: https://prometheus-prod-13-prod-us-east-0.grafana.net/api/prom | ||
existingSecretName: grafana-cloud-credentials | ||
username_key: PROMETHEUS_USER | ||
password_key: PROMETHEUS_PASS | ||
kepler: | ||
enabled: true | ||
|
||
clusterEvents: | ||
enabled: true | ||
|
||
podLogs: | ||
enabled: true | ||
|
||
integrations: | ||
alloy: | ||
instances: | ||
- name: alloy | ||
labelSelectors: | ||
app.kubernetes.io/name: [alloy-metrics, alloy-singleton, alloy-logs] |