sso-kustom/examples/authenticated-app/resources/port-forwarder.yaml

55 lines
1.3 KiB
YAML
Raw Permalink Normal View History

apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/name: port-forwarder
name: port-forwarder
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: port-forwarder
strategy:
type: Recreate
template:
metadata:
labels:
app.kubernetes.io/name: port-forwarder
spec:
containers:
- image: hpello/tcp-proxy:latest
name: port-forwarder-https
env:
- name: LISTEN_PORT
value: "443"
ports:
- containerPort: 443
resources: {}
args: ["ingress-nginx-controller.ingress-nginx.svc.cluster.local", "443"]
- image: hpello/tcp-proxy:latest
name: port-forwarder-http
env:
- name: LISTEN_PORT
value: "80"
ports:
- containerPort: 80
resources: {}
args: ["ingress-nginx-controller.ingress-nginx.svc.cluster.local", "80"]
restartPolicy: Always
---
kind: Service
apiVersion: v1
metadata:
name: ssokustom
labels:
app.kubernetes.io/name: port-forwarder
spec:
ports:
- name: https
port: 443
targetPort: 443
- name: http
port: 80
targetPort: 80
selector:
app.kubernetes.io/name: port-forwarder