gopy.yaml 2.2 KB

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