Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy releases/k8s-manifests c12c9cb #66

Merged
merged 3 commits into from May 14, 2024

Conversation

github-actions[bot]
Copy link

@github-actions github-actions bot commented May 9, 2024

kubectl diff reports that applying c12c9cb will change:

diff -uN /tmp/LIVE-3006534080/apps.v1.Deployment.balancer.backend /tmp/MERGED-2634587156/apps.v1.Deployment.balancer.backend
--- /tmp/LIVE-3006534080/apps.v1.Deployment.balancer.backend	2024-05-09 17:49:50.964039589 +0000
+++ /tmp/MERGED-2634587156/apps.v1.Deployment.balancer.backend	2024-05-09 17:49:50.968039581 +0000
@@ -1 +1,66 @@
-{}
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  labels:
+    app.kubernetes.io/component: backend
+  name: backend
+  namespace: balancer
+spec:
+  progressDeadlineSeconds: 600
+  replicas: 1
+  revisionHistoryLimit: 10
+  selector:
+    matchLabels:
+      app.kubernetes.io/component: backend
+  strategy:
+    rollingUpdate:
+      maxSurge: 25%
+      maxUnavailable: 25%
+    type: RollingUpdate
+  template:
+    metadata:
+      creationTimestamp: null
+      labels:
+        app.kubernetes.io/component: backend
+    spec:
+      containers:
+      - args:
+        - gunicorn
+        - balancer_backend.wsgi:application
+        - --bind
+        - 0.0.0.0:8000
+        env:
+        - name: SQL_HOST
+          value: db-service
+        - name: SQL_USER
+          valueFrom:
+            secretKeyRef:
+              key: POSTGRES_USER
+              name: postgresql
+        - name: SQL_DATABASE
+          valueFrom:
+            secretKeyRef:
+              key: POSTGRES_DB
+              name: postgresql
+        - name: SQL_PASSWORD
+          valueFrom:
+            secretKeyRef:
+              key: POSTGRES_PASSWORD
+              name: postgresql
+        envFrom:
+        - configMapRef:
+            name: backend-env
+        - secretRef:
+            name: backend
+        image: ghcr.io/codeforphilly/balancer-main/backend:latest
+        imagePullPolicy: Always
+        name: backend
+        ports:
+        - containerPort: 8000
+          protocol: TCP
+        terminationMessagePath: /dev/termination-log
+        terminationMessagePolicy: File
+      dnsPolicy: ClusterFirst
+      restartPolicy: Always
+      schedulerName: default-scheduler
+      terminationGracePeriodSeconds: 30
diff -uN /tmp/LIVE-3006534080/apps.v1.Deployment.balancer.frontend /tmp/MERGED-2634587156/apps.v1.Deployment.balancer.frontend
--- /tmp/LIVE-3006534080/apps.v1.Deployment.balancer.frontend	2024-05-09 17:49:50.964039589 +0000
+++ /tmp/MERGED-2634587156/apps.v1.Deployment.balancer.frontend	2024-05-09 17:49:50.972039573 +0000
@@ -1 +1,55 @@
-{}
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  labels:
+    app.kubernetes.io/component: frontend
+  name: frontend
+  namespace: balancer
+spec:
+  progressDeadlineSeconds: 600
+  replicas: 1
+  revisionHistoryLimit: 10
+  selector:
+    matchLabels:
+      app.kubernetes.io/component: frontend
+  strategy:
+    rollingUpdate:
+      maxSurge: 25%
+      maxUnavailable: 25%
+    type: RollingUpdate
+  template:
+    metadata:
+      annotations:
+        kompose.cmd: kompose convert -c -f docker-compose.prod.yml -o helm-chart
+        kompose.version: 1.31.2 (a92241f79)
+      creationTimestamp: null
+      labels:
+        app.kubernetes.io/component: frontend
+        io.kompose.network/balancer-main-default: "true"
+    spec:
+      containers:
+      - image: ghcr.io/codeforphilly/balancer-main/frontend:latest
+        imagePullPolicy: Always
+        name: frontend
+        ports:
+        - containerPort: 80
+          protocol: TCP
+        terminationMessagePath: /dev/termination-log
+        terminationMessagePolicy: File
+        volumeMounts:
+        - mountPath: /etc/nginx/nginx.conf
+          name: nginx-conf
+          readOnly: true
+          subPath: nginx.conf
+      dnsPolicy: ClusterFirst
+      restartPolicy: Always
+      schedulerName: default-scheduler
+      terminationGracePeriodSeconds: 30
+      volumes:
+      - configMap:
+          defaultMode: 420
+          items:
+          - key: nginx.conf
+            path: nginx.conf
+          name: nginx-conf
+        name: nginx-conf
diff -uN /tmp/LIVE-3006534080/apps.v1.StatefulSet.balancer.db /tmp/MERGED-2634587156/apps.v1.StatefulSet.balancer.db
--- /tmp/LIVE-3006534080/apps.v1.StatefulSet.balancer.db	2024-05-09 17:49:50.964039589 +0000
+++ /tmp/MERGED-2634587156/apps.v1.StatefulSet.balancer.db	2024-05-09 17:49:50.972039573 +0000
@@ -1 +1,49 @@
-{}
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+  labels:
+    app.kubernetes.io/component: db
+  name: db
+  namespace: balancer
+spec:
+  persistentVolumeClaimRetentionPolicy:
+    whenDeleted: Retain
+    whenScaled: Retain
+  podManagementPolicy: OrderedReady
+  replicas: 1
+  revisionHistoryLimit: 10
+  selector:
+    matchLabels:
+      app.kubernetes.io/component: db
+  serviceName: db
+  template:
+    metadata:
+      creationTimestamp: null
+      labels:
+        app.kubernetes.io/component: db
+        io.kompose.network/balancer-main-default: "true"
+    spec:
+      containers:
+      - envFrom:
+        - secretRef:
+            name: postgresql
+        image: postgres:15
+        imagePullPolicy: IfNotPresent
+        name: db
+        terminationMessagePath: /dev/termination-log
+        terminationMessagePolicy: File
+        volumeMounts:
+        - mountPath: /var/lib/postgresql/data
+          name: postgres-data
+      dnsPolicy: ClusterFirst
+      restartPolicy: Always
+      schedulerName: default-scheduler
+      terminationGracePeriodSeconds: 30
+      volumes:
+      - name: postgres-data
+        persistentVolumeClaim:
+          claimName: postgres-data-claim
+  updateStrategy:
+    rollingUpdate:
+      partition: 0
+    type: RollingUpdate
diff -uN /tmp/LIVE-3006534080/bitnami.com.v1alpha1.SealedSecret.balancer.backend /tmp/MERGED-2634587156/bitnami.com.v1alpha1.SealedSecret.balancer.backend
--- /tmp/LIVE-3006534080/bitnami.com.v1alpha1.SealedSecret.balancer.backend	2024-05-09 17:49:50.964039589 +0000
+++ /tmp/MERGED-2634587156/bitnami.com.v1alpha1.SealedSecret.balancer.backend	2024-05-09 17:49:50.972039573 +0000
@@ -5,9 +5,10 @@
   namespace: balancer
 spec:
   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4WoCLKUbWrxkYCclvyfAc45KJqHzwiAK
   template:
     metadata:
       creationTimestamp: null
diff -uN /tmp/LIVE-3006534080/networking.k8s.io.v1.Ingress.balancer.balancer-ingress /tmp/MERGED-2634587156/networking.k8s.io.v1.Ingress.balancer.balancer-ingress
--- /tmp/LIVE-3006534080/networking.k8s.io.v1.Ingress.balancer.balancer-ingress	2024-05-09 17:49:50.968039581 +0000
+++ /tmp/MERGED-2634587156/networking.k8s.io.v1.Ingress.balancer.balancer-ingress	2024-05-09 17:49:50.972039573 +0000
@@ -1 +1,29 @@
-{}
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+  annotations:
+    nginx.ingress.kubernetes.io/rewrite-target: /
+  name: balancer-ingress
+  namespace: balancer
+spec:
+  rules:
+  - host: balancer.sandbox.k8s.phl.io
+    http:
+      paths:
+      - backend:
+          service:
+            name: frontend
+            port:
+              name: http
+        path: /
+        pathType: Prefix
+  - host: balancertestsite.com
+    http:
+      paths:
+      - backend:
+          service:
+            name: frontend
+            port:
+              name: http
+        path: /
+        pathType: Prefix
diff -uN /tmp/LIVE-3006534080/v1.ConfigMap.balancer.backend-env /tmp/MERGED-2634587156/v1.ConfigMap.balancer.backend-env
--- /tmp/LIVE-3006534080/v1.ConfigMap.balancer.backend-env	2024-05-09 17:49:50.968039581 +0000
+++ /tmp/MERGED-2634587156/v1.ConfigMap.balancer.backend-env	2024-05-09 17:49:50.972039573 +0000
@@ -1 +1,17 @@
-{}
+apiVersion: v1
+data:
+  DATABASE: postgres
+  DEBUG: "FALSE"
+  DJANGO_ALLOWED_HOSTS: frontend localhost 127.0.0.1 [::1]
+  EMAIL_HOST: smtp.gmail.com
+  EMAIL_HOST_USER: balancer-noreply@gmail.com
+  EMAIL_PORT: "587"
+  LOGIN_REDIRECT_URL: https://balancertestsite.com/login
+  SQL_ENGINE: django.db.backends.postgresql
+  SQL_PORT: "5432"
+kind: ConfigMap
+metadata:
+  labels:
+    app.kubernetes.io/component: backend
+  name: backend-env
+  namespace: balancer
diff -uN /tmp/LIVE-3006534080/v1.ConfigMap.balancer.nginx-conf /tmp/MERGED-2634587156/v1.ConfigMap.balancer.nginx-conf
--- /tmp/LIVE-3006534080/v1.ConfigMap.balancer.nginx-conf	2024-05-09 17:49:50.968039581 +0000
+++ /tmp/MERGED-2634587156/v1.ConfigMap.balancer.nginx-conf	2024-05-09 17:49:50.972039573 +0000
@@ -1,16 +1,82 @@
 apiVersion: v1
 data:
-  nginx.conf: "user nginx;\nworker_processes  1;\nevents {\n  worker_connections  1024;\n}\nhttp
-    {\n  include /etc/nginx/mime.types;\n  error_log  /var/log/nginx/error_log;\n
-    \ access_log /var/log/nginx/access_log;\n  server {\n    listen       80;\n    listen
-    \ [::]:80;\n    server_name  localhost;\n\n    location /access_log {\n        alias
-    /var/log/nginx/access_log;\n    }\n    location /error_log {\n        alias /var/log/nginx/error_log;\n
-    \   }\n    \n    location / {\n        root   /usr/share/nginx/html;\n        index
-    \ index.html index.htm;\n    }\n\n    #error_page  404              /404.html;\n\n
-    \   # redirect server error pages to the static page /50x.html\n    #\n    #error_page
-    \  500 502 503 504  /50x.html;\n    #location = /50x.html {\n    #    root   /usr/share/nginx/html;\n
-    \   \n    #}\n  }\n}\n"
+  nginx.conf: |
+    worker_processes 1;
+
+    user nobody nogroup;
+    # 'user nobody nobody;' for systems with 'nobody' as a group instead
+    error_log  /var/log/nginx/error.log warn;
+    pid /var/run/nginx.pid;
+
+    events {
+      worker_connections 1024; # increase if you have lots of clients
+      accept_mutex off; # set to 'on' if nginx worker_processes > 1
+      # 'use epoll;' to enable for Linux 2.6+
+      # 'use kqueue;' to enable for FreeBSD, OSX
+    }
+
+    http {
+      include mime.types;
+      # fallback in case we can't determine a type
+      default_type application/octet-stream;
+      access_log /var/log/nginx/access.log combined;
+      sendfile on;
+
+      upstream gunicorn_server {
+        # fail_timeout=0 means we always retry an upstream even if it failed
+        # to return a good HTTP response
+
+        # for UNIX domain socket setups
+        # server unix:/tmp/gunicorn.sock fail_timeout=0;
+
+        # for a TCP configuration
+        # "backend" here is the name of the kubernetes service
+        server backend:8000 fail_timeout=0;
+      }
+
+      server {
+        # if no Host match, close the connection to prevent host spoofing
+        listen 80 default_server;
+        return 444;
+      }
+
+      server {
+        # use 'listen 80 deferred;' for Linux
+        # use 'listen 80 accept_filter=httpready;' for FreeBSD
+        listen 80 deferred;
+        client_max_body_size 4G;
+
+        # set the correct host(s) for your site
+        server_name localhost;
+
+        keepalive_timeout 5;
+
+        # path for static files
+        root /usr/share/nginx/html;
+        location ~ (^\/api\/|^\/auth\/|^\/admin) {
+          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+          proxy_set_header X-Forwarded-Proto $scheme;
+          proxy_set_header Host $http_host;
+          # we don't want nginx trying to do something clever with
+          # redirects, we set the Host: header above already.
+          proxy_redirect off;
+          proxy_pass http://gunicorn_server;
+        }
+
+        location / {
+          index index.html;
+          try_files $uri $uri/ /index.html;
+        }
+
+        error_page 500 502 503 504 /50x.html;
+        location = /50x.html {
+          root /usr/share/nginx/html;
+        }
+      }
+    }
 kind: ConfigMap
 metadata:
+  labels:
+    app.kubernetes.io/component: frontend
   name: nginx-conf
   namespace: balancer
diff -uN /tmp/LIVE-3006534080/v1.PersistentVolumeClaim.balancer.postgres-data-claim /tmp/MERGED-2634587156/v1.PersistentVolumeClaim.balancer.postgres-data-claim
--- /tmp/LIVE-3006534080/v1.PersistentVolumeClaim.balancer.postgres-data-claim	2024-05-09 17:49:50.968039581 +0000
+++ /tmp/MERGED-2634587156/v1.PersistentVolumeClaim.balancer.postgres-data-claim	2024-05-09 17:49:50.976039566 +0000
@@ -1 +1,14 @@
-{}
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+  labels:
+    app.kubernetes.io/component: db
+  name: postgres-data-claim
+  namespace: balancer
+spec:
+  accessModes:
+  - ReadWriteOnce
+  resources:
+    requests:
+      storage: 100Mi
+  storageClassName: linode-block-storage-retain
diff -uN /tmp/LIVE-3006534080/v1.Service.balancer.backend /tmp/MERGED-2634587156/v1.Service.balancer.backend
--- /tmp/LIVE-3006534080/v1.Service.balancer.backend	2024-05-09 17:49:50.968039581 +0000
+++ /tmp/MERGED-2634587156/v1.Service.balancer.backend	2024-05-09 17:49:50.976039566 +0000
@@ -1 +1,20 @@
-{}
+apiVersion: v1
+kind: Service
+metadata:
+  labels:
+    app.kubernetes.io/component: backend
+  name: backend
+  namespace: balancer
+spec:
+  clusterIP: 10.128.0.0
+  clusterIPs:
+  - 10.128.0.0
+  internalTrafficPolicy: Cluster
+  ipFamilies:
+  - IPv4
+  ipFamilyPolicy: SingleStack
+  ports:
+  - name: gunicorn
+    port: 8000
+  selector:
+    app.kubernetes.io/component: backend
diff -uN /tmp/LIVE-3006534080/v1.Service.balancer.db-service /tmp/MERGED-2634587156/v1.Service.balancer.db-service
--- /tmp/LIVE-3006534080/v1.Service.balancer.db-service	2024-05-09 17:49:50.968039581 +0000
+++ /tmp/MERGED-2634587156/v1.Service.balancer.db-service	2024-05-09 17:49:50.976039566 +0000
@@ -1 +1,19 @@
-{}
+apiVersion: v1
+kind: Service
+metadata:
+  name: db-service
+  namespace: balancer
+spec:
+  clusterIP: 10.128.0.0
+  clusterIPs:
+  - 10.128.0.0
+  internalTrafficPolicy: Cluster
+  ipFamilies:
+  - IPv4
+  ipFamilyPolicy: SingleStack
+  ports:
+  - nodePort: 32769
+    port: 5432
+  selector:
+    app.kubernetes.io/component: db
+  type: NodePort
diff -uN /tmp/LIVE-3006534080/v1.Service.balancer.frontend /tmp/MERGED-2634587156/v1.Service.balancer.frontend
--- /tmp/LIVE-3006534080/v1.Service.balancer.frontend	2024-05-09 17:49:50.968039581 +0000
+++ /tmp/MERGED-2634587156/v1.Service.balancer.frontend	2024-05-09 17:49:50.976039566 +0000
@@ -1 +1,23 @@
-{}
+apiVersion: v1
+kind: Service
+metadata:
+  annotations:
+    kompose.cmd: kompose convert -c -f docker-compose.prod.yml -o helm-chart
+    kompose.version: 1.31.2 (a92241f79)
+  labels:
+    app.kubernetes.io/component: frontend
+  name: frontend
+  namespace: balancer
+spec:
+  clusterIP: 10.128.0.0
+  clusterIPs:
+  - 10.128.0.0
+  internalTrafficPolicy: Cluster
+  ipFamilies:
+  - IPv4
+  ipFamilyPolicy: SingleStack
+  ports:
+  - name: http
+    port: 80
+  selector:
+    app.kubernetes.io/component: frontend

joshuagerstein and others added 3 commits April 30, 2024 21:12
[balancer] Remove tls, change watched branch, update sealed secrets
Source-holobranch: k8s-manifests-github
Source-commit: 2d0c3ad
Source: 2d0c3ad
@themightychris themightychris merged commit 13b30ef into deploys/k8s-manifests May 14, 2024
1 check passed
Copy link
Author

kubectl apply output (excluding unchanged) for 13b30ef was:

customresourcedefinition.apiextensions.k8s.io/sealedsecrets.bitnami.com configured
clusterrole.rbac.authorization.k8s.io/grafana-clusterrole configured
clusterrole.rbac.authorization.k8s.io/prometheus-alertmanager configured
clusterrole.rbac.authorization.k8s.io/prometheus-pushgateway configured
clusterrolebinding.rbac.authorization.k8s.io/cert-manager-webhook:subjectaccessreviews configured
clusterrolebinding.rbac.authorization.k8s.io/sealed-secrets configured
mutatingwebhookconfiguration.admissionregistration.k8s.io/cert-manager-webhook configured
validatingwebhookconfiguration.admissionregistration.k8s.io/cert-manager-webhook configured
validatingwebhookconfiguration.admissionregistration.k8s.io/ingress-nginx-admission configured
configmap/backend-env created
configmap/nginx-conf configured
deployment.apps/backend created
deployment.apps/frontend created
ingress.networking.k8s.io/balancer-ingress created
persistentvolumeclaim/postgres-data-claim created
sealedsecret.bitnami.com/backend configured
service/backend created
service/db-service created
service/frontend created
statefulset.apps/db created
configmap/cert-manager-webhook configured
configmap/cert-manager configured
rolebinding.rbac.authorization.k8s.io/cert-manager-webhook:dynamic-serving configured
statefulset.apps/data-warehouse-postgresql configured
configmap/grafana-dashboards-default configured
deployment.apps/grafana configured
deployment.apps/ingress-nginx-controller configured
deployment.apps/metrics-server configured
rolebinding.rbac.authorization.k8s.io/cert-manager:leaderelection configured
secret/promtail configured
statefulset.apps/loki configured
statefulset.apps/database configured
deployment.apps/prometheus-alertmanager configured
deployment.apps/prometheus-kube-state-metrics configured
deployment.apps/prometheus-pushgateway configured
deployment.apps/prometheus-server configured
serviceaccount/prometheus-kube-state-metrics configured
deployment.apps/sealed-secrets configured
rolebinding.rbac.authorization.k8s.io/sealed-secrets-key-admin configured
service/sealed-secrets configured
deployment.apps "frontend-static" deleted
service "frontend-static" deleted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants