apiVersion: apps/v1
kind: Deployment
metadata:
  name: octopus-ui
  namespace: kube-system
  labels:
    app.kubernetes.io/name: octopus-ui
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: octopus-ui
  template:
    metadata:
      labels:
        app.kubernetes.io/name: octopus-ui
    spec:
      serviceAccountName: octopus-ui
      containers:
      - name: octopus-api-server
        image: cnrancher/octopus-api-server:master
        imagePullPolicy: Always
        ports:
        - name: http
          containerPort: 8443
          protocol: TCP
      affinity:
        nodeAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - weight: 1
            preference:
              matchExpressions:
              - key: beta.kubernetes.io/os
                operator: In
                values:
                - linux
