#
# Copyright 2021 The Kubernetes Authors
#
# 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: apps/v1
kind: Deployment
metadata:
  name: kui-ui
spec:
  selector:
    matchLabels:
      app: kui-ui
  replicas: 1
  template:
    metadata:
      labels:
        app: kui-ui
    spec:
      containers:
      - name: proxy
        image: kuishell/proxy
        imagePullPolicy: Always
        env:
        - name: DEBUG
          value: '*'
        ports:
        - name: proxy
          containerPort: 3000

      - name: client
        image: kuishell/webpack
        imagePullPolicy: Always
        ports:
        - containerPort: 443

---
apiVersion: v1
kind: Service
metadata:
  name: kui-ui
  labels:
    app: kui-ui
spec:
  selector:
    app: kui-ui
  ports:
  - name: client
    port: 9080
    targetPort: 443
    protocol: TCP
  - name: proxy
    port: 8081
    targetPort: 3000
    protocol: TCP
