---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: grafana
  name: grafana
  namespace: prow-monitoring
spec:
  type: NodePort
  sessionAffinity: ClientIP
  ports:
  - name: http
    port: 3001
    targetPort: http
  - name: nginx
    port: 80
    targetPort: nginx
  selector:
    app: grafana
---
apiVersion: networking.gke.io/v1beta1
kind: ManagedCertificate
metadata:
  name: oss-prow-knative-dev
  namespace: prow-monitoring
spec:
  domains:
  - oss-prow-monitoring.knative.dev
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: grafana
  namespace: prow-monitoring
  annotations:
    kubernetes.io/ingress.global-static-ip-name: oss-prow-monitoring-ip
    kubernetes.io/ingress.class: "gce"
    kubernetes.io/tls-acme: "true"
    networking.gke.io/managed-certificates: oss-prow-knative-dev
spec:
  rules:
  - host: oss-prow-monitoring.knative.dev
    http:
      paths:
      - path: /monitoring
        backend:
          serviceName: grafana
          servicePort: 80

---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: grafana
  name: grafana
  namespace: prow-monitoring
spec:
  type: NodePort
  sessionAffinity: ClientIP
  ports:
  - name: http
    port: 3001
    targetPort: http
  - name: nginx
    port: 80
    targetPort: nginx
  selector:
    app: grafana
# TODO(chaodaiG): uncomment this once figure out how to support ingress
# ---
# apiVersion: networking.gke.io/v1beta1
# kind: ManagedCertificate
# metadata:
#   name: oss-prow-knative-dev
#   namespace: prow-monitoring
# spec:
#   domains:
#   - oss-prow.knative.dev
# ---
# apiVersion: extensions/v1beta1
# kind: Ingress
# metadata:
#   name: grafana
#   namespace: prow-monitoring
#   annotations:
#     kubernetes.io/ingress.global-static-ip-name: prow-monitoring-grafana
#     kubernetes.io/ingress.class: "gce"
#     kubernetes.io/tls-acme: "true"
#     networking.gke.io/managed-certificates: oss-prow-knative-dev
# spec:
#   rules:
#   - host: oss-prow.knative.dev
#     http:
#       paths:
#       - path: /monitoring
#         backend:
#           serviceName: grafana
#           servicePort: 80

Revert "Expose prow monitoring dashboard"
Revert "Expose prow monitoring dashboard"

This reverts commit 8ef6397cc0533092d48c87f45c2f8d8cac5022b4.
