5 Commits
Author SHA1 Message Date
ahp 12ecbf991e release v0.3.8: chart metadata + image tags
build-and-push / build (push) Successful in 28s
- Chart 0.2.3 -> 0.2.4, appVersion 0.2.1 -> 0.3.7 (metadata labels only;
  pod templates use selectorLabels, no statefulset churn)
- values-apollo image tags 0.3.7 -> 0.3.8 (backend+frontend roll once)
2026-10-19 00:49:16 +03:30
ahp 951610cda2 chart: add backend ServiceMonitor (token-auth /metrics, off by default)
- /metrics is bearer-protected via METRICS_TOKEN; the endpoint carries
  authorization.credentials (pargar-app/metrics-token) so Prometheus
  scrapes it the same way the live probe does.
- disabled by default: plain 'helm template' renders byte-identical;
  values-apollo enables it (enabled: true, interval 30s already present).
- kube-prometheus (ns infra) selects ServiceMonitors in all namespaces;
  its operator holds cluster-wide secret read to resolve the credential.
2026-10-19 00:47:54 +03:30
ahp 943897044a fix(chart): fail loudly instead of generating random secrets on lookup miss
build-and-push / build (push) Successful in 28s
randAlphaNum fallbacks silently minted new db/redis/rustfs passwords on
every cluster-less render (always the case under Argo CD's helm
template), overwriting live credentials. Fresh installs now get a clear
error demanding explicit values; helm upgrades are unaffected (lookup
preserves existing secrets).
2026-10-18 23:20:22 +03:30
ahp 53c8c8e94c fix(deploy): imagePullSecrets items must be objects ({name: ...}), not bare strings
build-and-push / build (push) Successful in 30s
Bare string items rendered an invalid Deployment spec (LocalObjectReference
is a struct) which made Argo CD's strategic-merge patch fail with
'cannot restore struct from: string' on both Deployments.
2026-10-18 22:59:04 +03:30
ahp c4c9f37bbc release: pull private Gitea packages via gitea-pull secret (ns pargar)
build-and-push / build (push) Successful in 29s
2026-10-18 22:14:50 +03:30
5 changed files with 50 additions and 8 deletions
+2 -2
View File
@@ -2,8 +2,8 @@ apiVersion: v2
name: pargar name: pargar
description: Pargar gated LMS - Go API, Next.js frontend, Postgres, Redis, S3-compatible storage description: Pargar gated LMS - Go API, Next.js frontend, Postgres, Redis, S3-compatible storage
type: application type: application
version: 0.2.3 version: 0.2.4
appVersion: "0.2.1" appVersion: "0.3.7"
keywords: keywords:
- lms - lms
- pargar - pargar
@@ -8,7 +8,10 @@
{{- else if and .Values.postgres.auth.password (not (hasPrefix "change-me" .Values.postgres.auth.password)) (ne .Values.postgres.auth.password "") }} {{- else if and .Values.postgres.auth.password (not (hasPrefix "change-me" .Values.postgres.auth.password)) (ne .Values.postgres.auth.password "") }}
{{- $pgPass = .Values.postgres.auth.password }} {{- $pgPass = .Values.postgres.auth.password }}
{{- else }} {{- else }}
{{- $pgPass = randAlphaNum 32 }} {{- /* Fail loudly instead of silently minting a random password: under
Argo CD (helm template) `lookup` is always empty, and a random
value would diverge from the live service on every render. */}}
{{- fail "postgres.auth.password must be set: no existing pargar-postgres secret was found and .Values.postgres.auth.password is empty or a change-me placeholder" }}
{{- end }} {{- end }}
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
@@ -30,7 +33,7 @@ stringData:
{{- else if and .Values.redis.auth.password (not (hasPrefix "change-me" .Values.redis.auth.password)) (ne .Values.redis.auth.password "") }} {{- else if and .Values.redis.auth.password (not (hasPrefix "change-me" .Values.redis.auth.password)) (ne .Values.redis.auth.password "") }}
{{- $rdPass = .Values.redis.auth.password }} {{- $rdPass = .Values.redis.auth.password }}
{{- else }} {{- else }}
{{- $rdPass = randAlphaNum 32 }} {{- fail "redis.auth.password must be set: no existing pargar-redis secret was found and .Values.redis.auth.password is empty or a change-me placeholder" }}
{{- end }} {{- end }}
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
@@ -56,7 +59,7 @@ stringData:
{{- else if and .Values.rustfs.auth.secretKey (not (hasPrefix "change-me" .Values.rustfs.auth.secretKey)) (ne .Values.rustfs.auth.secretKey "") }} {{- else if and .Values.rustfs.auth.secretKey (not (hasPrefix "change-me" .Values.rustfs.auth.secretKey)) (ne .Values.rustfs.auth.secretKey "") }}
{{- $secret = .Values.rustfs.auth.secretKey }} {{- $secret = .Values.rustfs.auth.secretKey }}
{{- else }} {{- else }}
{{- $secret = randAlphaNum 40 }} {{- fail "rustfs.auth.secretKey must be set: no existing pargar-rustfs secret was found and .Values.rustfs.auth.secretKey is empty or a change-me placeholder" }}
{{- end }} {{- end }}
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
@@ -0,0 +1,29 @@
{{- if .Values.backend.metrics.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "pargar.fullname" . }}-backend
labels:
{{- include "pargar.labels" . | nindent 4 }}
app.kubernetes.io/component: backend
spec:
selector:
matchLabels:
{{- include "pargar.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: backend
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
endpoints:
- port: http
path: /metrics
interval: {{ .Values.backend.metrics.serviceMonitor.interval | default "30s" }}
scheme: http
# /metrics answers 401 without it; Prometheus sends it as
# Authorization: Bearer <token>.
authorization:
type: Bearer
credentials:
name: {{ include "pargar.appSecretName" . }}
key: metrics-token
{{- end }}
+6 -3
View File
@@ -11,7 +11,7 @@ backend:
image: image:
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
repository: pargar-backend repository: pargar-backend
tag: 0.3.7 tag: 0.3.8
metrics: metrics:
serviceMonitor: serviceMonitor:
enabled: true enabled: true
@@ -41,7 +41,7 @@ frontend:
image: image:
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
repository: pargar-frontend repository: pargar-frontend
tag: 0.3.7 tag: 0.3.8
podDisruptionBudget: podDisruptionBudget:
enabled: false enabled: false
replicaCount: 2 replicaCount: 2
@@ -58,7 +58,10 @@ global:
# Images published by .gitea/workflows/build-and-push.yaml on tag push. # Images published by .gitea/workflows/build-and-push.yaml on tag push.
imageRegistry: src.panahifar.ir/ahp imageRegistry: src.panahifar.ir/ahp
publicUrl: https://pargar.panahifar.ir publicUrl: https://pargar.panahifar.ir
imagePullSecrets: [] # Gitea packages are private: kubelet pulls need secret `gitea-pull`
# (docker-registry secret for src.panahifar.ir, created in ns pargar).
imagePullSecrets:
- name: gitea-pull
ingress: ingress:
enabled: true enabled: true
tls: tls:
+7
View File
@@ -25,6 +25,13 @@ backend:
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
service: service:
port: 8080 port: 8080
metrics:
# Prometheus Operator ServiceMonitor. /metrics is bearer-protected by
# METRICS_TOKEN, so the endpoint carries authorization credentials
# (pargar-app secret) instead of scraping anonymously.
serviceMonitor:
enabled: false
interval: 30s
resources: resources:
requests: requests:
cpu: 50m cpu: 50m