You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
2.4 KiB

  1. apiVersion: extensions/v1beta1
  2. kind: Ingress
  3. metadata:
  4. name: ingress-{{ template "seaweedfs.name" . }}-filer
  5. annotations:
  6. kubernetes.io/ingress.class: "nginx"
  7. nginx.ingress.kubernetes.io/auth-type: "basic"
  8. nginx.ingress.kubernetes.io/auth-secret: "default/ingress-basic-auth-secret"
  9. nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required - SW-Filer'
  10. nginx.ingress.kubernetes.io/service-upstream: "true"
  11. nginx.ingress.kubernetes.io/rewrite-target: /$1
  12. nginx.ingress.kubernetes.io/use-regex: "true"
  13. nginx.ingress.kubernetes.io/enable-rewrite-log: "true"
  14. nginx.ingress.kubernetes.io/ssl-redirect: "false"
  15. nginx.ingress.kubernetes.io/force-ssl-redirect: "false"
  16. nginx.ingress.kubernetes.io/configuration-snippet: |
  17. sub_filter '<head>' '<head> <base href="/sw-filer/">'; #add base url
  18. sub_filter '="/' '="./'; #make absolute paths to relative
  19. sub_filter '=/' '=./';
  20. sub_filter '/seaweedfsstatic' './seaweedfsstatic';
  21. sub_filter_once off;
  22. spec:
  23. rules:
  24. - http:
  25. paths:
  26. - path: /sw-filer/?(.*)
  27. backend:
  28. serviceName: {{ template "seaweedfs.name" . }}-filer
  29. servicePort: {{ .Values.filer.port }}
  30. ---
  31. apiVersion: extensions/v1beta1
  32. kind: Ingress
  33. metadata:
  34. name: ingress-{{ template "seaweedfs.name" . }}-master
  35. annotations:
  36. kubernetes.io/ingress.class: "nginx"
  37. nginx.ingress.kubernetes.io/auth-type: "basic"
  38. nginx.ingress.kubernetes.io/auth-secret: "default/ingress-basic-auth-secret"
  39. nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required - SW-Master'
  40. nginx.ingress.kubernetes.io/service-upstream: "true"
  41. nginx.ingress.kubernetes.io/rewrite-target: /$1
  42. nginx.ingress.kubernetes.io/use-regex: "true"
  43. nginx.ingress.kubernetes.io/enable-rewrite-log: "true"
  44. nginx.ingress.kubernetes.io/ssl-redirect: "false"
  45. nginx.ingress.kubernetes.io/force-ssl-redirect: "false"
  46. nginx.ingress.kubernetes.io/configuration-snippet: |
  47. sub_filter '<head>' '<head> <base href="/sw-master/">'; #add base url
  48. sub_filter '="/' '="./'; #make absolute paths to relative
  49. sub_filter '=/' '=./';
  50. sub_filter '/seaweedfsstatic' './seaweedfsstatic';
  51. sub_filter_once off;
  52. spec:
  53. rules:
  54. - http:
  55. paths:
  56. - path: /sw-master/?(.*)
  57. backend:
  58. serviceName: {{ template "seaweedfs.name" . }}-master
  59. servicePort: {{ .Values.master.port }}