oid.yaml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. apiVersion: v1
  2. kind: Service
  3. metadata:
  4. name: oid
  5. labels:
  6. run: oid
  7. spec:
  8. ports:
  9. - name: http
  10. port: 80
  11. targetPort: 80
  12. selector:
  13. run: oid
  14. # type: LoadBalancer
  15. # Uncomment the following if you wnat to expose an IP
  16. #status:
  17. # loadBalancer: {}
  18. ---
  19. apiVersion: apps/v1
  20. kind: Deployment
  21. metadata:
  22. name: oid
  23. spec:
  24. replicas: 1
  25. selector:
  26. matchLabels:
  27. run: oid
  28. strategy:
  29. type: Recreate
  30. template:
  31. metadata:
  32. labels:
  33. run: oid
  34. spec:
  35. containers:
  36. - image: 1nfiniteloop/webauth
  37. name: oid
  38. env:
  39. - name: OID_SESSION_SECRET #: secret value for cookie sessions
  40. value: ThisIsASecret
  41. - name: OID_DISCOVERY #: OpenID provider well-known discovery URL
  42. value: https://keycloak.xdrtest.accenturefederalcyber.com/auth
  43. - name: OID_CLIENT_ID #: OpenID Client ID
  44. value: oid
  45. - name: PROXY_HOST #: Host name of the service to proxy
  46. value: google.com
  47. - name: PROXY_PORT #: Port of the service to proxy
  48. value: "443"
  49. - name: PROXY_PROTOCOL #: Protocol to the service to proxy (http or https)
  50. value: https
  51. # - name: ADD_HOST_HEADER #: pass the proxy host header downstream (true or false)
  52. # value:
  53. # - name: OIDC_AUTH_METHOD #: OpenID Connect authentication method (client_secret_basic or client_secret_post)
  54. # value:
  55. # - name: OID_SESSION_CHECK_SSI #: check SSI or not (on or off)
  56. # value:
  57. # - name: OID_SESSION_NAME #: cookie session name
  58. # value:
  59. # - name: OID_REDIRECT_PATH #: Redirect path after authentication
  60. # value:
  61. # - name: OID_CLIENT_SECRET #: OpenID Client Secret
  62. # value:
  63. # - name: OIDC_RENEW_ACCESS_TOKEN_ON_EXPIRY #: Enable silent renew of access token (true or false)
  64. # value:
  65. ports:
  66. - containerPort: 80
  67. resources: {}
  68. restartPolicy: Always
  69. status: {}
  70. ---
  71. # Hosting
  72. apiVersion: networking.k8s.io/v1
  73. kind: Ingress
  74. metadata:
  75. name: oid-ingress
  76. annotations:
  77. cert-manager.io/cluster-issuer: "letsencrypt-prod"
  78. ## basic auth for oid
  79. # type of authentication
  80. nginx.ingress.kubernetes.io/auth-type: basic
  81. # name of the secret that contains the user/password definitions
  82. nginx.ingress.kubernetes.io/auth-secret: basic-auth
  83. # message to display with an appropriate context why the authentication is required
  84. nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required - Octoprint'
  85. spec:
  86. tls:
  87. - hosts:
  88. - oid.monkeybox.org
  89. secretName: oid-tls
  90. rules:
  91. - host: oid.monkeybox.org
  92. http:
  93. paths:
  94. - path: /
  95. pathType: Prefix
  96. backend:
  97. service:
  98. name: oid
  99. port:
  100. number: 80