ingress.yaml 886 B

12345678910111213141516171819202122232425262728
  1. apiVersion: networking.k8s.io/v1
  2. kind: Ingress
  3. metadata:
  4. name: swagger-ui
  5. namespace: cicd
  6. annotations:
  7. nginx.ingress.kubernetes.io/enable-cors: "true"
  8. nginx.ingress.kubernetes.io/cors-allow-origin: "*"
  9. nginx.ingress.kubernetes.io/proxy-cache: "true"
  10. nginx.ingress.kubernetes.io/proxy-cache-path: "/tmp/nginx-cache"
  11. nginx.ingress.kubernetes.io/proxy-cache-methods: "GET,HEAD,POST"
  12. nginx.ingress.kubernetes.io/proxy-cache-min_uses: "1"
  13. nginx.ingress.kubernetes.io/proxy-cache-lock: "on"
  14. nginx.ingress.kubernetes.io/proxy-cache-valid: "10m"
  15. nginx.ingress.kubernetes.io/proxy-cache-max-size: "100m"
  16. spec:
  17. rules:
  18. - host: swagger-ui.cestong.com.cn
  19. http:
  20. paths:
  21. - path: /
  22. pathType: Prefix
  23. backend:
  24. service:
  25. name: swagger-ui
  26. port:
  27. number: 80
  28. ingressClassName: nginx