{{- if and (hasKey .Values.ingress "www") (hasKey .Values.ingress.www "enabled") .Values.ingress.www.enabled }} apiVersion: route.openshift.io/v1 kind: Route metadata: name: {{ template "landing.routename" . }}-www namespace: {{ .Release.Namespace }} labels: app: {{ template "landing.name" . }} annotations: # Reference Let's Encrypt issuer directly kubernetes.io/tls-acme: "true" spec: host: www.{{ .Values.ingress.host }} to: kind: Service name: {{ template "landing.name" . }} weight: 100 port: targetPort: 8080 # Always enable TLS for security tls: termination: edge insecureEdgeTerminationPolicy: Redirect wildcardPolicy: None {{- end }}