---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: geocode
  labels:
    name: geocode
    app: geocode
  annotations:
    kubernetes.io/ingress.class: "nginx"
    nginx.ingress.kubernetes.io/enable-cors: "true"
    nginx.ingress.kubernetes.io/cors-allow-headers: "X-Forwarded-For, If-Modified-Since"
    nginx.ingress.kubernetes.io/configuration-snippet: |
      server_tokens off;
      location /metrics {
        deny all;
        return 301 /;
      }
spec:
  rules:
  - host: $(HOST)
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: geocode
            port:
              number: 8080