# Copyright (C) Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/upstream-vhost: $service_name.$namespace.svc.cluster.local:8084
    nginx.ingress.kubernetes.io/configuration-snippet: |
      proxy_set_header Origin "";
      proxy_hide_header l5d-remote-ip;
      proxy_hide_header l5d-server-id;
  labels:
    app: grafana
    # renovate: registryUrl=https://grafana.github.io/helm-charts
    helm.sh/chart: grafana-6.12.1
    app.kubernetes.io/instance: grafana
    app.kubernetes.io/version: 8.0.1
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: grafana
    portefaix.xyz/version: v0.38.0
  name: grafana-external
  namespace: monitoring
spec:
  rules:
  - host: grafana.homelab.portefaix.xyz
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: grafana
            port:
              number: 80
