Skip to content

Commit

Permalink
feat(canary): refactor to split out dashboards and metrics
Browse files Browse the repository at this point in the history
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
  • Loading branch information
dogonthehorizon committed Sep 17, 2022
1 parent b8552bf commit 86d081a
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 29 deletions.
17 changes: 0 additions & 17 deletions features/canary/prometheus/kustomization.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

resources:
- prometheus-grafana.yml

patchesStrategicMerge:
- spinnaker-config.yml

configMapGenerator:
- name: grafana-dashboard-spinnaker
files:
- spinnaker-dashboards.json

secretGenerator:
- name: prometheus-secrets
literals:
- grafanaDefaultUser=DefaultUser1!
- grafanaDefaultPassword=DefaultPass1!

generatorOptions:
disableNameSuffixHash: true

transformers:
- tfr-namespace-roles.yml
12 changes: 12 additions & 0 deletions features/operations/observability/prometheus/kustomization.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

patchesStrategicMerge:
- spinnaker-config.yml

configMapGenerator:
- name: grafana-dashboard-spinnaker
files:
- spinnaker-dashboards.json
options:
disableNameSuffixHash: true
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ metadata:
name: spinnaker
spec:
spinnakerConfig:
config:
metricStores:
prometheus:
enabled: true
add_source_metalabels: true
#config:
#metricStores:
#prometheus:
#enabled: true
#add_source_metalabels: true

# # Config used if prometheus server discover pods through annotations
# service-settings:
# spinnaker:
# kubernetes:
# podAnnotations:
# prometheus.io/scrape: true
# prometheus.io/path: /prometheus_metrics
# prometheus.io/port: 8008
service-settings:
spinnaker:
kubernetes:
podAnnotations:
prometheus.io/scrape: true
prometheus.io/path: /prometheus_metrics
prometheus.io/port: 8008
4 changes: 4 additions & 0 deletions third-party/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# third-party

This directory contains components that build or configure third-party tools
that interact with Spinnaker.
13 changes: 13 additions & 0 deletions third-party/prometheus/kustomization.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

resources:
- prometheus-grafana.yml

secretGenerator:
- name: prometheus-secrets
literals:
- grafanaDefaultUser=DefaultUser1!
- grafanaDefaultPassword=DefaultPass1!
options:
disableNameSuffixHash: true

0 comments on commit 86d081a

Please sign in to comment.