apiVersion: v1
kind: Service
metadata:
  name: web
  labels:
    service: web
spec:
  ports:
  - name: http
    port: 8080
    targetPort: 8080
  selector:
    service: web
  {{ if .Values.nodeport }}
  type: NodePort
  {{ else }}
  type: LoadBalancer
  {{ end }}
---
{{if .Values.ocCreateRoute}}
apiVersion: route.openshift.io/v1
kind: Route
metadata:
  name: web
spec:
  to:
    kind: Service
    name: web
{{end}}