---
apiVersion: v1
kind: Service
metadata:
  name: <%=name%>
spec:
  selector:
    app: <%=name%>
  ports:
  - port: 80
    name: http
    protocol: TCP
    targetPort: 80
    nodePort: 31010
  - port: 81
    name: httpapp
    protocol: TCP
    targetPort: 81
    nodePort: 31011
  - port: 443
    name: https
    protocol: TCP
    targetPort: 443
    nodePort: 31012
  type: NodePort
---
#deployment
apiVersion: apps/v1beta2
kind: Deployment
metadata:
  name: <%=name%>
  labels:
    app: <%=name%>
spec:
  replicas: 3
  revisionHistoryLimit: 3
  minReadySeconds: 15
  strategy:
    type: RollingUpdate
  selector:
    matchLabels:
      app: <%=name%>
  template:
    metadata:
      labels:
        app: <%=name%>
    spec:
      containers:
        - name: <%=name%>
          image: hub.kce.ksyun.com/console_fe/<%=name%>:$version
          env:
             - name: NODE_ENV
               value: production
          ports:
            - containerPort: 80
              name: http
            - containerPort: 443
              name: https
            - containerPort: 81
              name: httpapp
      imagePullSecrets:
        - name: hub.kce.ksyun.com.fe.key