# Deployment description apiVersion: apps/v1 kind: Deployment metadata: name: willken-deployment namespace: prod-environment labels: app: willken-prod spec: strategy: type: Recreate replicas: 1 selector: matchLabels: app: willken-prod template: metadata: labels: app: willken-prod spec: securityContext: runAsUser: 1000 runAsGroup: 1000 fsGroup: 1000 containers: - name: willken image: packages.semapp.lan:5000/willken:develop imagePullPolicy: Always resources: requests: memory: "128Mi" cpu: "100m" limits: memory: "256Mi" cpu: "4" ports: - containerPort: 8000 name: willken-http protocol: TCP envFrom: - configMapRef: name: willken-prod-config-prod volumeMounts: - mountPath: /opt/willken/public/media name: willken-pv-prod volumes: - name: willken-pv-prod persistentVolumeClaim: claimName: willken-pvc-prod --- apiVersion: v1 kind: ConfigMap metadata: namespace: prod-environment name: willken-prod-config-prod labels: app: willken-prod data: DJANGO_DB_ENGINE: "django.db.backends.postgresql_psycopg2" DJANGO_DB_NAME: "willken-prod" DJANGO_DB_USER: "willken-prod" DJANGO_DB_PASSWORD: "r5(f^F9o(!i8Z;SC$[" DJANGO_DB_HOST: "psql.semprod.local" DJANGO_DB_PORT: "5432" ALLOWED_HOSTS: '["*"]' --- # Persistent Volume Claim description apiVersion: v1 kind: PersistentVolumeClaim metadata: name: willken-pvc-prod namespace: prod-environment labels: app: willken-prod spec: storageClassName: longhorn accessModes: - ReadWriteOnce resources: requests: storage: 1Gi --- # willken Service apiVersion: v1 kind: Service metadata: name: willken namespace: prod-environment spec: selector: app: willken-prod ports: - name: willken-http port: 8000 targetPort: willken-http type: NodePort --- # Ingress description apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: willken-prod-ingress namespace: prod-environment annotations: kubernetes.io/ingress.class: "traefik" spec: rules: - host: willken-prod.k8s.semprod.local http: paths: - path: / pathType: ImplementationSpecific backend: service: name: willken port: number: 8000