2022-08-03 12:12:49 +00:00
|
|
|
apiVersion: v1
|
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
|
|
|
name: host-mappings
|
|
|
|
namespace: auth-proxy
|
|
|
|
labels:
|
|
|
|
app: proxy
|
|
|
|
data:
|
|
|
|
mapping.json: |
|
|
|
|
{
|
|
|
|
"tekton-el.auth-proxy.svc": "tekton-el.cluster.local",
|
|
|
|
"vmcluster.auth-proxy.svc": "vmcluster.cluster.local",
|
|
|
|
"loki.auth-proxy.svc": "loki-write.cluster.local",
|
|
|
|
"loki.auth-proxy.svc:80": "loki-write.cluster.local",
|
|
|
|
"loki-distributed.auth-proxy.svc": "loki-loki.cluster.local",
|
2024-03-30 17:14:51 +00:00
|
|
|
"loki-distributed.auth-proxy.svc:80": "loki-loki.cluster.local"
|
2022-08-03 12:12:49 +00:00
|
|
|
}
|
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: internal-proxy
|
|
|
|
namespace: auth-proxy
|
|
|
|
labels:
|
|
|
|
app: internal-proxy
|
|
|
|
annotations:
|
|
|
|
configmap.reloader.stakater.com/reload: "host-mappings"
|
2023-12-15 21:56:53 +00:00
|
|
|
secret.reloader.stakater.com/reload: "tailscale-auth"
|
2022-08-03 12:12:49 +00:00
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
strategy:
|
|
|
|
type: Recreate
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: internal-proxy
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: internal-proxy
|
|
|
|
spec:
|
2024-03-30 16:10:55 +00:00
|
|
|
serviceAccountName: default
|
2022-08-03 12:12:49 +00:00
|
|
|
dnsPolicy: ClusterFirst
|
|
|
|
dnsConfig:
|
|
|
|
nameservers:
|
|
|
|
- 100.100.100.100
|
|
|
|
containers:
|
|
|
|
- name: proxy
|
|
|
|
image: rg.fr-par.scw.cloud/averagemarcus/proxy:latest
|
|
|
|
imagePullPolicy: Always
|
|
|
|
env:
|
|
|
|
- name: PROXY_DESTINATION
|
2024-09-15 18:08:25 +00:00
|
|
|
value: talos.tail4dfb.ts.net
|
2022-08-03 12:12:49 +00:00
|
|
|
- name: PORT
|
|
|
|
value: "8080"
|
2024-03-30 16:10:55 +00:00
|
|
|
- name: TS_AUTH_KEY
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: tailscale-auth
|
|
|
|
key: password
|
|
|
|
- name: TS_HOSTNAME
|
|
|
|
value: auth-proxy-internal-proxy
|
2022-08-03 12:12:49 +00:00
|
|
|
ports:
|
|
|
|
- containerPort: 8080
|
|
|
|
protocol: TCP
|
|
|
|
volumeMounts:
|
|
|
|
- name: host-mappings
|
|
|
|
mountPath: /config/
|
2024-03-30 17:07:23 +00:00
|
|
|
|
|
|
|
- name: oauth-proxy
|
2024-10-09 03:05:46 +00:00
|
|
|
image: quay.io/oauth2-proxy/oauth2-proxy:v7.7.1
|
2024-03-30 17:07:23 +00:00
|
|
|
args:
|
|
|
|
- --cookie-secure=false
|
|
|
|
- --provider=oidc
|
|
|
|
- --provider-display-name=Auth0
|
|
|
|
- --upstream=http://localhost:8080
|
|
|
|
- --http-address=0.0.0.0:8181
|
|
|
|
- --email-domain=*
|
|
|
|
- --pass-basic-auth=false
|
|
|
|
- --pass-access-token=false
|
|
|
|
- --oidc-issuer-url=https://marcusnoble.eu.auth0.com/
|
|
|
|
- --cookie-secret=KDGD6rrK6cBmryyZ4wcJ9xAUNW9AQNFT
|
|
|
|
- --cookie-expire=336h0m0s
|
|
|
|
env:
|
|
|
|
- name: HOST_IP
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
apiVersion: v1
|
|
|
|
fieldPath: status.podIP
|
|
|
|
- name: OAUTH2_PROXY_CLIENT_ID
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
key: username
|
|
|
|
name: auth-proxy
|
|
|
|
- name: OAUTH2_PROXY_CLIENT_SECRET
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
key: password
|
|
|
|
name: auth-proxy
|
|
|
|
ports:
|
|
|
|
- containerPort: 8181
|
|
|
|
protocol: TCP
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
memory: 50Mi
|
|
|
|
requests:
|
|
|
|
memory: 50Mi
|
2022-08-03 12:12:49 +00:00
|
|
|
volumes:
|
|
|
|
- name: host-mappings
|
|
|
|
configMap:
|
|
|
|
name: host-mappings
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
2024-03-30 16:33:28 +00:00
|
|
|
metadata:
|
|
|
|
name: tailscale-proxy
|
|
|
|
namespace: auth-proxy
|
|
|
|
labels:
|
|
|
|
app: internal-proxy
|
|
|
|
spec:
|
|
|
|
ports:
|
2024-03-30 17:14:51 +00:00
|
|
|
- name: non-auth
|
2024-03-30 16:33:28 +00:00
|
|
|
port: 80
|
|
|
|
protocol: TCP
|
|
|
|
targetPort: 8080
|
2024-03-30 17:14:51 +00:00
|
|
|
- name: auth
|
|
|
|
port: 81
|
|
|
|
protocol: TCP
|
|
|
|
targetPort: 8181
|
2024-03-30 16:33:28 +00:00
|
|
|
selector:
|
|
|
|
app: internal-proxy
|
|
|
|
type: ClusterIP
|
|
|
|
---
|