# 不能有数字，3306要用“”包起来
# https://blog.csdn.net/baobaoxiannv/article/details/104632769/
apiVersion: apps/v1
kind: Deployment
metadata:
  name: data-model-web-deployment
  labels:
    app: data-model-web
spec:
  replicas: 3
  selector:
    matchLabels:
      app: data-model-web
  template:
    metadata:
      labels:
        app: data-model-web
    spec:
      containers:
        - name: data-model-web
          image: youwen21/project-data-model
          #imagePullPolicy: IfNotPresent
          imagePullPolicy: Always
          command: [ "/go/src/start_up" ]
          args: [
              "web-start",
          ]
          envFrom:
            - configMapRef:
                name: data-model-configmap
#          env:
#            - name: DB_EVENT_PORT
#              value: "3306"
#            - name: DB_EVENT_HOST
#              valueFrom:
#                configMapKeyRef:
#                  name: data-model-configmap
#                  key: DB_EVENT_HOST
#            - name: DB_EVENT_USERNAME
#              valueFrom:
#                configMapKeyRef:
#                  name: data-model-configmap
#                  key: DB_EVENT_USERNAME
#            - name: DB_EVENT_PASSWORD
#              valueFrom:
#                configMapKeyRef:
#                  name: data-model-configmap
#                  key: DB_EVENT_PASSWORD
#            - name: DB_EVENT_DATABASE
#              valueFrom:
#                configMapKeyRef:
#                  name: data-model-configmap
#                  key: DB_EVENT_DATABASE
#            - name: DB_EVENT_CHARSET
#              valueFrom:
#                configMapKeyRef:
#                  name: data-model-configmap
#                  key: DB_EVENT_CHARSET
#            - name: DB_EVENT_FILTER
#              valueFrom:
#                configMapKeyRef:
#                  name: data-model-configmap
#                  key: DB_EVENT_FILTER
          ports:
            - containerPort: 8000
