diff --git a/01_onsite/02_qa/baseline/deployment.yaml b/01_onsite/02_qa/baseline/deployment.yaml deleted file mode 100644 index cc57d5e..0000000 --- a/01_onsite/02_qa/baseline/deployment.yaml +++ /dev/null @@ -1,212 +0,0 @@ -# Deployment description -apiVersion: apps/v1 -kind: Deployment -metadata: - name: baseline-deployment - namespace: qa-environment - labels: - app: baseline-qa -spec: - strategy: - type: Recreate - replicas: 1 - selector: - matchLabels: - app: baseline-qa - template: - metadata: - labels: - app: baseline-qa - spec: - containers: - - name: baseline-frontend - image: packages.semapp.lan:5000/baseline_frontend:qa1 - workingDir: /srv/web - resources: - requests: - memory: "256Mi" - cpu: "100m" - limits: - memory: "512Mi" - cpu: "4" - ports: - - containerPort: 8000 - name: baseline-http - protocol: TCP - volumeMounts: - - mountPath: /etc/nginx/conf.d - readOnly: true - name: baseline-qa-frontend-conf - env: - - name: KEYCLOAK_REALM - value: "baseline_test" - - name: KEYCLOAK_CLIENT - value: "baseline_qa" - - name: KEYCLOAK_TOKEN_VALIDITY - value: "600" - - name: KEYCLOAK_URL - value: "http://keycloak.semapp.lan/auth/" - imagePullPolicy: Always - - - name: baseline-backend - image: packages.semapp.lan:5000/baseline_backend:qa1 - workingDir: /opt/www - resources: - requests: - memory: "256Mi" - cpu: "100m" - limits: - memory: "512Mi" - cpu: "4" - ports: - - containerPort: 5000 - name: bl-bck-http - protocol: TCP - imagePullPolicy: Always - envFrom: - - configMapRef: - name: baseline-qa-backend-conf - volumes: - - name: baseline-qa-frontend-conf - configMap: - name: baseline-qa-frontend-conf - ---- -apiVersion: v1 -kind: ConfigMap -metadata: - namespace: qa-environment - name: baseline-qa-backend-conf - labels: - app: baseline-qa -data: - DB_CONNECTION: "pgsql" - DB_HOST: "dbpg11.semapp.lan" - DB_PORT: "5432" - DB_DATABASE: "baseline_k8s_qa" - DB_USERNAME: "baseline_qa" - DB_PASSWORD: "baseline_qa" - - APP_NAME: "Baseline" - APP_ENV: "development" - APP_KEY: "base64:14Vg4rilGKEk34XeqNR7ffg6GhFTzA7/z5T1aqy6JHw=" - APP_DEBUG: "true" - APP_URL: "http://baseline-qa.k3s.semapp.lan/" - - LOG_CHANNEL: "stack" - BROADCAST_DRIVER: "log" - CACHE_DRIVER: "file" - QUEUE_CONNECTION: "sync" - SESSION_DRIVER: "cookie" - SESSION_LIFETIME: "120" - - - SANCTUM_STATEFUL_DOMAINS: "baseline-qa.k3s.semapp.lan" - SESSION_DOMAIN: "baseline-qa.k3s.semapp.lan" - - THROTTLE_MAX_ATTEMPTS: "80" - - KEYCLOAK_URL: "http://keycloak.semapp.lan" - KEYCLOAK_PORT: "80" - KEYCLOAK_REALM: "baseline_test" - - REDIRECT_URL: "http://baseline-qa.k3s.semapp.lan/" - ---- -apiVersion: v1 -kind: ConfigMap -metadata: - namespace: qa-environment - name: baseline-qa-frontend-conf -data: - default.conf: | - upstream backend { - server baseline-backend-qa:5000; - } - - server { - listen 8000; - - access_log /var/log/nginx/access.log; - charset utf-8; - client_max_body_size 1G; - - location / { - root /srv/web; - add_header X-Frame-Options "SAMEORIGIN"; - index index.html index.htm; - try_files $uri $uri /index.html =404; - } - - location ~ ^/api { - proxy_pass http://backend; - proxy_redirect off; - - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - proxy_read_timeout 300s; - proxy_send_timeout 300s; - send_timeout 300s; - } - - error_page 404 =200 /index.html; - - add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; - - expires off; - open_file_cache off; - sendfile off; - } - ---- -# EFC Service -apiVersion: v1 -kind: Service -metadata: - name: baseline-frontend-qa - namespace: qa-environment -spec: - selector: - app: baseline-qa - ports: - - name: baseline-http - port: 8000 - targetPort: baseline-http - type: NodePort - ---- -# EFC backend -apiVersion: v1 -kind: Service -metadata: - name: baseline-backend-qa - namespace: qa-environment -spec: - selector: - app: baseline-qa - ports: - - name: bl-bck-http - port: 5000 - targetPort: bl-bck-http - type: NodePort ---- - -# Ingress description -apiVersion: networking.k8s.io/v1beta1 -kind: Ingress -metadata: - name: baseline-qa-ingress - namespace: qa-environment - annotations: - kubernetes.io/ingress.class: "traefik" -spec: - rules: - - host: baseline-qa.k3s.semapp.lan - http: - paths: - - path: / - backend: - serviceName: baseline-frontend-qa - servicePort: 8000 \ No newline at end of file