Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/simplify configuration after port fix #46

Closed
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
2 changes: 1 addition & 1 deletion charts/uptime-kuma/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ name: uptime-kuma
sources:
- https://github.com/louislam/uptime-kuma
type: application
version: 2.3.1
version: 2.3.2
12 changes: 7 additions & 5 deletions charts/uptime-kuma/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# uptime-kuma

![Version: 2.3.1](https://img.shields.io/badge/Version-2.3.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.14.0](https://img.shields.io/badge/AppVersion-1.14.0-informational?style=flat-square)
![Version: 2.3.2](https://img.shields.io/badge/Version-2.3.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.14.0](https://img.shields.io/badge/AppVersion-1.14.0-informational?style=flat-square)

A self-hosted Monitoring tool like "Uptime-Robot".

Expand Down Expand Up @@ -28,11 +28,12 @@ A self-hosted Monitoring tool like "Uptime-Robot".
| fullnameOverride | string | `""` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"louislam/uptime-kuma"` | |
| image.tag | string | `"1.14.0-alpine"` | |
| image.tag | string | `"1.15.0-beta.0"` | |
| imagePullSecrets | list | `[]` | |
| ingress.annotations."nginx.ingress.kubernetes.io/proxy-read-timeout" | string | `"3600"` | |
| ingress.annotations."nginx.ingress.kubernetes.io/proxy-send-timeout" | string | `"3600"` | |
| ingress.annotations."nginx.ingress.kubernetes.io/server-snippets" | string | `"location / {\n proxy_set_header Upgrade $http_upgrade;\n proxy_http_version 1.1;\n proxy_set_header X-Forwarded-Host $http_host;\n proxy_set_header X-Forwarded-Proto $scheme;\n proxy_set_header X-Forwarded-For $remote_addr;\n proxy_set_header Host $host;\n proxy_set_header Connection \"upgrade\";\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n proxy_set_header Upgrade $http_upgrade;\n proxy_cache_bypass $http_upgrade;\n}\n"` | |
| ingress.className | string | `""` | |
| ingress.enabled | bool | `false` | |
| ingress.extraLabels | object | `{}` | |
| ingress.hosts[0].host | string | `"chart-example.local"` | |
Expand All @@ -42,15 +43,15 @@ A self-hosted Monitoring tool like "Uptime-Robot".
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | |
| podEnv[0].name | string | `"UPTIME_KUMA_PORT"` | |
| podEnv[0].value | string | `"3001"` | |
| podEnv | list | `[]` | environment variables to pass to the main pod container |
| podLabels | object | `{}` | |
| podPort | int | `3001` | internal port configuration to use in main pod container |
| podSecurityContext | object | `{}` | |
| replicaCount | int | `1` | |
| resources | object | `{}` | |
| securityContext | object | `{}` | |
| service.annotations | object | `{}` | |
| service.port | int | `3001` | |
| service.port | int | `3001` | exposed service port for uptime-kuma, may be the same port as configured for `podPort` |
| service.type | string | `"ClusterIP"` | |
| serviceAccount.annotations | object | `{}` | |
| serviceAccount.create | bool | `false` | |
Expand All @@ -61,6 +62,7 @@ A self-hosted Monitoring tool like "Uptime-Robot".
| volume.enabled | bool | `true` | |
| volume.existingClaim | object | `{}` | |
| volume.size | string | `"4Gi"` | |
| volume.storageClassName | string | `""` | If you want to use a storage class other than the default define the storage class name |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.8.1](https://github.com/norwoodj/helm-docs/releases/v1.8.1)
11 changes: 11 additions & 0 deletions charts/uptime-kuma/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ Selector labels
{{- define "uptime-kuma.selectorLabels" -}}
app.kubernetes.io/name: {{ include "uptime-kuma.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.podLabels }}
{{ toYaml .Values.podLabels }}
{{- end }}
{{- end }}

{{/*
Expand All @@ -60,3 +63,11 @@ Create the name of the service account to use
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{/*
Create a map of default environment variable values for pods / containers
*/}}
{{- define "uptime-kuma.defaultPodEnv" -}}
- name: UPTIME_KUMA_PORT
value: {{ .Values.podPort | quote }}
{{- end }}
11 changes: 6 additions & 5 deletions charts/uptime-kuma/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- with .Values.podEnv }}
env:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.podEnv }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- include "uptime-kuma.defaultPodEnv" . | nindent 12 }}
ports:
- name: http
containerPort: 3001
containerPort: {{ .Values.podPort }}
protocol: TCP
{{ if .Values.volume.enabled -}}
volumeMounts:
Expand All @@ -55,7 +56,7 @@ spec:
readinessProbe:
httpGet:
path: /
port: 3001
port: {{ .Values.podPort }}
scheme: HTTP
resources:
{{- toYaml .Values.resources | nindent 12 }}
Expand Down
5 changes: 2 additions & 3 deletions charts/uptime-kuma/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "uptime-kuma.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
Expand Down Expand Up @@ -54,10 +53,10 @@ spec:
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
name: http
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
servicePort: {{ .Values.service.port }}
{{- end }}
{{- end }}
{{- end }}
Expand Down
6 changes: 3 additions & 3 deletions charts/uptime-kuma/templates/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ metadata:
{{- include "uptime-kuma.labels" . | nindent 4 }}
spec:
accessModes:
- ReadWriteOnce
- {{ .Values.volume.accessMode }}
resources:
requests:
storage: {{ .Values.volume.size | quote }}
{{- with .Values.volume.storageClassName }}
storageClassName: {{ . }}
{{- if .Values.volume.storageClassName }}
storageClassName: {{ .Values.volume.storageClassName | quote }}
{{- end }}
{{- end -}}
{{- end -}}
2 changes: 1 addition & 1 deletion charts/uptime-kuma/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: 3001
targetPort: http
protocol: TCP
name: http
selector:
Expand Down
26 changes: 10 additions & 16 deletions charts/uptime-kuma/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ spec:
selector:
matchLabels:
{{- include "uptime-kuma.selectorLabels" . | nindent 6 }}
{{- if .Values.podLabels }}
{{ toYaml .Values.podLabels | indent 6 }}
{{- end }}
template:
metadata:
{{- with .Values.podAnnotations }}
Expand All @@ -24,15 +21,11 @@ spec:
{{- end }}
labels:
{{- include "uptime-kuma.selectorLabels" . | nindent 8 }}
{{- if .Values.podLabels }}
{{ toYaml .Values.podLabels | indent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
enableServiceLinks: false
serviceAccountName: {{ include "uptime-kuma.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
Expand All @@ -42,13 +35,14 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- with .Values.podEnv }}
env:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.podEnv }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- include "uptime-kuma.defaultPodEnv" . | nindent 12 }}
ports:
- name: http
containerPort: 3001
containerPort: {{ .Values.podPort }}
protocol: TCP
{{ if .Values.volume.enabled -}}
volumeMounts:
Expand All @@ -63,7 +57,7 @@ spec:
readinessProbe:
httpGet:
path: /
port: 3001
port: {{ .Values.podPort }}
scheme: HTTP
resources:
{{- toYaml .Values.resources | nindent 12 }}
Expand All @@ -88,9 +82,9 @@ spec:
- {{ .Values.volume.accessMode }}
resources:
requests:
storage: {{ .Values.volume.size }}
{{- with .Values.volume.storageClassName }}
storageClassName: {{ . }}
storage: {{ .Values.volume.size | quote }}
{{- if .Values.volume.storageClassName }}
storageClassName: {{ .Values.volume.storageClassName | quote }}
{{- end }}
{{- end -}}
{{- end -}}
{{- end -}}
23 changes: 14 additions & 9 deletions charts/uptime-kuma/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ image:
repository: louislam/uptime-kuma
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "1.14.0-alpine"
tag: "1.15.0-beta.0"

imagePullSecrets: []
nameOverride: ""
Expand All @@ -27,12 +27,17 @@ serviceAccount:
name: ""

podAnnotations: {}

podLabels: {}
# app: uptime-kuma
podEnv:
# a default port must be set. required by container
- name: "UPTIME_KUMA_PORT"
value: "3001"

# -- environment variables to pass to the main pod container
podEnv: []
# - name: "UPTIME_KUMA_PORT"
# value: "3001"

# -- internal port configuration to use in main pod container
podPort: 3001

podSecurityContext: {}
# fsGroup: 2000
Expand All @@ -47,12 +52,13 @@ securityContext: {}

service:
type: ClusterIP
# -- exposed service port for uptime-kuma, may be the same port as configured for `podPort`
port: 3001
annotations: {}

ingress:
enabled: false
# className: ""
className: ""
extraLabels: {}
# vhost: uptime-kuma.company.corp
annotations:
Expand Down Expand Up @@ -113,8 +119,7 @@ volume:
enabled: true
accessMode: ReadWriteOnce
size: 4Gi
# If you want to use a storage class other than the default, uncomment this
# line and define the storage class name
# storageClassName:
# -- If you want to use a storage class other than the default define the storage class name
storageClassName: ""
# Reuse your own pre-existing PVC.
existingClaim: {}