Skip to content

Commit 86d081a

Browse files
committedSep 17, 2022
feat(canary): refactor to split out dashboards and metrics
Unfortunately Components don't compose as well as I'd like so we're unable to have features/canary and features/operations inheirt from the same Prometheus component. Hoping that some of this can be "linted" with conftest and at least point to potential issues w/ configuration
1 parent b8552bf commit 86d081a

File tree

7 files changed

+41
-29
lines changed

7 files changed

+41
-29
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,8 @@
11
apiVersion: kustomize.config.k8s.io/v1alpha1
22
kind: Component
33

4-
resources:
5-
- prometheus-grafana.yml
6-
74
patchesStrategicMerge:
85
- spinnaker-config.yml
96

10-
configMapGenerator:
11-
- name: grafana-dashboard-spinnaker
12-
files:
13-
- spinnaker-dashboards.json
14-
15-
secretGenerator:
16-
- name: prometheus-secrets
17-
literals:
18-
- grafanaDefaultUser=DefaultUser1!
19-
- grafanaDefaultPassword=DefaultPass1!
20-
21-
generatorOptions:
22-
disableNameSuffixHash: true
23-
247
transformers:
258
- tfr-namespace-roles.yml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: kustomize.config.k8s.io/v1alpha1
2+
kind: Component
3+
4+
patchesStrategicMerge:
5+
- spinnaker-config.yml
6+
7+
configMapGenerator:
8+
- name: grafana-dashboard-spinnaker
9+
files:
10+
- spinnaker-dashboards.json
11+
options:
12+
disableNameSuffixHash: true

‎accounts/metric-stores/patch-prometheus.yml ‎features/operations/observability/prometheus/spinnaker-config.yml

+12-12
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ metadata:
77
name: spinnaker
88
spec:
99
spinnakerConfig:
10-
config:
11-
metricStores:
12-
prometheus:
13-
enabled: true
14-
add_source_metalabels: true
10+
#config:
11+
#metricStores:
12+
#prometheus:
13+
#enabled: true
14+
#add_source_metalabels: true
1515

1616
# # Config used if prometheus server discover pods through annotations
17-
# service-settings:
18-
# spinnaker:
19-
# kubernetes:
20-
# podAnnotations:
21-
# prometheus.io/scrape: true
22-
# prometheus.io/path: /prometheus_metrics
23-
# prometheus.io/port: 8008
17+
service-settings:
18+
spinnaker:
19+
kubernetes:
20+
podAnnotations:
21+
prometheus.io/scrape: true
22+
prometheus.io/path: /prometheus_metrics
23+
prometheus.io/port: 8008

‎third-party/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# third-party
2+
3+
This directory contains components that build or configure third-party tools
4+
that interact with Spinnaker.
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: kustomize.config.k8s.io/v1alpha1
2+
kind: Component
3+
4+
resources:
5+
- prometheus-grafana.yml
6+
7+
secretGenerator:
8+
- name: prometheus-secrets
9+
literals:
10+
- grafanaDefaultUser=DefaultUser1!
11+
- grafanaDefaultPassword=DefaultPass1!
12+
options:
13+
disableNameSuffixHash: true

0 commit comments

Comments
 (0)
Please sign in to comment.