26 changed files with 463 additions and 133 deletions
@ -0,0 +1,119 @@ |
|||||
|
# Deployment description |
||||
|
apiVersion: apps/v1 |
||||
|
kind: Deployment |
||||
|
metadata: |
||||
|
name: willken-deployment |
||||
|
namespace: dev-environment |
||||
|
labels: |
||||
|
app: willken-dev |
||||
|
spec: |
||||
|
strategy: |
||||
|
type: Recreate |
||||
|
replicas: 1 |
||||
|
selector: |
||||
|
matchLabels: |
||||
|
app: willken-dev |
||||
|
template: |
||||
|
metadata: |
||||
|
labels: |
||||
|
app: willken-dev |
||||
|
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-dev-config-dev |
||||
|
volumeMounts: |
||||
|
- mountPath: /opt/willken/public/media |
||||
|
name: willken-pv-dev |
||||
|
volumes: |
||||
|
- name: willken-pv-dev |
||||
|
persistentVolumeClaim: |
||||
|
claimName: willken-pvc-dev |
||||
|
--- |
||||
|
apiVersion: v1 |
||||
|
kind: ConfigMap |
||||
|
metadata: |
||||
|
namespace: dev-environment |
||||
|
name: willken-dev-config-dev |
||||
|
labels: |
||||
|
app: willken-dev |
||||
|
data: |
||||
|
DJANGO_DB_ENGINE: "django.db.backends.postgresql_psycopg2" |
||||
|
DJANGO_DB_NAME: "willken-dev" |
||||
|
DJANGO_DB_USER: "willken-dev" |
||||
|
DJANGO_DB_PASSWORD: "]'45Xc]A(ky9L*!{@R" |
||||
|
DJANGO_DB_HOST: "postgres-lb" |
||||
|
DJANGO_DB_PORT: "5432" |
||||
|
ALLOWED_HOSTS: '["*"]' |
||||
|
|
||||
|
--- |
||||
|
# Persistent Volume Claim description |
||||
|
apiVersion: v1 |
||||
|
kind: PersistentVolumeClaim |
||||
|
metadata: |
||||
|
name: willken-pvc-dev |
||||
|
namespace: dev-environment |
||||
|
labels: |
||||
|
app: willken-dev |
||||
|
spec: |
||||
|
storageClassName: longhorn |
||||
|
accessModes: |
||||
|
- ReadWriteOnce |
||||
|
resources: |
||||
|
requests: |
||||
|
storage: 1Gi |
||||
|
--- |
||||
|
# willken Service |
||||
|
apiVersion: v1 |
||||
|
kind: Service |
||||
|
metadata: |
||||
|
name: willken |
||||
|
namespace: dev-environment |
||||
|
spec: |
||||
|
selector: |
||||
|
app: willken-dev |
||||
|
ports: |
||||
|
- name: willken-http |
||||
|
port: 8000 |
||||
|
targetPort: willken-http |
||||
|
type: NodePort |
||||
|
--- |
||||
|
|
||||
|
# Ingress description |
||||
|
apiVersion: networking.k8s.io/v1 |
||||
|
kind: Ingress |
||||
|
metadata: |
||||
|
name: willken-dev-ingress |
||||
|
namespace: dev-environment |
||||
|
annotations: |
||||
|
kubernetes.io/ingress.class: "traefik" |
||||
|
spec: |
||||
|
rules: |
||||
|
- host: willken-dev.k3s.semapp.lan |
||||
|
http: |
||||
|
paths: |
||||
|
- path: / |
||||
|
pathType: ImplementationSpecific |
||||
|
backend: |
||||
|
service: |
||||
|
name: willken |
||||
|
port: |
||||
|
number: 8000 |
||||
@ -0,0 +1,129 @@ |
|||||
|
# 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 |
||||
|
- host: gasthaus-willken.de |
||||
|
http: |
||||
|
paths: |
||||
|
- path: / |
||||
|
pathType: ImplementationSpecific |
||||
|
backend: |
||||
|
service: |
||||
|
name: willken |
||||
|
port: |
||||
|
number: 8000 |
||||
Loading…
Reference in new issue