Add coulomb-social Helm chart and deploy targets
Chart mirrors vergabe-teilnahme Django probe/secret pattern. Non-secret values pin KeyCape OIDC and user-engine URL; env Secret holds secrets. Makefile: dry-run, deploy, ingress, status, logs.
This commit is contained in:
parent
dd1bd6cccc
commit
32610e9090
9 changed files with 348 additions and 1 deletions
18
charts/coulomb-social/Chart.yaml
Normal file
18
charts/coulomb-social/Chart.yaml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
apiVersion: v2
|
||||
name: coulomb-social
|
||||
description: |
|
||||
coulomb.social — co-creation platform (NetKingdom identity shell).
|
||||
Standalone Django app; content migration deferred.
|
||||
type: application
|
||||
version: 0.1.0
|
||||
appVersion: "0.1.0"
|
||||
keywords:
|
||||
- django
|
||||
- coulomb
|
||||
- social
|
||||
- railiance
|
||||
home: https://forgejo.coulomb.social/coulomb/coulomb-social
|
||||
sources:
|
||||
- https://forgejo.coulomb.social/coulomb/coulomb-social
|
||||
maintainers:
|
||||
- name: railiance-apps
|
||||
25
charts/coulomb-social/templates/_helpers.tpl
Normal file
25
charts/coulomb-social/templates/_helpers.tpl
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{{- define "coulomb.fullname" -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- printf "%s" $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "coulomb.labels" -}}
|
||||
app.kubernetes.io/name: {{ include "coulomb.fullname" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
app.kubernetes.io/part-of: railiance-apps
|
||||
helm.sh/chart: {{ printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "coulomb.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "coulomb.fullname" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "coulomb.image" -}}
|
||||
{{- if not .Values.image.tag -}}
|
||||
{{- fail "image.tag is required — pin it in helm/coulomb-social-values.yaml" -}}
|
||||
{{- end -}}
|
||||
{{- printf "%s:%s" .Values.image.repository .Values.image.tag -}}
|
||||
{{- end -}}
|
||||
81
charts/coulomb-social/templates/deployment.yaml
Normal file
81
charts/coulomb-social/templates/deployment.yaml
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "coulomb.fullname" . }}
|
||||
labels: {{- include "coulomb.labels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
selector:
|
||||
matchLabels: {{- include "coulomb.selectorLabels" . | nindent 6 }}
|
||||
strategy:
|
||||
type: RollingUpdate
|
||||
rollingUpdate:
|
||||
maxSurge: 1
|
||||
maxUnavailable: 0
|
||||
template:
|
||||
metadata:
|
||||
labels: {{- include "coulomb.selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
containers:
|
||||
- name: app
|
||||
image: {{ include "coulomb.image" . | quote }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
securityContext: {{- toYaml .Values.securityContext | nindent 12 }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.service.targetPort }}
|
||||
protocol: TCP
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: {{ .Values.envSecretName | quote }}
|
||||
env:
|
||||
{{- range $k, $v := .Values.env }}
|
||||
- name: {{ $k }}
|
||||
value: {{ $v | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.probes.enabled }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: {{ .Values.probes.path }}
|
||||
port: {{ .Values.probes.port }}
|
||||
httpHeaders:
|
||||
- name: Host
|
||||
value: {{ .Values.probes.hostHeader | quote }}
|
||||
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
|
||||
failureThreshold: {{ .Values.probes.readiness.failureThreshold }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: {{ .Values.probes.path }}
|
||||
port: {{ .Values.probes.port }}
|
||||
httpHeaders:
|
||||
- name: Host
|
||||
value: {{ .Values.probes.hostHeader | quote }}
|
||||
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.probes.liveness.timeoutSeconds }}
|
||||
failureThreshold: {{ .Values.probes.liveness.failureThreshold }}
|
||||
{{- end }}
|
||||
resources: {{- toYaml .Values.resources | nindent 12 }}
|
||||
{{- if .Values.persistence.media.enabled }}
|
||||
volumeMounts:
|
||||
- name: media
|
||||
mountPath: /app/media
|
||||
{{- end }}
|
||||
{{- if .Values.persistence.media.enabled }}
|
||||
volumes:
|
||||
- name: media
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ include "coulomb.fullname" . }}-media
|
||||
{{- end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector: {{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity: {{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations: {{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
27
charts/coulomb-social/templates/service.yaml
Normal file
27
charts/coulomb-social/templates/service.yaml
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "coulomb.fullname" . }}
|
||||
labels: {{- include "coulomb.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
ports:
|
||||
- port: {{ .Values.service.port }}
|
||||
targetPort: {{ .Values.service.targetPort }}
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector: {{- include "coulomb.selectorLabels" . | nindent 4 }}
|
||||
{{- if .Values.persistence.media.enabled }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ include "coulomb.fullname" . }}-media
|
||||
labels: {{- include "coulomb.labels" . | nindent 4 }}
|
||||
spec:
|
||||
storageClassName: {{ .Values.persistence.media.storageClass }}
|
||||
accessModes: [{{ .Values.persistence.media.accessMode }}]
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.media.size }}
|
||||
{{- end }}
|
||||
73
charts/coulomb-social/values.yaml
Normal file
73
charts/coulomb-social/values.yaml
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
image:
|
||||
repository: forgejo.coulomb.social/coulomb/coulomb-social
|
||||
tag: ""
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 80
|
||||
targetPort: 8000
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 1Gi
|
||||
|
||||
# Secrets (SECRET_KEY, DATABASE_URL, OIDC_*, USER_ENGINE_PROXY_SECRET, …)
|
||||
envSecretName: coulomb-social-env
|
||||
|
||||
env:
|
||||
DJANGO_SETTINGS_MODULE: coulomb_social.settings.prod
|
||||
ALLOWED_HOSTS: coulomb.social,localhost
|
||||
CSRF_TRUSTED_ORIGINS: https://coulomb.social
|
||||
DEFAULT_TENANT_ID: "tenant:coulomb"
|
||||
OIDC_ENABLED: "true"
|
||||
OIDC_ISSUER: https://kc.coulomb.social
|
||||
OIDC_CLIENT_ID: coulomb-social
|
||||
OIDC_REDIRECT_URI: https://coulomb.social/auth/callback/
|
||||
OIDC_SCOPES: "openid profile email groups"
|
||||
USER_ENGINE_APPLICATION_ID: coulomb-social
|
||||
USER_ENGINE_EXPECTED_AUDIENCE: user-engine-portal
|
||||
# USER_ENGINE_BASE_URL set via secret or here when stable
|
||||
USER_ENGINE_BASE_URL: https://users.92-205-62-239.nip.io
|
||||
|
||||
probes:
|
||||
enabled: true
|
||||
path: /healthz
|
||||
port: 8000
|
||||
hostHeader: coulomb.social
|
||||
liveness:
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
readiness:
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
|
||||
persistence:
|
||||
media:
|
||||
enabled: false
|
||||
|
||||
podSecurityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 10001
|
||||
runAsGroup: 10001
|
||||
fsGroup: 10001
|
||||
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
readOnlyRootFilesystem: false
|
||||
capabilities:
|
||||
drop: ["ALL"]
|
||||
|
||||
nodeSelector: {}
|
||||
tolerations: []
|
||||
affinity: {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue