apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: default
  name: appmanager-server
spec:
  replicas: 1
  selector:
    matchLabels:
      name: appmanager-server
  template:
    metadata:
      labels:
        name: appmanager-server
    spec:
      initContainers:
        - name: db-migration
          image: reg.docker.alibaba-inc.com/sw/paas-appmanager-db-migration:develop
          envFrom:
            - configMapRef:
                name: appmanager-db-migration-env
      containers:
        - name: server
          image: reg.docker.alibaba-inc.com/sw/paas-appmanager:develop
          ports:
            - containerPort: 7001
          envFrom:
            - configMapRef:
                name: appmanager-server-env
          securityContext:
            privileged: true
