[INIT-001] Initial project setup with Clean Architecture (feat)
Some checks failed
CD - Build & Deploy / build-and-push (push) Has been cancelled
CD - Build & Deploy / package-helm (push) Has been cancelled
CD - Build & Deploy / deploy-staging (push) Has been cancelled
CD - Build & Deploy / deploy-production (push) Has been cancelled
CD - Build & Deploy / release (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
CI / security (push) Has been cancelled

- Implemented Clean Architecture with Domain, Application, Infrastructure, Presentation layers
- Added comprehensive project structure following SOLID principles
- Created Kubernetes deployment with Helm charts (HPA, PDB, NetworkPolicy)
- Configured ArgoCD for automated deployment (production + staging)
- Implemented CI/CD pipeline with GitHub Actions
- Added comprehensive documentation (handbook, architecture, coding standards)
- Configured PostgreSQL, Redis, Celery for backend services
- Created modern landing page with Persian fonts (Vazirmatn)
- Added Docker multi-stage build for production
- Configured development tools (pytest, black, flake8, mypy, isort)
- Added pre-commit hooks for code quality
- Implemented Makefile for common operations
This commit is contained in:
Ehsan.Asadi
2025-12-26 15:52:50 +03:30
commit 8a924f6091
135 changed files with 8637 additions and 0 deletions

24
helm/.helmignore Normal file
View File

@@ -0,0 +1,24 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

View File

@@ -0,0 +1,24 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

View File

@@ -0,0 +1,18 @@
apiVersion: v2
name: peikarband
description: Peikarband Cloud Services Platform - Landing Page
type: application
version: 0.1.0
appVersion: "0.1.0"
keywords:
- cloud
- hosting
- devops
- wordpress
maintainers:
- name: Peikarband Team
email: support@peikarband.ir
sources:
- https://github.com/peikarband/landing
icon: https://peikarband.ir/logo.png

164
helm/peikarband/README.md Normal file
View File

@@ -0,0 +1,164 @@
# Peikarband Helm Chart
Official Helm chart برای deploy کردن Peikarband Cloud Platform.
## نصب
### اضافه کردن Repository
```bash
helm repo add peikarband https://peikarband.github.io/charts
helm repo update
```
### نصب Chart
```bash
helm install peikarband peikarband/peikarband \
--namespace production \
--create-namespace \
--set image.tag=0.1.0
```
## پیکربندی
### مهم‌ترین Values
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| `replicaCount` | int | `2` | تعداد replicas |
| `image.repository` | string | `registry.example.com/peikarband/landing` | Docker image repository |
| `image.tag` | string | `latest` | Image tag |
| `image.pullPolicy` | string | `IfNotPresent` | Image pull policy |
| `resources.limits.cpu` | string | `1000m` | CPU limit |
| `resources.limits.memory` | string | `1Gi` | Memory limit |
| `autoscaling.enabled` | bool | `true` | فعال کردن HPA |
| `autoscaling.minReplicas` | int | `2` | حداقل replicas |
| `autoscaling.maxReplicas` | int | `10` | حداکثر replicas |
| `ingress.enabled` | bool | `true` | فعال کردن Ingress |
| `ingress.hosts[0].host` | string | `peikarband.ir` | Domain |
### مثال‌های استفاده
#### نصب با مقادیر سفارشی
```bash
helm install peikarband peikarband/peikarband \
--set image.tag=0.2.0 \
--set replicaCount=3 \
--set resources.limits.cpu=2000m \
--set ingress.hosts[0].host=example.com
```
#### استفاده از values file
```bash
helm install peikarband peikarband/peikarband \
-f my-values.yaml
```
#### Upgrade
```bash
helm upgrade peikarband peikarband/peikarband \
--set image.tag=0.3.0 \
--reuse-values
```
## Requirements
- Kubernetes 1.24+
- Helm 3.10+
- PostgreSQL (external یا in-cluster)
- Redis (external یا in-cluster)
## Values فایل‌ها
این chart شامل چند values file است:
- `values.yaml` - مقادیر پیش‌فرض
- `values-production.yaml` - تنظیمات production
## Components
این Chart شامل موارد زیر است:
- **Deployment**: اجرای application
- **Service**: ClusterIP service برای internal access
- **Ingress**: External access با TLS
- **ConfigMap**: تنظیمات application
- **ServiceAccount**: Kubernetes service account
- **HPA**: Horizontal Pod Autoscaler
- **PDB**: Pod Disruption Budget
- **NetworkPolicy**: محدودیت‌های network
## پیش‌نیازها
### ساخت Secrets
```bash
kubectl create secret generic peikarband-secrets \
--from-literal=db-username=USERNAME \
--from-literal=db-password=PASSWORD \
--from-literal=redis-password=REDIS_PASS \
-n production
```
### cert-manager (برای TLS)
```bash
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.13.0/cert-manager.yaml
```
## Troubleshooting
### مشاهده وضعیت
```bash
helm status peikarband -n production
kubectl get all -n production
kubectl get pods -l app.kubernetes.io/name=peikarband -n production
```
### مشاهده Logs
```bash
kubectl logs -f deployment/peikarband -n production
```
### Rollback
```bash
helm rollback peikarband -n production
```
## توسعه
### Lint
```bash
helm lint .
```
### Template
```bash
helm template peikarband . --debug
```
### Package
```bash
helm package .
```
## لایسنس
MIT
## پشتیبانی
- Email: support@peikarband.ir
- Website: https://peikarband.ir
- Docs: https://docs.peikarband.ir

View File

@@ -0,0 +1,43 @@
Thank you for installing {{ .Chart.Name }}.
Your release is named {{ .Release.Name }}.
To learn more about the release, try:
$ helm status {{ .Release.Name }}
$ helm get all {{ .Release.Name }}
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
{{- range .paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "peikarband.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "peikarband.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "peikarband.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.service.frontend.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "peikarband.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
{{- end }}
2. Check the deployment status:
kubectl get deployment {{ include "peikarband.fullname" . }} -n {{ .Release.Namespace }}
3. View logs:
kubectl logs -f deployment/{{ include "peikarband.fullname" . }} -n {{ .Release.Namespace }}
4. Scale the deployment:
kubectl scale deployment {{ include "peikarband.fullname" . }} --replicas=3 -n {{ .Release.Namespace }}
Peikarband - Cloud Services Platform

View File

@@ -0,0 +1,61 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "peikarband.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name.
*/}}
{{- define "peikarband.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "peikarband.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "peikarband.labels" -}}
helm.sh/chart: {{ include "peikarband.chart" . }}
{{ include "peikarband.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "peikarband.selectorLabels" -}}
app.kubernetes.io/name: {{ include "peikarband.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "peikarband.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "peikarband.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "peikarband.fullname" . }}
labels:
{{- include "peikarband.labels" . | nindent 4 }}
data:
{{- toYaml .Values.configMap.data | nindent 2 }}

View File

@@ -0,0 +1,99 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "peikarband.fullname" . }}
labels:
{{- include "peikarband.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "peikarband.selectorLabels" . | nindent 6 }}
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "peikarband.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "peikarband.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: backend
containerPort: {{ .Values.service.backend.targetPort }}
protocol: TCP
- name: frontend
containerPort: {{ .Values.service.frontend.targetPort }}
protocol: TCP
livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12 }}
readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 12 }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
env:
{{- toYaml .Values.env | nindent 12 }}
{{- if .Values.postgresql.enabled }}
- name: DATABASE_HOST
value: {{ .Values.postgresql.external.host }}
- name: DATABASE_PORT
value: {{ .Values.postgresql.external.port | quote }}
- name: DATABASE_NAME
value: {{ .Values.postgresql.external.database }}
- name: DATABASE_USER
valueFrom:
secretKeyRef:
name: {{ .Values.postgresql.external.usernameSecret.name }}
key: {{ .Values.postgresql.external.usernameSecret.key }}
- name: DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.postgresql.external.passwordSecret.name }}
key: {{ .Values.postgresql.external.passwordSecret.key }}
{{- end }}
{{- if .Values.redis.enabled }}
- name: REDIS_HOST
value: {{ .Values.redis.external.host }}
- name: REDIS_PORT
value: {{ .Values.redis.external.port | quote }}
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.redis.external.passwordSecret.name }}
key: {{ .Values.redis.external.passwordSecret.key }}
{{- end }}
envFrom:
- configMapRef:
name: {{ include "peikarband.fullname" . }}
{{- with .Values.envFrom }}
{{- toYaml . | nindent 10 }}
{{- 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 }}

View File

@@ -0,0 +1,33 @@
{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "peikarband.fullname" . }}
labels:
{{- include "peikarband.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "peikarband.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,42 @@
{{- if .Values.ingress.enabled -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "peikarband.fullname" . }}
labels:
{{- include "peikarband.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.className }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
pathType: {{ .pathType }}
backend:
service:
name: {{ include "peikarband.fullname" $ }}
port:
number: {{ $.Values.service.frontend.port }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,19 @@
{{- if .Values.networkPolicy.enabled }}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ include "peikarband.fullname" . }}
labels:
{{- include "peikarband.labels" . | nindent 4 }}
spec:
podSelector:
matchLabels:
{{- include "peikarband.selectorLabels" . | nindent 6 }}
policyTypes:
{{- toYaml .Values.networkPolicy.policyTypes | nindent 4 }}
ingress:
{{- toYaml .Values.networkPolicy.ingress | nindent 4 }}
egress:
{{- toYaml .Values.networkPolicy.egress | nindent 4 }}
{{- end }}

View File

@@ -0,0 +1,14 @@
{{- if .Values.podDisruptionBudget.enabled }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "peikarband.fullname" . }}
labels:
{{- include "peikarband.labels" . | nindent 4 }}
spec:
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
selector:
matchLabels:
{{- include "peikarband.selectorLabels" . | nindent 6 }}
{{- end }}

View File

@@ -0,0 +1,20 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "peikarband.fullname" . }}
labels:
{{- include "peikarband.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.backend.port }}
targetPort: backend
protocol: TCP
name: backend
- port: {{ .Values.service.frontend.port }}
targetPort: frontend
protocol: TCP
name: frontend
selector:
{{- include "peikarband.selectorLabels" . | nindent 4 }}

View File

@@ -0,0 +1,13 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "peikarband.serviceAccountName" . }}
labels:
{{- include "peikarband.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,93 @@
# Production-specific values for peikarband
# This file overrides default values.yaml for production
replicaCount: 3
image:
pullPolicy: Always
podAnnotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8000"
prometheus.io/path: "/metrics"
resources:
limits:
cpu: 2000m
memory: 2Gi
requests:
cpu: 500m
memory: 1Gi
autoscaling:
enabled: true
minReplicas: 3
maxReplicas: 20
targetCPUUtilizationPercentage: 60
targetMemoryUtilizationPercentage: 70
ingress:
enabled: true
className: "nginx"
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/rate-limit: "100"
nginx.ingress.kubernetes.io/proxy-body-size: "10m"
hosts:
- host: peikarband.ir
paths:
- path: /
pathType: Prefix
- host: www.peikarband.ir
paths:
- path: /
pathType: Prefix
tls:
- secretName: peikarband-tls
hosts:
- peikarband.ir
- www.peikarband.ir
postgresql:
enabled: true
external:
host: "postgres-prod.default.svc.cluster.local"
port: "5432"
database: "peikarband_prod"
usernameSecret:
name: "peikarband-prod-secrets"
key: "db-username"
passwordSecret:
name: "peikarband-prod-secrets"
key: "db-password"
redis:
enabled: true
external:
host: "redis-prod.default.svc.cluster.local"
port: "6379"
passwordSecret:
name: "peikarband-prod-secrets"
key: "redis-password"
configMap:
data:
APP_NAME: "peikarband"
LOG_LEVEL: "warning"
ENVIRONMENT: "production"
podDisruptionBudget:
enabled: true
minAvailable: 2
networkPolicy:
enabled: true
monitoring:
serviceMonitor:
enabled: true
interval: 30s
scrapeTimeout: 10s

View File

@@ -0,0 +1,63 @@
# Staging-specific values for peikarband
replicaCount: 1
image:
pullPolicy: Always
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 100m
memory: 256Mi
autoscaling:
enabled: false
ingress:
enabled: true
className: "nginx"
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-staging"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
hosts:
- host: staging.peikarband.ir
paths:
- path: /
pathType: Prefix
tls:
- secretName: peikarband-staging-tls
hosts:
- staging.peikarband.ir
postgresql:
enabled: true
external:
host: "postgres-staging.default.svc.cluster.local"
port: "5432"
database: "peikarband_staging"
redis:
enabled: true
external:
host: "redis-staging.default.svc.cluster.local"
port: "6379"
configMap:
data:
APP_NAME: "peikarband-staging"
LOG_LEVEL: "debug"
ENVIRONMENT: "staging"
podDisruptionBudget:
enabled: false
networkPolicy:
enabled: false
monitoring:
serviceMonitor:
enabled: false

201
helm/peikarband/values.yaml Normal file
View File

@@ -0,0 +1,201 @@
# Default values for peikarband
# This is a YAML-formatted file.
replicaCount: 2
image:
repository: registry.example.com/peikarband/landing
pullPolicy: IfNotPresent
tag: "latest"
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
create: true
annotations: {}
name: ""
podAnnotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8000"
prometheus.io/path: "/metrics"
podSecurityContext:
runAsNonRoot: true
runAsUser: 1000
fsGroup: 1000
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: false
service:
type: ClusterIP
backend:
port: 8000
targetPort: 8000
frontend:
port: 3000
targetPort: 3000
ingress:
enabled: true
className: "nginx"
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
hosts:
- host: peikarband.ir
paths:
- path: /
pathType: Prefix
- host: www.peikarband.ir
paths:
- path: /
pathType: Prefix
tls:
- secretName: peikarband-tls
hosts:
- peikarband.ir
- www.peikarband.ir
resources:
limits:
cpu: 1000m
memory: 1Gi
requests:
cpu: 250m
memory: 512Mi
autoscaling:
enabled: true
minReplicas: 2
maxReplicas: 10
targetCPUUtilizationPercentage: 70
targetMemoryUtilizationPercentage: 80
nodeSelector: {}
tolerations: []
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- peikarband
topologyKey: kubernetes.io/hostname
livenessProbe:
httpGet:
path: /ping
port: 8000
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
readinessProbe:
httpGet:
path: /ping
port: 8000
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 3
failureThreshold: 3
env:
- name: REFLEX_ENV
value: "production"
- name: PYTHONUNBUFFERED
value: "1"
envFrom: []
configMap:
data:
APP_NAME: "peikarband"
LOG_LEVEL: "info"
secretRef:
name: "peikarband-secrets"
postgresql:
enabled: false
external:
host: "postgres.default.svc.cluster.local"
port: "5432"
database: "peikarband"
usernameSecret:
name: "peikarband-secrets"
key: "db-username"
passwordSecret:
name: "peikarband-secrets"
key: "db-password"
redis:
enabled: false
external:
host: "redis.default.svc.cluster.local"
port: "6379"
passwordSecret:
name: "peikarband-secrets"
key: "redis-password"
persistence:
enabled: false
storageClass: ""
accessMode: ReadWriteOnce
size: 10Gi
podDisruptionBudget:
enabled: true
minAvailable: 1
networkPolicy:
enabled: true
policyTypes:
- Ingress
- Egress
ingress:
- from:
- namespaceSelector:
matchLabels:
name: ingress-nginx
ports:
- protocol: TCP
port: 8000
- protocol: TCP
port: 3000
egress:
- to:
- namespaceSelector: {}
ports:
- protocol: TCP
port: 5432 # PostgreSQL
- protocol: TCP
port: 6379 # Redis
- protocol: TCP
port: 443 # HTTPS
- protocol: TCP
port: 80 # HTTP
- protocol: UDP
port: 53 # DNS
monitoring:
serviceMonitor:
enabled: false
interval: 30s
scrapeTimeout: 10s