imfreedom/k8s-cluster

8bc8acea5501
Parents 10de6bf6543b
Children 2289d81f9318
Update hub and add the kluge for dovecot
--- a/50-hub.imfreedom.org.yaml Tue Dec 29 18:36:57 2020 -0600
+++ b/50-hub.imfreedom.org.yaml Thu Dec 31 01:24:59 2020 -0600
@@ -35,6 +35,14 @@
middlewares:
- name: common-headers
- name: hsts-headers
+ - match: Host(`hub.imfreedom.org`) && PathPrefix(`/kludge`)
+ kind: Rule
+ services:
+ - name: oauth-kludge
+ port: 8080
+ middlewares:
+ - name: common-headers
+ - name: hsts-headers
tls:
secretName: hub-tls
---
@@ -121,7 +129,7 @@
spec:
containers:
- name: hub
- image: docker.io/jetbrains/hub:2020.1.12375
+ image: docker.io/jetbrains/hub:2020.1.12722
ports:
- containerPort: 8080
resources:
@@ -170,3 +178,88 @@
requests:
storage: 1Gi
---
+apiVersion: v1
+kind: Service
+metadata:
+ namespace: imfreedom
+ labels:
+ app: oauth-kludge
+ name: oauth-kludge
+spec:
+ ports:
+ - port: 8080
+ protocol: TCP
+ selector:
+ app: oauth-kludge
+---
+apiVersion: networking.k8s.io/v1
+kind: NetworkPolicy
+metadata:
+ namespace: imfreedom
+ name: oauth-kludge
+ labels:
+ app: oauth-kludge
+spec:
+ podSelector:
+ matchLabels:
+ app: oauth-kludge
+ ingress:
+ - from:
+ - namespaceSelector:
+ matchLabels:
+ name: kube-public
+ podSelector:
+ matchLabels:
+ app: traefik
+ role: controller
+ ports:
+ - port: 8080
+ protocol: TCP
+---
+apiVersion: policy/v1beta1
+kind: PodDisruptionBudget
+metadata:
+ namespace: imfreedom
+ name: oauth-kludge
+spec:
+ minAvailable: 1
+ selector:
+ matchLabels:
+ app: oauth-kludge
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ namespace: imfreedom
+ name: oauth-kludge
+ labels:
+ app: oauth-kludge
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: oauth-kludge
+ template:
+ metadata:
+ labels:
+ app: oauth-kludge
+ spec:
+ containers:
+ - name: oauth-kludge
+ image: docker.io/rwgrim/oauth-kludge:latest
+ imagePullPolicy: Always
+ env:
+ - name: OAUTH_KLUDGE_SCOPE
+ value: 0-0-0-0-0
+ - name: OAUTH_KLUDGE_TOKEN_ENDPOINT
+ value: https://hub.imfreedom.org/hub/api/rest/oauth2/token
+ ports:
+ - containerPort: 8080
+ resources:
+ limits:
+ cpu: 50m
+ memory: 64Mi
+ requests:
+ cpu: 10m
+ memory: 32Mi
+---