add alias for backward compat
This commit is contained in:
1 parent
8f657dcd36
commit
0ec77a5ab1
9 files changed
+104
-36
No files matched your search
@@ -42,6 +42,51 @@ kubectl get svc
|
|||||||
|
|
||||||
Once all pods are `Running` and `Ready`, you can access Checkmate via the configured ingress hosts.
|
Once all pods are `Running` and `Ready`, you can access Checkmate via the configured ingress hosts.
|
||||||
|
|
||||||
|
## Upgrading from a previous release
|
||||||
|
|
||||||
|
This release renames the `server.*` value block to `api.*` and drops the (unused) bundled Redis.
|
||||||
|
Read this before running `helm upgrade` on an existing install.
|
||||||
|
|
||||||
|
### `server.*` → `api.*` (values rename)
|
||||||
|
|
||||||
|
The value block formerly named `server` is now `api` (`server.image` → `api.image`,
|
||||||
|
`server.ingress.host` → `api.ingress.host`, `server.protocol` → `api.protocol`, `server.resources`,
|
||||||
|
`server.affinity`, `server.tolerations`, `server.ingress.*`, etc.).
|
||||||
|
|
||||||
|
**Your existing `server.*` overrides keep working** — the chart merges any legacy `server.*` values on
|
||||||
|
top of the `api.*` defaults (legacy wins where set), so an unchanged values file upgrades cleanly. The
|
||||||
|
shim is transitional; migrate your overrides to `api.*` at your convenience and drop the `server:`
|
||||||
|
block. If you set **both** `server.*` and `api.*` for the same field, the legacy `server.*` value wins —
|
||||||
|
don't mix them.
|
||||||
|
|
||||||
|
### Resource renames cause a replace, not a rename
|
||||||
|
|
||||||
|
The Kubernetes objects are renamed alongside the values:
|
||||||
|
|
||||||
|
| Old object | New object |
|
||||||
|
| --- | --- |
|
||||||
|
| Deployment/Service `checkmate-server` | `checkmate-api` |
|
||||||
|
| Ingress `checkmate-server-ingress` | `checkmate-api-ingress` |
|
||||||
|
| ConfigMap `checkmate-server-nginx-cm` | `checkmate-client-nginx-cm` |
|
||||||
|
|
||||||
|
Helm deletes the old objects and creates the new ones on upgrade. Expect a brief API restart and a
|
||||||
|
**new ClusterIP** for the API Service — update anything outside the chart that referenced the
|
||||||
|
`checkmate-server` Service by name. MongoDB data (its PVC) is untouched.
|
||||||
|
|
||||||
|
### Redis removed
|
||||||
|
|
||||||
|
The bundled Redis StatefulSet/Service and the `redis.*` / `persistence.redis.*` values are gone — the
|
||||||
|
scheduler runs in-process and never used them. Default installs (`redis.enabled: false`) are
|
||||||
|
unaffected. If you had explicitly set `redis.enabled: true`, **the Redis StatefulSet and its PVC are
|
||||||
|
deleted on upgrade** — back up anything you stored there first. Leftover `redis:` / `persistence.redis:`
|
||||||
|
keys in your values file are harmless (ignored).
|
||||||
|
|
||||||
|
### New secret defaults
|
||||||
|
|
||||||
|
`NODE_ENV: production`, `LOG_LEVEL: info`, and `TOKEN_TTL: 99d` are now part of the default `secrets`
|
||||||
|
block and merge into your install unless you override them. Set them explicitly if you relied on
|
||||||
|
different values (e.g. a non-production `NODE_ENV`).
|
||||||
|
|
||||||
## Scaling: the worker tier & autoscaling
|
## Scaling: the worker tier & autoscaling
|
||||||
|
|
||||||
By default the chart runs a single all-in-one API pod that both schedules **and** processes monitoring
|
By default the chart runs a single all-in-one API pod that both schedules **and** processes monitoring
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
{{- /*
|
||||||
|
Back-compat shim: the `server.*` value block was renamed to `api.*`. Existing installs that
|
||||||
|
still pass a legacy `server:` block keep working — this returns the effective API values with any
|
||||||
|
legacy `server.*` overrides merged on top of the `api.*` defaults (legacy wins where set).
|
||||||
|
|
||||||
|
New installs have no `server:` key, so this is a no-op deepCopy of `.Values.api`. Consume it as:
|
||||||
|
{{- $api := include "checkmate.api" . | fromYaml -}}
|
||||||
|
then reference `$api.*` instead of `.Values.api.*`.
|
||||||
|
*/}}
|
||||||
|
{{- define "checkmate.api" -}}
|
||||||
|
{{- $api := deepCopy .Values.api -}}
|
||||||
|
{{- with .Values.server -}}
|
||||||
|
{{- $api = mergeOverwrite $api (deepCopy .) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- $api | toYaml -}}
|
||||||
|
{{- end -}}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
{{- $api := include "checkmate.api" . | fromYaml -}}
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
@@ -12,21 +13,21 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: checkmate-api
|
app: checkmate-api
|
||||||
spec:
|
spec:
|
||||||
{{- with .Values.api.affinity }}
|
{{- with $api.affinity }}
|
||||||
affinity:
|
affinity:
|
||||||
{{- tpl ( . | toYaml) $ | nindent 8 }}
|
{{- tpl ( . | toYaml) $ | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.api.tolerations }}
|
{{- with $api.tolerations }}
|
||||||
tolerations:
|
tolerations:
|
||||||
{{- tpl ( . | toYaml) $ | nindent 8 }}
|
{{- tpl ( . | toYaml) $ | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
containers:
|
containers:
|
||||||
- name: api
|
- name: api
|
||||||
image: {{ .Values.api.image }}
|
image: {{ $api.image }}
|
||||||
imagePullPolicy: {{ .Values.api.imagePullPolicy }}
|
imagePullPolicy: {{ $api.imagePullPolicy }}
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
containerPort: {{ .Values.api.port }}
|
containerPort: {{ $api.port }}
|
||||||
envFrom:
|
envFrom:
|
||||||
- secretRef:
|
- secretRef:
|
||||||
name: checkmate-secrets
|
name: checkmate-secrets
|
||||||
@@ -37,19 +38,19 @@ spec:
|
|||||||
httpGet:
|
httpGet:
|
||||||
path: /api/v1/health
|
path: /api/v1/health
|
||||||
port: http
|
port: http
|
||||||
initialDelaySeconds: {{ .Values.api.probes.liveness.initialDelaySeconds }}
|
initialDelaySeconds: {{ $api.probes.liveness.initialDelaySeconds }}
|
||||||
periodSeconds: {{ .Values.api.probes.liveness.periodSeconds }}
|
periodSeconds: {{ $api.probes.liveness.periodSeconds }}
|
||||||
timeoutSeconds: {{ .Values.api.probes.liveness.timeoutSeconds }}
|
timeoutSeconds: {{ $api.probes.liveness.timeoutSeconds }}
|
||||||
failureThreshold: {{ .Values.api.probes.liveness.failureThreshold }}
|
failureThreshold: {{ $api.probes.liveness.failureThreshold }}
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /api/v1/health
|
path: /api/v1/health
|
||||||
port: http
|
port: http
|
||||||
initialDelaySeconds: {{ .Values.api.probes.readiness.initialDelaySeconds }}
|
initialDelaySeconds: {{ $api.probes.readiness.initialDelaySeconds }}
|
||||||
periodSeconds: {{ .Values.api.probes.readiness.periodSeconds }}
|
periodSeconds: {{ $api.probes.readiness.periodSeconds }}
|
||||||
timeoutSeconds: {{ .Values.api.probes.readiness.timeoutSeconds }}
|
timeoutSeconds: {{ $api.probes.readiness.timeoutSeconds }}
|
||||||
failureThreshold: {{ .Values.api.probes.readiness.failureThreshold }}
|
failureThreshold: {{ $api.probes.readiness.failureThreshold }}
|
||||||
{{- with .Values.api.resources }}
|
{{- with $api.resources }}
|
||||||
resources:
|
resources:
|
||||||
{{- tpl ( . | toYaml) $ | nindent 12 }}
|
{{- tpl ( . | toYaml) $ | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
{{- if .Values.api.ingress.enabled }}
|
{{- $api := include "checkmate.api" . | fromYaml -}}
|
||||||
|
{{- if $api.ingress.enabled }}
|
||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: checkmate-api-ingress
|
name: checkmate-api-ingress
|
||||||
{{- if .Values.api.ingress.annotations }}
|
{{- if $api.ingress.annotations }}
|
||||||
annotations:
|
annotations:
|
||||||
{{- range $key, $value := .Values.api.ingress.annotations }}
|
{{- range $key, $value := $api.ingress.annotations }}
|
||||||
{{ $key }}: {{ $value | quote }}
|
{{ $key }}: {{ $value | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -17,15 +18,15 @@ metadata:
|
|||||||
#nginx.ingress.kubernetes.io/cors-allow-headers: "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization"
|
#nginx.ingress.kubernetes.io/cors-allow-headers: "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization"
|
||||||
#nginx.ingress.kubernetes.io/cors-allow-credentials: "true"*/}}
|
#nginx.ingress.kubernetes.io/cors-allow-credentials: "true"*/}}
|
||||||
spec:
|
spec:
|
||||||
ingressClassName: {{ .Values.api.ingress.className }}
|
ingressClassName: {{ $api.ingress.className }}
|
||||||
{{- if .Values.api.ingress.tls.enabled }}
|
{{- if $api.ingress.tls.enabled }}
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- {{ .Values.api.ingress.host }}
|
- {{ $api.ingress.host }}
|
||||||
secretName: {{ default (printf "%s-api-tls" .Release.Name) .Values.api.ingress.tls.secretName }}
|
secretName: {{ default (printf "%s-api-tls" .Release.Name) $api.ingress.tls.secretName }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
rules:
|
rules:
|
||||||
- host: {{ .Values.api.ingress.host }}
|
- host: {{ $api.ingress.host }}
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /api/v1
|
- path: /api/v1
|
||||||
@@ -34,5 +35,5 @@ spec:
|
|||||||
service:
|
service:
|
||||||
name: checkmate-api
|
name: checkmate-api
|
||||||
port:
|
port:
|
||||||
number: {{ .Values.api.port }}
|
number: {{ $api.port }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
{{- $api := include "checkmate.api" . | fromYaml -}}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
@@ -6,4 +7,4 @@ spec:
|
|||||||
selector:
|
selector:
|
||||||
app: checkmate-api
|
app: checkmate-api
|
||||||
ports:
|
ports:
|
||||||
- port: {{ .Values.api.port }}
|
- port: {{ $api.port }}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
{{- $api := include "checkmate.api" . | fromYaml -}}
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
@@ -28,7 +29,7 @@ spec:
|
|||||||
- containerPort: {{ .Values.client.port }}
|
- containerPort: {{ .Values.client.port }}
|
||||||
env:
|
env:
|
||||||
- name: UPTIME_APP_API_BASE_URL
|
- name: UPTIME_APP_API_BASE_URL
|
||||||
value: "{{ .Values.api.protocol }}://{{ .Values.api.ingress.host }}/api/v1"
|
value: "{{ $api.protocol }}://{{ $api.ingress.host }}/api/v1"
|
||||||
- name: UPTIME_APP_CLIENT_HOST
|
- name: UPTIME_APP_CLIENT_HOST
|
||||||
value: "{{ .Values.client.protocol }}://{{ .Values.client.ingress.host }}"
|
value: "{{ .Values.client.protocol }}://{{ .Values.client.ingress.host }}"
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
|
{{- $api := include "checkmate.api" . | fromYaml -}}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: checkmate-client-nginx-cm
|
name: checkmate-client-nginx-cm
|
||||||
data:
|
data:
|
||||||
@@ -22,7 +23,7 @@ data:
|
|||||||
}
|
}
|
||||||
|
|
||||||
# location /api/ {
|
# location /api/ {
|
||||||
# proxy_pass http://{{ .Values.api.ingress.host }}:5000/api/;
|
# proxy_pass http://{{ $api.ingress.host }}:5000/api/;
|
||||||
# proxy_http_version 1.1;
|
# proxy_http_version 1.1;
|
||||||
# proxy_set_header Host $host;
|
# proxy_set_header Host $host;
|
||||||
# proxy_set_header X-Real-IP $remote_addr;
|
# proxy_set_header X-Real-IP $remote_addr;
|
||||||
@@ -31,7 +32,7 @@ data:
|
|||||||
# }
|
# }
|
||||||
|
|
||||||
location /api-docs/ {
|
location /api-docs/ {
|
||||||
proxy_pass http://{{ .Values.api.ingress.host }}:5000/api-docs/;
|
proxy_pass http://{{ $api.ingress.host }}:5000/api-docs/;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
|
{{- $api := include "checkmate.api" . | fromYaml -}}
|
||||||
{{- if eq .Values.client.ingress.host "change_me" }}
|
{{- if eq .Values.client.ingress.host "change_me" }}
|
||||||
{{- fail "client.ingress.host must be overridden and not set to 'change_me'" }}
|
{{- fail "client.ingress.host must be overridden and not set to 'change_me'" }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if eq .Values.api.ingress.host "change_me" }}
|
{{- if eq $api.ingress.host "change_me" }}
|
||||||
{{- fail "api.ingress.host must be overridden and not set to 'change_me'" }}
|
{{- fail "api.ingress.host (or legacy server.ingress.host) must be overridden and not set to 'change_me'" }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- $apiProtocol := .Values.api.protocol }}
|
{{- $apiProtocol := $api.protocol }}
|
||||||
{{- if not (or (eq $apiProtocol "http") (eq $apiProtocol "https")) }}
|
{{- if not (or (eq $apiProtocol "http") (eq $apiProtocol "https")) }}
|
||||||
{{- fail "api.protocol must be either 'http' or 'https'" }}
|
{{- fail "api.protocol must be either 'http' or 'https'" }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -21,7 +22,7 @@
|
|||||||
{{- fail "client.ingress.tls.enabled is true but client.protocol is not 'https'. Set client.protocol: https to avoid mixed content." }}
|
{{- fail "client.ingress.tls.enabled is true but client.protocol is not 'https'. Set client.protocol: https to avoid mixed content." }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if and .Values.api.ingress.tls.enabled (ne $apiProtocol "https") }}
|
{{- if and $api.ingress.tls.enabled (ne $apiProtocol "https") }}
|
||||||
{{- fail "api.ingress.tls.enabled is true but api.protocol is not 'https'. Set api.protocol: https to ensure correct API base URL." }}
|
{{- fail "api.ingress.tls.enabled is true but api.protocol is not 'https'. Set api.protocol: https to ensure correct API base URL." }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
@@ -32,7 +33,7 @@
|
|||||||
|
|
||||||
{{/* Fail early if TLS enabled without cert-manager annotations (cluster-issuer or issuer) */}}
|
{{/* Fail early if TLS enabled without cert-manager annotations (cluster-issuer or issuer) */}}
|
||||||
{{- $cAnn := .Values.client.ingress.annotations | default dict }}
|
{{- $cAnn := .Values.client.ingress.annotations | default dict }}
|
||||||
{{- $aAnn := .Values.api.ingress.annotations | default dict }}
|
{{- $aAnn := $api.ingress.annotations | default dict }}
|
||||||
|
|
||||||
{{- $clientHasIssuer := or (hasKey $cAnn "cert-manager.io/cluster-issuer") (hasKey $cAnn "cert-manager.io/issuer") }}
|
{{- $clientHasIssuer := or (hasKey $cAnn "cert-manager.io/cluster-issuer") (hasKey $cAnn "cert-manager.io/issuer") }}
|
||||||
{{- $apiHasIssuer := or (hasKey $aAnn "cert-manager.io/cluster-issuer") (hasKey $aAnn "cert-manager.io/issuer") }}
|
{{- $apiHasIssuer := or (hasKey $aAnn "cert-manager.io/cluster-issuer") (hasKey $aAnn "cert-manager.io/issuer") }}
|
||||||
@@ -41,7 +42,7 @@
|
|||||||
{{- fail "client.ingress.tls.enabled is true but no cert-manager issuer annotation found. Add 'cert-manager.io/cluster-issuer' or 'cert-manager.io/issuer'." }}
|
{{- fail "client.ingress.tls.enabled is true but no cert-manager issuer annotation found. Add 'cert-manager.io/cluster-issuer' or 'cert-manager.io/issuer'." }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if and .Values.api.ingress.tls.enabled (not $apiHasIssuer) }}
|
{{- if and $api.ingress.tls.enabled (not $apiHasIssuer) }}
|
||||||
{{- fail "api.ingress.tls.enabled is true but no cert-manager issuer annotation found. Add 'cert-manager.io/cluster-issuer' or 'cert-manager.io/issuer'." }}
|
{{- fail "api.ingress.tls.enabled is true but no cert-manager issuer annotation found. Add 'cert-manager.io/cluster-issuer' or 'cert-manager.io/issuer'." }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
{{- $api := include "checkmate.api" . | fromYaml -}}
|
||||||
{{- if .Values.worker.enabled }}
|
{{- if .Values.worker.enabled }}
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
@@ -26,8 +27,8 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
containers:
|
containers:
|
||||||
- name: worker
|
- name: worker
|
||||||
image: {{ .Values.worker.image | default .Values.api.image }}
|
image: {{ .Values.worker.image | default $api.image }}
|
||||||
imagePullPolicy: {{ .Values.worker.imagePullPolicy | default .Values.api.imagePullPolicy }}
|
imagePullPolicy: {{ .Values.worker.imagePullPolicy | default $api.imagePullPolicy }}
|
||||||
ports:
|
ports:
|
||||||
- name: health
|
- name: health
|
||||||
containerPort: {{ .Values.worker.healthPort }}
|
containerPort: {{ .Values.worker.healthPort }}
|
||||||
|
|||||||
Reference in new issue
Block a user