Files
feedc0de bd9b087ec1
Validate, publish and promote Helm chart / Publish and promote chart (push) Successful in 26s
Validate, publish and promote Helm chart / Validate chart (push) Successful in 27s
Publish Anubis as an application-owned Helm chart
2026-10-18 21:23:18 +02:00

104 lines
3.3 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "anubis.fullname" . }}
labels:
{{- include "anubis.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "anubis.selectorLabels" . | nindent 6 }}
template:
metadata:
annotations:
checksum/policy: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "anubis.selectorLabels" . | nindent 8 }}
spec:
automountServiceAccountToken: false
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: anubis
image: "{{ .Values.image.repository }}:{{ default .Chart.AppVersion .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: BIND
value: :8080
- name: METRICS_BIND
value: :9090
- name: TARGET
value: {{ .Values.target | quote }}
{{- if .Values.publicUrl }}
- name: PUBLIC_URL
value: {{ .Values.publicUrl | quote }}
{{- end }}
{{- if .Values.redirectDomains }}
- name: REDIRECT_DOMAINS
value: {{ .Values.redirectDomains | quote }}
{{- end }}
{{- if .Values.cookieDomain }}
- name: COOKIE_DOMAIN
value: {{ .Values.cookieDomain | quote }}
{{- end }}
- name: COOKIE_EXPIRATION_TIME
value: {{ .Values.cookieExpirationTime | quote }}
- name: POLICY_FNAME
value: /etc/anubis/botPolicies.yaml
- name: SERVE_ROBOTS_TXT
value: {{ .Values.serveRobotsTxt | quote }}
- name: ED25519_PRIVATE_KEY_HEX
valueFrom:
secretKeyRef:
name: {{ .Values.signingSecret.name }}
key: {{ .Values.signingSecret.key }}
ports:
- name: http
containerPort: 8080
protocol: TCP
- name: metrics
containerPort: 9090
protocol: TCP
readinessProbe:
exec:
command: [anubis, --healthcheck]
initialDelaySeconds: 2
periodSeconds: 10
timeoutSeconds: 3
livenessProbe:
exec:
command: [anubis, --healthcheck]
initialDelaySeconds: 10
periodSeconds: 30
timeoutSeconds: 3
resources:
{{- toYaml .Values.resources | nindent 12 }}
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: [ALL]
readOnlyRootFilesystem: true
runAsGroup: 1000
runAsNonRoot: true
runAsUser: 1000
seccompProfile:
type: RuntimeDefault
volumeMounts:
- name: policy
mountPath: /etc/anubis
readOnly: true
- name: tmp
mountPath: /tmp
volumes:
- name: policy
configMap:
name: {{ include "anubis.policyConfigMap" . }}
- name: tmp
emptyDir: {}