Added new RSS app

This commit is contained in:
Marcus Noble 2020-10-19 06:05:48 +01:00
parent 5f8800f311
commit d29c9ec82c
2 changed files with 69 additions and 23 deletions

View File

@ -23,7 +23,7 @@ metadata:
name: goplayground name: goplayground
namespace: goplayground namespace: goplayground
spec: spec:
replicas: 2 replicas: 1
selector: selector:
matchLabels: matchLabels:
app: goplayground app: goplayground

View File

@ -15,16 +15,38 @@ spec:
requests: requests:
storage: 1Gi storage: 1Gi
--- ---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: rss-db
namespace: rss
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
apiVersion: v1
kind: Secret
metadata:
name: rss-auth
namespace: rss
annotations:
kube-1password: mr6spkkx7n3memkbute6ojaarm
kube-1password/vault: Kubernetes
type: Opaque
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: rss name: rss-new
namespace: rss namespace: rss
spec: spec:
type: ClusterIP type: ClusterIP
ports: ports:
- port: 80 - port: 80
targetPort: 8080 targetPort: 8000
name: web name: web
selector: selector:
app: rss app: rss
@ -46,35 +68,59 @@ spec:
labels: labels:
app: rss app: rss
spec: spec:
securityContext:
fsGroup: 1000
dnsConfig: dnsConfig:
options: options:
- name: ndots - name: ndots
value: "2" value: "2"
containers: containers:
- name: web - args:
image: mdswanson/stringer - --cookie-secure=false
command: - --provider=oidc
- bash - --provider-display-name=Auth0
- -c - --upstream=http://localhost:8080
- /app/start.sh > /dev/null - --http-address=$(HOST_IP):8000
- --redirect-url=https://rss.cluster.fun/oauth2/callback
- --email-domain=marcusnoble.co.uk
- --pass-basic-auth=false
- --pass-access-token=false
- --oidc-issuer-url=https://marcusnoble.eu.auth0.com/
- --cookie-secret=KDGD6rrK6cBmryyZ4wcJ9xAUNW9AQN
env:
- name: HOST_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
- name: OAUTH2_PROXY_CLIENT_ID
valueFrom:
secretKeyRef:
key: username
name: rss-auth
- name: OAUTH2_PROXY_CLIENT_SECRET
valueFrom:
secretKeyRef:
key: password
name: rss-auth
image: quay.io/oauth2-proxy/oauth2-proxy:v5.1.1
name: oauth-proxy
ports:
- containerPort: 8000
protocol: TCP
resources:
limits:
memory: 125Mi
requests:
memory: 125Mi
- name: web
image: docker.cluster.fun/averagemarcus/gopherss:latest
env: env:
- name: SECRET_TOKEN
value: inward-popcorn-decamp-epsilon
- name: PORT - name: PORT
value: "8080" value: "8080"
- name: DATABASE_URL - name: DB_PATH
value: sqlite3:/data/stringer.db value: /data/feeds.db
ports: ports:
- containerPort: 8080 - containerPort: 8080
name: web name: web
livenessProbe:
httpGet:
path: /heroku
port: 8080
initialDelaySeconds: 30
periodSeconds: 10
resources: resources:
limits: limits:
memory: 308Mi memory: 308Mi
@ -86,7 +132,7 @@ spec:
volumes: volumes:
- name: storage - name: storage
persistentVolumeClaim: persistentVolumeClaim:
claimName: rss claimName: rss-db
--- ---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Ingress kind: Ingress
@ -109,7 +155,7 @@ spec:
paths: paths:
- path: / - path: /
backend: backend:
serviceName: rss serviceName: rss-new
servicePort: 80 servicePort: 80
--- ---