Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions charts/iits-admin-dashboard/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: iits-admin-dashboard
version: 1.7.1
appVersion: 2.1.0
version: 1.7.2
appVersion: 2.4.0
description: |
This chart deploys a super simple webserver that provides a simple website containing links to a set
of dashboards that are usually deployed in our infrastructure setup as well as some nifty external
Expand All @@ -13,7 +13,7 @@ description: |
iits-admin-dashboard:
namespace: admin
repoURL: "https://charts.iits.tech"
targetRevision: "1.7.1"
targetRevision: "1.7.2"
parameters:
ingress.host: "REPLACE_ME"
```
29 changes: 23 additions & 6 deletions charts/iits-admin-dashboard/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# iits-admin-dashboard

![Version: 1.7.1](https://img.shields.io/badge/Version-1.7.1-informational?style=flat-square) ![AppVersion: 2.1.0](https://img.shields.io/badge/AppVersion-2.1.0-informational?style=flat-square)
![Version: 1.7.2](https://img.shields.io/badge/Version-1.7.2-informational?style=flat-square) ![AppVersion: 2.4.0](https://img.shields.io/badge/AppVersion-2.4.0-informational?style=flat-square)

This chart deploys a super simple webserver that provides a simple website containing links to a set
of dashboards that are usually deployed in our infrastructure setup as well as some nifty external
Expand All @@ -12,7 +12,7 @@ tools.
iits-admin-dashboard:
namespace: admin
repoURL: "https://charts.iits.tech"
targetRevision: "1.7.1"
targetRevision: "1.7.2"
parameters:
ingress.host: "REPLACE_ME"
```
Expand Down Expand Up @@ -92,14 +92,17 @@ iits-admin-dashboard:
| deployment.health.startupProbe.initialDelaySeconds | int | `5` | |
| deployment.health.startupProbe.path | string | `"/"` | |
| deployment.health.startupProbe.periodSeconds | int | `5` | |
| deployment.image.name | string | `"docker-static-website"` | |
| deployment.image.pullPolicy | string | `"IfNotPresent"` | |
| deployment.image.registry | string | `"lipanski"` | |
| deployment.image.tag | string | `""` | |
| deployment.imagePullSecrets | list | `[]` | |
| deployment.onePodForEachNode | bool | `false` | |
| deployment.podAnnotations | object | `{}` | |
| deployment.podSecurityContext | string | `nil` | |
| deployment.replicaCount | int | `2` | |
| deployment.resources.limits.cpu | string | `"10m"` | |
| deployment.resources.limits.memory | string | `"8Mi"` | |
| deployment.resources.requests.cpu | string | `"1m"` | |
| deployment.resources.limits.memory | string | `"4Mi"` | |
| deployment.resources.requests.cpu | string | `"10m"` | |
| deployment.resources.requests.memory | string | `"4Mi"` | |
| deployment.securityContext.allowPrivilegeEscalation | bool | `false` | |
| deployment.securityContext.capabilities.drop[0] | string | `"ALL"` | |
Expand All @@ -110,7 +113,7 @@ iits-admin-dashboard:
| ingress.annotations."traefik.ingress.kubernetes.io/router.entrypoints" | string | `"websecure"` | |
| ingress.annotations."traefik.ingress.kubernetes.io/router.tls" | string | `"true"` | |
| ingress.enabled | bool | `true` | |
| ingress.host | string | `nil` | Required, replace it with your host address |
| ingress.host | string | `""` | Required, replace it with your host address |
| ingress.hosts[0].host | string | `"{{ .Values.ingress.host }}"` | |
| ingress.hosts[0].paths[0].path | string | `"/"` | |
| ingress.labels | string | `nil` | |
Expand All @@ -122,6 +125,20 @@ iits-admin-dashboard:
| serviceAccount.annotations | object | `{}` | |
| serviceAccount.create | bool | `true` | |
| serviceAccount.name | string | `""` | |
| uptimeMonitor.bearerTokenFile | string | `""` | |
| uptimeMonitor.blackboxNamespace | string | `"monitoring"` | |
| uptimeMonitor.defaults.additionalMetricsRelabels | object | `{}` | |
| uptimeMonitor.defaults.additionalRelabeling | list | `[]` | |
| uptimeMonitor.defaults.honorTimestamps | bool | `true` | |
| uptimeMonitor.defaults.interval | string | `"30s"` | |
| uptimeMonitor.defaults.jobName | string | `"prometheus-stack"` | |
| uptimeMonitor.defaults.labels | object | `{}` | |
| uptimeMonitor.defaults.module | string | `"http_2xx"` | |
| uptimeMonitor.defaults.scrapeTimeout | string | `"30s"` | |
| uptimeMonitor.enabled | bool | `false` | |
| uptimeMonitor.path | string | `"/probe"` | |
| uptimeMonitor.scheme | string | `"http"` | |
| uptimeMonitor.tlsConfig | object | `{}` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
4 changes: 2 additions & 2 deletions charts/iits-admin-dashboard/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ spec:
securityContext:
{{- toYaml .securityContext | nindent 12 }}
{{- end }}
image: "lipanski/docker-static-website:{{ $.Chart.AppVersion }}"
imagePullPolicy: "IfNotPresent"
image: "{{ .image.registry }}/{{ .image.name }}:{{ .image.tag | default $.Chart.AppVersion }}"
imagePullPolicy: {{ .image.pullPolicy | default "IfNotPresent" }}

ports:
- name: "http"
Expand Down
63 changes: 63 additions & 0 deletions charts/iits-admin-dashboard/templates/servicemonitor-uptime.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{{- with .Values.uptimeMonitor }}
{{ $defaults := .defaults }}
{{- if .enabled | toString | eq "true" }}
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ printf "uptime-admin-dashboard" | replace "_" "-" | trunc 63 | trimSuffix "-" }}
spec:
endpoints:
- port: http
scheme: {{ $.Values.uptimeMonitor.scheme }}
{{- if $.Values.uptimeMonitor.bearerTokenFile }}
bearerTokenFile: {{ $.Values.uptimeMonitor.bearerTokenFile }}
{{- end }}
{{- if $.Values.uptimeMonitor.tlsConfig }}
tlsConfig: {{ toYaml $.Values.uptimeMonitor.tlsConfig | nindent 6 }}
{{- end }}
path: {{ $.Values.uptimeMonitor.path }}
interval: {{ .interval | default $defaults.interval }}
scrapeTimeout: {{ .scrapeTimeout | default $defaults.scrapeTimeout }}
honorTimestamps: {{ .honorTimestamps | default $defaults.honorTimestamps }}
params:
module:
- {{ .module | default $defaults.module }}
target:
- {{ $.Values.ingress.host }}
Comment on lines +26 to +27
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this does not work, the target needs to consist of schema + host + path.
You are also not iterating over what the actual endpoints the ingress exposes, but are simply hardcoding a single (wrong) value.

{{- if .hostname }}
hostname:
- {{ .hostname }}
{{- end }}
metricRelabelings:
- sourceLabels: [ instance ]
targetLabel: instance
replacement: admin-dashboard
action: replace
- sourceLabels: [ target ]
targetLabel: target
replacement: {{ $.Values.ingress.host }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrongly hardcoded value

action: replace
- targetLabel: module
replacement: {{ .module | default $defaults.module }}
action: replace
{{- range $targetLabel, $replacement := .additionalMetricsRelabels | default $defaults.additionalMetricsRelabels }}
- targetLabel: {{ $targetLabel | quote }}
replacement: {{ $replacement | quote }}
action: replace
{{- end }}
{{- if concat (.additionalRelabeling | default list) $defaults.additionalRelabeling }}
relabelings:
{{ toYaml (concat (.additionalRelabeling | default list) $defaults.additionalRelabeling) | indent 6 }}
{{- end }}
jobLabel: "{{ .jobName | default $defaults.jobName }}"
selector:
matchLabels:
app.kubernetes.io/instance: prometheus-stack
app.kubernetes.io/name: blackboxExporter
namespaceSelector:
matchNames:
- {{ $.Values.uptimeMonitor.blackboxNamespace | default "monitoring" }}
{{- end }}
{{- end }}

33 changes: 28 additions & 5 deletions charts/iits-admin-dashboard/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ ingress:
enabled: true

# -- Required, replace it with your host address
host:
host: ""

labels:

Expand All @@ -141,13 +141,18 @@ deployment:

annotations:

image:
registry: "lipanski"
name: "docker-static-website"
tag: "" # default is .Chart.AppVersion
pullPolicy: "IfNotPresent"

resources:
requests:
memory: "4Mi"
cpu: "1m"
limits:
memory: "8Mi"
cpu: "10m"
limits:
memory: "4Mi"

podAnnotations: { }

Expand Down Expand Up @@ -196,4 +201,22 @@ service:
annotations:
labels:
type: "ClusterIP"
port: 80
port: 80

uptimeMonitor:
enabled: false
# Default values that will be used for all ServiceMonitors created by `targets`
defaults:
additionalMetricsRelabels: {}
additionalRelabeling: []
labels: {}
interval: 30s
scrapeTimeout: 30s
honorTimestamps: true
module: http_2xx
jobName: "prometheus-stack"
scheme: http
path: "/probe"
blackboxNamespace: "monitoring"
tlsConfig: {}
bearerTokenFile: ""