2019-03-04 05:51:52 +07:00
|
|
|
---
|
2019-11-02 21:32:58 +07:00
|
|
|
apiVersion: apps/v1
|
2019-03-04 05:51:52 +07:00
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: test-app
|
|
|
|
namespace: authelia
|
|
|
|
labels:
|
2019-11-02 21:32:58 +07:00
|
|
|
app: test-app
|
2019-03-04 05:51:52 +07:00
|
|
|
spec:
|
|
|
|
replicas: 1
|
2019-11-02 21:32:58 +07:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: test-app
|
2019-03-04 05:51:52 +07:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
2019-11-02 21:32:58 +07:00
|
|
|
app: test-app
|
2019-03-04 05:51:52 +07:00
|
|
|
spec:
|
|
|
|
containers:
|
2020-05-21 11:35:22 +07:00
|
|
|
- name: test-app
|
|
|
|
image: nginx:alpine
|
|
|
|
command: ["/entrypoint.sh"]
|
|
|
|
ports:
|
|
|
|
- containerPort: 80
|
|
|
|
volumeMounts:
|
|
|
|
- name: config-volume
|
|
|
|
mountPath: /entrypoint.sh
|
|
|
|
subPath: entrypoint.sh
|
|
|
|
- name: config-volume
|
|
|
|
mountPath: /etc/nginx/nginx.conf
|
|
|
|
subPath: nginx.conf
|
|
|
|
- name: config-volume
|
|
|
|
mountPath: /tmp/html.tar.gz
|
|
|
|
subPath: html.tar.gz
|
|
|
|
volumes:
|
|
|
|
- name: config-volume
|
|
|
|
configMap:
|
|
|
|
name: nginx-config
|
|
|
|
items:
|
|
|
|
- key: entrypoint.sh
|
|
|
|
path: entrypoint.sh
|
|
|
|
mode: 0755
|
|
|
|
- key: nginx.conf
|
|
|
|
path: nginx.conf
|
|
|
|
- key: html.tar.gz
|
|
|
|
path: html.tar.gz
|
2019-03-04 05:51:52 +07:00
|
|
|
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: test-app-service
|
|
|
|
namespace: authelia
|
|
|
|
labels:
|
2019-11-02 21:32:58 +07:00
|
|
|
app: test-app
|
2019-03-04 05:51:52 +07:00
|
|
|
spec:
|
|
|
|
selector:
|
2019-11-02 21:32:58 +07:00
|
|
|
app: test-app
|
2019-03-04 05:51:52 +07:00
|
|
|
ports:
|
|
|
|
- port: 80
|
|
|
|
name: http
|
|
|
|
- port: 443
|
|
|
|
name: https
|
|
|
|
|
|
|
|
---
|
|
|
|
apiVersion: extensions/v1beta1
|
|
|
|
kind: Ingress
|
|
|
|
metadata:
|
|
|
|
name: insecure-ingress
|
|
|
|
namespace: authelia
|
|
|
|
annotations:
|
|
|
|
kubernetes.io/ingress.class: "nginx"
|
|
|
|
kubernetes.io/ingress.allow-http: "false"
|
|
|
|
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
|
|
|
|
spec:
|
|
|
|
tls:
|
2019-11-30 23:49:52 +07:00
|
|
|
- secretName: test-app-tls
|
|
|
|
hosts:
|
|
|
|
- home.example.com
|
2019-03-04 05:51:52 +07:00
|
|
|
rules:
|
2019-11-30 23:49:52 +07:00
|
|
|
- host: home.example.com
|
|
|
|
http:
|
|
|
|
paths:
|
|
|
|
- path: /
|
|
|
|
backend:
|
|
|
|
serviceName: test-app-service
|
|
|
|
servicePort: 80
|
2019-03-04 05:51:52 +07:00
|
|
|
|
|
|
|
---
|
|
|
|
apiVersion: extensions/v1beta1
|
|
|
|
kind: Ingress
|
|
|
|
metadata:
|
|
|
|
name: secure-ingress
|
|
|
|
namespace: authelia
|
|
|
|
annotations:
|
|
|
|
kubernetes.io/ingress.class: "nginx"
|
|
|
|
kubernetes.io/ingress.allow-http: "false"
|
|
|
|
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
|
2020-04-14 06:57:28 +07:00
|
|
|
nginx.ingress.kubernetes.io/auth-url: "https://authelia-service.authelia.svc.cluster.local/api/verify"
|
2020-01-06 12:39:51 +07:00
|
|
|
nginx.ingress.kubernetes.io/auth-signin: "https://login.example.com:8080/"
|
2019-03-04 05:51:52 +07:00
|
|
|
spec:
|
|
|
|
tls:
|
2019-11-30 23:49:52 +07:00
|
|
|
- secretName: test-app-tls
|
|
|
|
hosts:
|
|
|
|
- public.example.com
|
|
|
|
- admin.example.com
|
|
|
|
- dev.example.com
|
|
|
|
- mx1.mail.example.com
|
|
|
|
- mx2.mail.example.com
|
|
|
|
- singlefactor.example.com
|
2019-03-04 05:51:52 +07:00
|
|
|
rules:
|
2019-11-30 23:49:52 +07:00
|
|
|
- host: public.example.com
|
|
|
|
http:
|
|
|
|
paths:
|
|
|
|
- path: /
|
|
|
|
backend:
|
|
|
|
serviceName: test-app-service
|
|
|
|
servicePort: 80
|
|
|
|
- host: admin.example.com
|
|
|
|
http:
|
|
|
|
paths:
|
|
|
|
- path: /
|
|
|
|
backend:
|
|
|
|
serviceName: test-app-service
|
|
|
|
servicePort: 80
|
|
|
|
- host: dev.example.com
|
|
|
|
http:
|
|
|
|
paths:
|
|
|
|
- path: /
|
|
|
|
backend:
|
|
|
|
serviceName: test-app-service
|
|
|
|
servicePort: 80
|
|
|
|
- host: mx1.mail.example.com
|
|
|
|
http:
|
|
|
|
paths:
|
|
|
|
- path: /
|
|
|
|
backend:
|
|
|
|
serviceName: test-app-service
|
|
|
|
servicePort: 80
|
|
|
|
- host: mx2.mail.example.com
|
|
|
|
http:
|
|
|
|
paths:
|
|
|
|
- path: /
|
|
|
|
backend:
|
|
|
|
serviceName: test-app-service
|
|
|
|
servicePort: 80
|
|
|
|
- host: singlefactor.example.com
|
|
|
|
http:
|
|
|
|
paths:
|
|
|
|
- path: /
|
|
|
|
backend:
|
|
|
|
serviceName: test-app-service
|
|
|
|
servicePort: 80
|