gopy.yaml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. ---
  2. kind: Deployment
  3. apiVersion: apps/v1
  4. metadata:
  5. name: gopy
  6. labels:
  7. app: gopy
  8. spec:
  9. replicas: 3
  10. selector:
  11. matchLabels:
  12. app: gopy
  13. template:
  14. metadata:
  15. labels:
  16. app: gopy
  17. spec:
  18. containers:
  19. - name: gopy
  20. image: docker.dezendorf.net/gopy:ff1b1b5
  21. ports:
  22. - name: web
  23. containerPort: 5000
  24. ---
  25. apiVersion: v1
  26. kind: Service
  27. metadata:
  28. name: gopy
  29. spec:
  30. type: ClusterIP
  31. ports:
  32. - name: web
  33. port: 5000
  34. selector:
  35. app: gopy
  36. ---
  37. apiVersion: traefik.containo.us/v1alpha1
  38. kind: IngressRoute
  39. metadata:
  40. name: gopy-ingress-route
  41. namespace: default
  42. spec:
  43. entryPoints:
  44. - web
  45. routes:
  46. - match: (Host(`go`)||Host(`go.dezendorf.net`)) && Path(`/list`)
  47. kind: Rule
  48. middlewares:
  49. - name: gopyhttpsgofqdn
  50. services:
  51. - name: gopy
  52. port: 5000
  53. - match: ((Host(`go`)||Host(`go.dezendorf.net`))) && Path(`/{url:.*}/edit`)
  54. kind: Rule
  55. middlewares:
  56. - name: gopyhttpsgofqdn
  57. services:
  58. - name: gopy
  59. port: 5000
  60. - match: ((Host(`go`)||Host(`go.dezendorf.net`))) && Path(`/{url:.*}/add`)
  61. kind: Rule
  62. middlewares:
  63. - name: gopyhttpsgofqdn
  64. services:
  65. - name: gopy
  66. port: 5000
  67. - match: ((Host(`go`)||Host(`go.dezendorf.net`))) && Path(`/{url:.*}/delete`)
  68. kind: Rule
  69. middlewares:
  70. - name: gopyhttpsgofqdn
  71. services:
  72. - name: gopy
  73. port: 5000
  74. - match: ((Host(`go`)||Host(`go.dezendorf.net`))||Host(`go.dezendorf.com`))
  75. kind: Rule
  76. services:
  77. - name: gopy
  78. port: 5000
  79. ---
  80. apiVersion: traefik.containo.us/v1alpha1
  81. kind: IngressRoute
  82. metadata:
  83. name: gopy-websecure-route
  84. namespace: default
  85. spec:
  86. entryPoints:
  87. - websecure
  88. routes:
  89. - match: ((Host(`go.dezendorf.net`)||Host(`go.dezendorf.net`)))
  90. kind: Rule
  91. middlewares:
  92. - name: authelia
  93. services:
  94. - name: gopy
  95. port: 5000
  96. tls:
  97. certResolver: myresolver
  98. ---
  99. apiVersion: traefik.containo.us/v1alpha1
  100. kind: Middleware
  101. metadata:
  102. name: gopyhttpsgofqdn
  103. spec:
  104. redirectRegex:
  105. regex: "^http(s)?://(go(.dezendorf.net)?)/(.+)?$"
  106. replacement: "https://go.dezendorf.net/${4}"