authelia.yaml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. ---
  2. kind: Deployment
  3. apiVersion: apps/v1
  4. metadata:
  5. name: authelia
  6. labels:
  7. app: authelia
  8. spec:
  9. replicas: 1
  10. selector:
  11. matchLabels:
  12. app: authelia
  13. #enableServiceLinks: false
  14. template:
  15. metadata:
  16. labels:
  17. app: authelia
  18. spec:
  19. containers:
  20. - name: authelia
  21. image: authelia/authelia
  22. ports:
  23. - name: web
  24. containerPort: 9091
  25. volumeMounts:
  26. - name: authelia-config
  27. mountPath: "/config"
  28. volumes:
  29. - name: authelia-config
  30. persistentVolumeClaim:
  31. claimName: authelia-volume
  32. ---
  33. apiVersion: v1
  34. kind: PersistentVolumeClaim
  35. metadata:
  36. name: authelia-volume
  37. spec:
  38. accessModes:
  39. - ReadWriteOnce
  40. storageClassName: nfs
  41. resources:
  42. requests:
  43. storage: 100M
  44. ---
  45. apiVersion: traefik.containo.us/v1alpha1
  46. kind: IngressRoute
  47. metadata:
  48. name: authelia-ingress-route
  49. namespace: default
  50. spec:
  51. entryPoints:
  52. - web
  53. routes:
  54. - match: Host(`sso.dezendorf.net`)
  55. kind: Rule
  56. services:
  57. - name: authelia
  58. port: 9091
  59. ---
  60. apiVersion: v1
  61. kind: Service
  62. metadata:
  63. name: authelia
  64. spec:
  65. type: ClusterIP
  66. ports:
  67. - name: web
  68. port: 9091
  69. selector:
  70. app: authelia
  71. ---
  72. apiVersion: traefik.containo.us/v1alpha1
  73. kind: IngressRoute
  74. metadata:
  75. name: authelia-websecure-route
  76. namespace: default
  77. spec:
  78. entryPoints:
  79. - websecure
  80. routes:
  81. - match: Host(`sso.dezendorf.net`)
  82. kind: Rule
  83. services:
  84. - name: authelia
  85. port: 9091
  86. tls:
  87. certResolver: myresolver
  88. ---
  89. apiVersion: traefik.containo.us/v1alpha1
  90. kind: Middleware
  91. metadata:
  92. name: authelia
  93. spec:
  94. forwardAuth:
  95. address: "http://authelia.default.svc.cluster.local:9091/api/verify?rd=https://sso.dezendorf.net/"
  96. trustForwardHeader: true
  97. authResponseHeaders:
  98. - "Remote-User"
  99. - "Remote-Groups"
  100. - "Remote-Email"
  101. - "Remote-Name"