Skip to content

Commit

Permalink
updating chart values for flux and helm-op (#93)
Browse files Browse the repository at this point in the history
* updating chart values for flux and helm-op

Signed-off-by: Michael Fornaro <[email protected]>

* [Auto Generation] Adding hydrated manifests

Signed-off-by: Michael Fornaro <[email protected]>

* fix linting

Signed-off-by: Michael Fornaro <[email protected]>

* move dex values.yaml to config dir

Signed-off-by: Michael Fornaro <[email protected]>
  • Loading branch information
xunholy authored Aug 30, 2020
1 parent c622b27 commit 90d846e
Show file tree
Hide file tree
Showing 7 changed files with 191 additions and 22 deletions.
File renamed without changes.
40 changes: 20 additions & 20 deletions config/flux/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,25 @@ git:
registry:
disableScanning: true

# prometheus:
# enabled: true
# serviceMonitor:
# # Enables ServiceMonitor creation for the Prometheus Operator
# create: true
# interval: 30s
# scrapeTimeout: 10s
# namespace: flux
# additionalLabels: {}
prometheus:
enabled: true
serviceMonitor:
# Enables ServiceMonitor creation for the Prometheus Operator
create: true
interval: 30s
scrapeTimeout: 10s
namespace: flux
additionalLabels: {}

# syncGarbageCollection:
# enabled: true
# dry: false
syncGarbageCollection:
enabled: true
dry: false

# dashboards:
# # If enabled, flux will create a configmap with a dashboard in json that's going to be picked up by grafana
# # See https://github.com/helm/charts/tree/master/stable/grafana#configuration - `sidecar.dashboards.enabled`
# enabled: true
# # The namespace where the dashboard is deployed, defaults to the installation namespace
# namespace:
# # The prefix of the generated configmaps
# nameprefix: dashboard
dashboards:
# If enabled, flux will create a configmap with a dashboard in json that's going to be picked up by grafana
# See https://github.com/helm/charts/tree/master/stable/grafana#configuration - `sidecar.dashboards.enabled`
enabled: true
# # The namespace where the dashboard is deployed, defaults to the installation namespace
# namespace:
# # The prefix of the generated configmaps
# nameprefix: dashboard
15 changes: 15 additions & 0 deletions config/helm-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,18 @@ resources:
requests:
cpu: 50m
memory: 64Mi

prometheus:
enabled: true
serviceMonitor:
# Enables ServiceMonitor creation for the Prometheus Operator
create: true
interval:
scrapeTimeout:
namespace:
additionalLabels: {}

dashboards:
# If enabled, helm-operator will create a configmap with a dashboard in json that's going to be picked up by grafana
# See https://github.com/helm/charts/tree/master/stable/grafana#configuration - `sidecar.dashboards.enabled`
enabled: true
153 changes: 153 additions & 0 deletions namespaces/flux/helm-operator/helm-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,136 @@ metadata:
namespace: flux
---
apiVersion: v1
data:
helm-operator-dashboard.json: '{ "__inputs": [ { "name": "DS_PROMETHEUS", "label":
"Prometheus", "description": "", "type": "datasource", "pluginId": "prometheus",
"pluginName": "Prometheus" }, { "name": "DS_LOKI", "label": "Loki", "description":
"", "type": "datasource", "pluginId": "loki", "pluginName": "Loki" } ], "__requires":
[ { "type": "grafana", "id": "grafana", "name": "Grafana", "version": "7.0.5"
}, { "type": "panel", "id": "graph", "name": "Graph", "version": "" }, { "type":
"panel", "id": "logs", "name": "Logs", "version": "" }, { "type": "datasource",
"id": "loki", "name": "Loki", "version": "1.0.0" }, { "type": "datasource", "id":
"prometheus", "name": "Prometheus", "version": "1.0.0" }, { "type": "panel", "id":
"stat", "name": "Stat", "version": "" }, { "type": "panel", "id": "table", "name":
"Table", "version": "" } ], "annotations": { "list": [ { "builtIn": 1, "datasource":
"-- Grafana --", "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255,
1)", "name": "Annotations & Alerts", "type": "dashboard" } ] }, "editable": true,
"gnetId": null, "graphTooltip": 0, "id": null, "iteration": 1594295805662, "links":
[], "panels": [ { "collapsed": false, "datasource": "${DS_PROMETHEUS}", "gridPos":
{ "h": 1, "w": 24, "x": 0, "y": 0 }, "id": 24, "panels": [], "title": "Main Metrics",
"type": "row" }, { "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults":
{ "custom": {}, "mappings": [], "thresholds": { "mode": "absolute", "steps": [
{ "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides":
[] }, "gridPos": { "h": 6, "w": 4, "x": 0, "y": 1 }, "id": 6, "options": { "colorMode":
"value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions":
{ "calcs": [ "mean" ], "fields": "", "values": false } }, "pluginVersion": "7.0.5",
"targets": [ { "expr": "flux_helm_operator_release_count{}", "interval": "", "legendFormat":
"Synced Manifests", "refId": "A" } ], "timeFrom": null, "timeShift": null, "title":
"Helm Releases Synced", "type": "stat" }, { "aliasColors": { "Sync Duration":
"semi-dark-green" }, "bars": false, "dashLength": 10, "dashes": false, "datasource":
"${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "custom": {} }, "overrides":
[] }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 12, "w": 20, "x": 4, "y":
1 }, "hiddenSeries": false, "id": 8, "legend": { "avg": false, "current": false,
"max": false, "min": false, "show": true, "total": false, "values": false }, "lines":
true, "linewidth": 1, "nullPointMode": "null", "options": { "dataLinks": [] },
"percentage": false, "pointradius": 2, "points": false, "renderer": "flot", "seriesOverrides":
[], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "expr":
"delta(flux_helm_operator_release_action_duration_seconds_sum{action=\"sync\"}[5m])
> 0", "interval": "", "legendFormat": "{{release_name}} sync", "refId": "A" }
], "thresholds": [], "timeFrom": null, "timeRegions": [], "timeShift": null, "title":
"Helm Release Sync Duration", "tooltip": { "shared": true, "sort": 0, "value_type":
"individual" }, "type": "graph", "xaxis": { "buckets": null, "mode": "time", "name":
null, "show": true, "values": [] }, "yaxes": [ { "format": "s", "label": null,
"logBase": 1, "max": null, "min": null, "show": true }, { "format": "s", "label":
null, "logBase": 1, "max": null, "min": null, "show": true } ], "yaxis": { "align":
false, "alignLevel": null } }, { "datasource": "${DS_PROMETHEUS}", "description":
"", "fieldConfig": { "defaults": { "custom": {}, "mappings": [], "thresholds":
{ "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color":
"red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 6, "w": 4, "x":
0, "y": 7 }, "id": 14, "options": { "colorMode": "value", "graphMode": "area",
"justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "mean"
], "fields": "", "values": false } }, "pluginVersion": "7.0.5", "targets": [ {
"expr": "flux_helm_operator_release_queue_length_count{}", "interval": "", "legendFormat":
"", "refId": "A" } ], "timeFrom": null, "timeShift": null, "title": "Helm Releases
Not Synced", "type": "stat" }, { "collapsed": false, "datasource": "${DS_PROMETHEUS}",
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 13 }, "id": 22, "panels": [], "title":
"Releases", "type": "row" }, { "datasource": "${DS_PROMETHEUS}", "fieldConfig":
{ "defaults": { "custom": { "align": null }, "mappings": [], "thresholds": { "mode":
"absolute", "steps": [ { "color": "green", "value": null }, { "color": "red",
"value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 12, "w": 8, "x": 0,
"y": 14 }, "id": 12, "options": { "frameIndex": 0, "showHeader": true, "sortBy":
[] }, "pluginVersion": "7.0.5", "targets": [ { "expr": "flux_helm_operator_release_condition_info{condition=\"Released\"}
== 1", "format": "table", "instant": true, "interval": "", "legendFormat": "",
"refId": "A" } ], "timeFrom": null, "timeShift": null, "title": "Helm Releases
- Released", "transformations": [ { "id": "organize", "options": { "excludeByName":
{ "Value": true, "__name__": true, "app": true, "condition": true, "instance":
true, "job": true, "kubernetes_namespace": true, "kubernetes_pod_name": true,
"pod_template_hash": true, "endpoint": true, "namespace": true, "pod": true, "service":
true, "release": true }, "indexByName": {}, "renameByName": { "Time": "Latest
Update", "release_name": "Release", "target_namespace": "Namespace" } } } ], "type":
"table" }, { "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": {
"custom": { "align": null }, "mappings": [], "thresholds": { "mode": "absolute",
"steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80
} ] } }, "overrides": [] }, "gridPos": { "h": 12, "w": 8, "x": 8, "y": 14 }, "id":
17, "options": { "frameIndex": 0, "showHeader": true, "sortBy": [] }, "pluginVersion":
"7.0.5", "targets": [ { "expr": "flux_helm_operator_release_condition_info{condition=\"Released\"}
== -1", "format": "table", "instant": true, "interval": "", "legendFormat": "",
"refId": "A" } ], "timeFrom": null, "timeShift": null, "title": "Helm Releases
- Failed", "transformations": [ { "id": "organize", "options": { "excludeByName":
{ "Value": true, "__name__": true, "app": true, "condition": true, "instance":
true, "job": true, "kubernetes_namespace": true, "kubernetes_pod_name": true,
"pod_template_hash": true, "endpoint": true, "namespace": true, "pod": true, "service":
true, "release": true }, "indexByName": {}, "renameByName": { "Time": "Latest
Update", "release_name": "Release", "target_namespace": "Namespace" } } } ], "type":
"table" }, { "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": {
"custom": { "align": null }, "mappings": [], "thresholds": { "mode": "absolute",
"steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80
} ] } }, "overrides": [] }, "gridPos": { "h": 12, "w": 8, "x": 16, "y": 14 },
"id": 18, "options": { "frameIndex": 0, "showHeader": true, "sortBy": [] }, "pluginVersion":
"7.0.5", "targets": [ { "expr": "flux_helm_operator_release_condition_info{condition=\"RolledBack\"}
== 1", "format": "table", "instant": true, "interval": "", "legendFormat": "",
"refId": "A" } ], "timeFrom": null, "timeShift": null, "title": "Helm Releases
- RolledBack", "transformations": [ { "id": "organize", "options": { "excludeByName":
{ "Value": true, "__name__": true, "app": true, "condition": true, "instance":
true, "job": true, "kubernetes_namespace": true, "kubernetes_pod_name": true,
"pod_template_hash": true, "endpoint": true, "namespace": true, "pod": true, "service":
true, "release": true }, "indexByName": {}, "renameByName": { "Time": "Latest
Update", "release_name": "Release", "target_namespace": "Namespace" } } } ], "type":
"table" }, { "collapsed": false, "datasource": "${DS_PROMETHEUS}", "gridPos":
{ "h": 1, "w": 24, "x": 0, "y": 26 }, "id": 20, "panels": [], "title": "Logs",
"type": "row" }, { "datasource": "${DS_LOKI}", "fieldConfig": { "defaults": {
"custom": { "align": null }, "mappings": [], "thresholds": { "mode": "absolute",
"steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80
} ] } }, "overrides": [] }, "gridPos": { "h": 20, "w": 24, "x": 0, "y": 27 },
"id": 2, "options": { "showLabels": false, "showTime": false, "sortOrder": "Descending",
"wrapLogMessage": false }, "pluginVersion": "7.0.3", "targets": [ { "expr": "{app=\"helm-operator\"}
|~ \"$logs_search\"", "refId": "A" } ], "timeFrom": null, "timeShift": null, "title":
"Helm Operator Logs", "type": "logs" } ], "schemaVersion": 25, "style": "dark",
"tags": [], "templating": { "list": [ { "current": { "selected": false, "text":
"Prometheus", "value": "Prometheus" }, "hide": 0, "includeAll": false, "label":
null, "multi": false, "name": "DS_PROMETHEUS", "options": [], "query": "prometheus",
"refresh": 1, "regex": "", "skipUrlSync": false, "type": "datasource" }, { "current":
{ "selected": true, "text": "Loki", "value": "Loki" }, "hide": 0, "includeAll":
false, "label": null, "multi": false, "name": "DS_LOKI", "options": [], "query":
"loki", "queryValue": "", "refresh": 1, "regex": "", "skipUrlSync": false, "type":
"datasource" }, { "current": { "selected": false, "text": "", "value": "" }, "hide":
0, "label": null, "name": "logs_search", "options": [ { "selected": true, "text":
"", "value": "" } ], "query": "", "skipUrlSync": false, "type": "textbox" } ]
}, "time": { "from": "now-6h", "to": "now" }, "timepicker": { "refresh_intervals":
[ "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d" ] }, "timezone": "",
"title": "Helm Operator Dashboard", "uid": "Q2SrQyMGk", "version": 1 }'
kind: ConfigMap
metadata:
labels:
app: helm-operator
chart: helm-operator-1.2.0
grafana_dashboard: "1"
heritage: Helm
release: default
name: helm-operator-dashboards-helm-operator-dashboard
namespace: flux
---
apiVersion: v1
kind: Service
metadata:
labels:
Expand Down Expand Up @@ -597,6 +727,7 @@ spec:
metadata:
annotations:
checksum/repositories: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
prometheus.io/scrape: "true"
labels:
app: helm-operator
release: default
Expand Down Expand Up @@ -662,3 +793,25 @@ spec:
secret:
defaultMode: 256
secretName: flux-git-ssh-private-key
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
app: helm-operator
chart: helm-operator-1.2.0
heritage: Helm
release: default
name: default-helm-operator
namespace: flux
spec:
endpoints:
- honorLabels: true
port: http
namespaceSelector:
matchNames:
- flux
selector:
matchLabels:
app: helm-operator
release: default
2 changes: 1 addition & 1 deletion namespaces/network/dex/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
Enter valid secrets into the values.yaml and use the following command to generate the secret, then use sealed secrets to encrypt these values to be used within the helm release resource.

```bash
kubectl -n network create secret generic dex-values --from-file=values.yaml=namespaces/network/dex/values.yaml --dry-run=true -o yaml > secret.yaml
kubectl -n network create secret generic dex-values --from-file=values.yaml=config/dex/values.yaml --dry-run=true -o yaml > secret.yaml
```
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ spec:
repository: raspbernetes/k8s-sidecar
tag: 0.1.144
imagePullPolicy: Always
dashboards:
enabled: true
plugins:
- natel-discrete-panel
- pr0ps-trackmap-panel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ spec:
creationTimestamp: null
name: auth-github-oauth-secret
namespace: observability

0 comments on commit 90d846e

Please sign in to comment.