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.

61 lines
2.5 KiB

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