###########################################################################
# Copyright 2019 IBM Corporation
#
# 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
# imitations under the License.
###########################################################################
# Note this service must be created before the kappnav-ui deployment so
# that secret kappnav-ui-service-tls (see annotation, below) can be created
# first, since it will be mounted to the kappnav-ui pod.  If you create
# them at or near the same time the race condition fails to setup the 
# secret in time to be mounted on the pod and the pod fails. 
# 
apiVersion: v1
kind: Service
metadata:
  name: kappnav-ui-service
  annotations:
    service.alpha.openshift.io/serving-cert-secret-name: kappnav-ui-service-tls
spec:
  ports:
  - name: proxy
    port: 443
    targetPort: 8443
  selector:
    app.kubernetes.io/component: kappnav-ui
