Skip to content
Snippets Groups Projects
Verified Commit 4c55d258 authored by Sheogorath's avatar Sheogorath :european_castle:
Browse files

ci(charts): Upgrade to new helm-unittest version

parent 36bb14e1
Branches
Tags
No related merge requests found
......@@ -46,7 +46,7 @@ chart-helm-unittest:
stage: lint
extends: .chart-matrix
image:
name: docker.io/helmunittest/helm-unittest:3.11.3-0.3.1
name: docker.io/helmunittest/helm-unittest:3.12.3-0.3.5
entrypoint: [""]
script:
- if [ ! -e charts/${CHART}/tests ]; then echo "No helm unittests"; exit 0; fi
......
{{- if .Values.postgresql.tls.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "hedgedoc.fullname" . }}-config
labels:
{{- include "hedgedoc.labels" . | nindent 4 }}
data:
config.json: |
{
"production": {
"db": {
"dialect": "postgres",
"protocol": "postgres",
"dialectOptions": {
"ssl": {
"require": true
}
}
}
}
}
{{- end }}
\ No newline at end of file
......@@ -74,3 +74,27 @@ data:
{{- with .Values.config.defaultPermission }}
CMD_DEFAULT_PERMISSION: {{ . | quote }}
{{- end }}
{{- if .Values.postgresql.tls.enabled }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "hedgedoc.fullname" . }}-config
labels:
{{- include "hedgedoc.labels" . | nindent 4 }}
data:
config.json: |
{
"production": {
"db": {
"dialect": "postgres",
"protocol": "postgres",
"dialectOptions": {
"ssl": {
"require": true
}
}
}
}
}
{{- end }}
\ No newline at end of file
......@@ -15,7 +15,6 @@ spec:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
checksum/config-file: {{ include (print $.Template.BasePath "/configmap-config.yaml") . | sha256sum }}
checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
......
......@@ -55,7 +55,6 @@ should match basic snapshot:
metadata:
annotations:
checksum/config: 0e1a1adf160f3fcd20e855d82408506085eedd859609b97406b8c3c4a085d8df
checksum/config-file: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
checksum/secret: 01de24789eacad789d51ab7b8e4987c034609b47cec2f6db41ff940f904fd252
labels:
app.kubernetes.io/instance: RELEASE-NAME
......
should match basic snapshot:
1: |
apiVersion: v1
data:
nutdashboard.json: |2-
{
"__elements": {},
"__requires": [
{
"type": "panel",
"id": "gauge",
"name": "Gauge",
"version": ""
},
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "9.3.1"
},
{
"type": "panel",
"id": "graph",
"name": "Graph (old)",
"version": ""
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
},
{
"type": "panel",
"id": "stat",
"name": "Stat",
"version": ""
}
],
"annotations": {
"list": [
{
"$$hashKey": "object:7",
"builtIn": 1,
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"enable": true,
"expr": "max by (ups, flag) (network_ups_tools_ups_status{ups=\"$ups\", flag!=\"OL\"}) == 1",
"iconColor": "red",
"name": "UPS Status Events",
"titleFormat": "{{flag}}}"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": null,
"links": [],
"liveNow": false,
"panels": [
{
"collapsed": false,
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"id": 17,
"panels": [],
"repeat": "ups",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"refId": "A"
}
],
"title": "$ups",
"type": "row"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"description": " * OL - On line (mains is present)\n * OB - On battery (mains is not present)\n * LB - Low battery\n * HB - High battery\n * RB - The battery needs to be replaced\n * CHRG - The battery is charging\n * DISCHRG - The battery is discharging (inverter is providing load power)\n * BYPASS - UPS bypass circuit is active -- no battery protection is available\n * CAL - UPS is currently performing runtime calibration (on battery)\n * OFF - UPS is offline and is not supplying power to the load\n * OVER - UPS is overloaded\n * TRIM - UPS is trimming incoming voltage (called \"buck\" in some hardware)\n * BOOST - UPS is boosting incoming voltage\n * FSD and SD - Forced Shutdown",
"fieldConfig": {
"defaults": {
"color": {
"mode": "fixed"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 3,
"w": 3,
"x": 0,
"y": 1
},
"id": 26,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "name"
},
"pluginVersion": "9.3.1",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "max by (ups, flag) (network_ups_tools_ups_status{ups=\"$ups\"}) == 1",
"interval": "",
"legendFormat": "{{flag}}",
"refId": "A"
}
],
"title": "UPS Status",
"transparent": true,
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "fixed"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 3,
"w": 10,
"x": 3,
"y": 1
},
"id": 19,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"mean"
],
"fields": "",
"values": false
},
"textMode": "name"
},
"pluginVersion": "9.3.1",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "max by (ups, model, mfr, serial) (network_ups_tools_device_info{ups=\"$ups\"})",
"interval": "",
"legendFormat": "{{mfr}}",
"refId": "A"
}
],
"title": "Manufacturer",
"transparent": true,
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "fixed"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 3,
"w": 11,
"x": 13,
"y": 1
},
"id": 20,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"mean"
],
"fields": "",
"values": false
},
"textMode": "name"
},
"pluginVersion": "9.3.1",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "max by (ups, model, mfr, serial) (network_ups_tools_device_info{ups=\"$ups\"})",
"interval": "",
"legendFormat": "{{model}}",
"refId": "A"
}
],
"title": "Model",
"transparent": true,
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"max": 100,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "dark-red",
"value": null
},
{
"color": "dark-orange",
"value": 30
},
{
"color": "dark-yellow",
"value": 60
},
{
"color": "dark-green",
"value": 80
}
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 3,
"x": 0,
"y": 4
},
"id": 2,
"options": {
"orientation": "auto",
"reduceOptions": {
"calcs": [
"last"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "9.3.1",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "min by (ups) (network_ups_tools_battery_charge{ups=\"$ups\"})",
"instant": false,
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"title": "Battery Charge",
"transparent": true,
"type": "gauge"
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"description": "",
"fieldConfig": {
"defaults": {},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "network_ups_tools_battery_runtime{instance=\"ups.example.com:9199\", job=\"nut-ups\", ups=\"ups\"}"
},
"properties": [
{
"id": "unit"
},
{
"id": "links"
}
]
}
]
},
"fill": 1,
"fillGradient": 5,
"gridPos": {
"h": 6,
"w": 10,
"x": 3,
"y": 4
},
"hiddenSeries": false,
"id": 11,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": false,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null as zero",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "9.3.1",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "min by (ups) (network_ups_tools_battery_runtime{ups=\"$ups\"})",
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"thresholds": [
{
"$$hashKey": "object:416",
"colorMode": "warning",
"fill": true,
"line": false,
"op": "lt",
"value": 900,
"yaxis": "left"
},
{
"$$hashKey": "object:422",
"colorMode": "critical",
"fill": true,
"line": false,
"op": "lt",
"value": 300,
"yaxis": "left"
}
],
"timeRegions": [],
"title": "Battery Run Time Left",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"transparent": true,
"type": "graph",
"xaxis": {
"mode": "time",
"show": true,
"values": []
},
"yaxes": [
{
"$$hashKey": "object:74",
"format": "s",
"label": "",
"logBase": 1,
"min": "0",
"show": true
},
{
"$$hashKey": "object:75",
"format": "short",
"logBase": 1,
"show": true
}
],
"yaxis": {
"align": false
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"fill": 1,
"fillGradient": 5,
"gridPos": {
"h": 6,
"w": 11,
"x": 13,
"y": 4
},
"hiddenSeries": false,
"id": 15,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": false,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null as zero",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "9.3.1",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "max by (ups) (network_ups_tools_ups_load{ups=\"$ups\"})",
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"thresholds": [],
"timeRegions": [],
"title": "Load",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"transparent": true,
"type": "graph",
"xaxis": {
"mode": "time",
"show": true,
"values": []
},
"yaxes": [
{
"$$hashKey": "object:1040",
"format": "percent",
"label": "",
"logBase": 1,
"max": "100",
"min": "0",
"show": true
},
{
"$$hashKey": "object:1041",
"format": "short",
"logBase": 1,
"show": true
}
],
"yaxis": {
"align": false
}
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"fieldConfig": {
"defaults": {
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "dark-red",
"value": null
},
{
"color": "dark-green",
"value": 120
}
]
},
"unit": "s"
},
"overrides": []
},
"gridPos": {
"h": 2,
"w": 3,
"x": 0,
"y": 8
},
"id": 24,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"mean"
],
"fields": "",
"values": false
},
"textMode": "value"
},
"pluginVersion": "9.3.1",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "min by (ups) (network_ups_tools_battery_runtime{ups=\"$ups\"})",
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"title": "Battery Runtime",
"transparent": true,
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"fieldConfig": {
"defaults": {
"mappings": [],
"max": 260,
"min": 210,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "dark-red",
"value": null
},
{
"color": "dark-yellow",
"value": 207
},
{
"color": "dark-green",
"value": 220
},
{
"color": "dark-yellow",
"value": 230
},
{
"color": "dark-red",
"value": 253
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 3,
"x": 0,
"y": 10
},
"id": 5,
"links": [],
"options": {
"orientation": "auto",
"reduceOptions": {
"calcs": [
"last"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "9.3.1",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "avg by (ups) (network_ups_tools_input_voltage{ups=\"$ups\"})",
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"title": "Line Volts",
"transparent": true,
"type": "gauge"
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"fill": 1,
"fillGradient": 5,
"gridPos": {
"h": 6,
"w": 21,
"x": 3,
"y": 10
},
"hiddenSeries": false,
"id": 12,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"rightSide": false,
"show": false,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null as zero",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "9.3.1",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "avg by (ups) (network_ups_tools_input_voltage{ups=\"$ups\"})",
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"thresholds": [],
"timeRegions": [],
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"transparent": true,
"type": "graph",
"xaxis": {
"mode": "time",
"show": true,
"values": []
},
"yaxes": [
{
"$$hashKey": "object:652",
"format": "short",
"label": "",
"logBase": 1,
"max": "260",
"min": "210",
"show": true
},
{
"$$hashKey": "object:653",
"format": "short",
"logBase": 1,
"show": true
}
],
"yaxis": {
"align": false
}
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"fieldConfig": {
"defaults": {
"mappings": [
{
"options": {
"match": "null",
"result": {
"text": "N/A"
}
},
"type": "special"
}
],
"max": 30,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "dark-red",
"value": null
},
{
"color": "dark-yellow",
"value": 10
},
{
"color": "dark-green",
"value": 11
},
{
"color": "dark-yellow",
"value": 13
},
{
"color": "dark-red",
"value": 14
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 3,
"x": 0,
"y": 16
},
"id": 4,
"links": [],
"options": {
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"last"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "9.3.1",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "min by (ups) (network_ups_tools_battery_voltage{ups=\"$ups\"})",
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"title": "Battery Volts",
"transparent": true,
"type": "gauge"
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"fill": 1,
"fillGradient": 5,
"gridPos": {
"h": 6,
"w": 21,
"x": 3,
"y": 16
},
"hiddenSeries": false,
"id": 13,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"rightSide": false,
"show": false,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null as zero",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "9.3.1",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "min by (ups) (network_ups_tools_battery_voltage{ups=\"$ups\"})",
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"thresholds": [],
"timeRegions": [],
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"transparent": true,
"type": "graph",
"xaxis": {
"mode": "time",
"show": true,
"values": []
},
"yaxes": [
{
"$$hashKey": "object:652",
"format": "short",
"label": "",
"logBase": 1,
"min": "0",
"show": true
},
{
"$$hashKey": "object:653",
"format": "short",
"logBase": 1,
"show": true
}
],
"yaxis": {
"align": false
}
}
],
"refresh": false,
"schemaVersion": 37,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
"current": {},
"hide": 0,
"includeAll": false,
"multi": false,
"name": "datasource",
"options": [],
"query": "prometheus",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
},
{
"current": {},
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"definition": "label_values(network_ups_tools_device_info, ups)",
"hide": 0,
"includeAll": false,
"label": "UPS",
"multi": false,
"name": "ups",
"options": [],
"query": {
"query": "label_values(network_ups_tools_device_info, ups)",
"refId": "Prometheus-ups-Variable-Query"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tagsQuery": "",
"type": "query",
"useTags": false
}
]
},
"time": {
"from": "now-24h",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
]
},
"timezone": "",
"title": "UPS statistics",
"uid": "j4a-DMWRk",
"version": 14,
"weekStart": ""
}
kind: ConfigMap
metadata:
labels:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: nut-exporter
app.kubernetes.io/version: 4.5.6
grafana_dashboard: "1"
helm.sh/chart: nut-exporter-1.2.3
name: RELEASE-NAME-nut-exporter-dashboards
2: |
apiVersion: apps/v1
kind: Deployment
metadata:
......@@ -71,20 +1159,6 @@ should match basic snapshot:
seccompProfile:
type: RuntimeDefault
serviceAccountName: RELEASE-NAME-nut-exporter
2: |
apiVersion: v1
data:
nutdashboard.json: ""
kind: ConfigMap
metadata:
labels:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: nut-exporter
app.kubernetes.io/version: 4.5.6
grafana_dashboard: "1"
helm.sh/chart: nut-exporter-1.2.3
name: RELEASE-NAME-nut-exporter-dashboards
3: |
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment