gopy.yaml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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:819463f
  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. priority: 5
  49. middlewares:
  50. - name: gopyhttpsgofqdn
  51. services:
  52. - name: gopy
  53. port: 5000
  54. - match: ((Host(`go`)||Host(`go.dezendorf.net`))) && Path(`/{url:.*}/edit`)
  55. kind: Rule
  56. priority: 4
  57. middlewares:
  58. - name: gopyhttpsgofqdn
  59. services:
  60. - name: gopy
  61. port: 5000
  62. - match: ((Host(`go`)||Host(`go.dezendorf.net`))) && Path(`/{url:.*}/add`)
  63. kind: Rule
  64. priority: 3
  65. middlewares:
  66. - name: gopyhttpsgofqdn
  67. services:
  68. - name: gopy
  69. port: 5000
  70. - match: ((Host(`go`)||Host(`go.dezendorf.net`))) && Path(`/{url:.*}/delete`)
  71. kind: Rule
  72. priority: 2
  73. middlewares:
  74. - name: gopyhttpsgofqdn
  75. services:
  76. - name: gopy
  77. port: 5000
  78. - match: ((Host(`go`)||Host(`go.dezendorf.net`)))
  79. kind: Rule
  80. priority: 1
  81. services:
  82. - name: gopy
  83. port: 5000
  84. ---
  85. apiVersion: traefik.containo.us/v1alpha1
  86. kind: IngressRoute
  87. metadata:
  88. name: gopy-websecure-route
  89. namespace: default
  90. spec:
  91. entryPoints:
  92. - websecure
  93. routes:
  94. - match: Host(`go.dezendorf.net`)
  95. kind: Rule
  96. middlewares:
  97. - name: authelia
  98. services:
  99. - name: gopy
  100. port: 5000
  101. tls:
  102. certResolver: myresolver
  103. ---
  104. apiVersion: traefik.containo.us/v1alpha1
  105. kind: Middleware
  106. metadata:
  107. name: gopyhttpsgofqdn
  108. spec:
  109. redirectRegex:
  110. regex: "^http(s)?://(go(.dezendorf.net)?)/(.+)?$"
  111. replacement: "https://go.dezendorf.net/${4}"