作者 Administrator

增加新文件

  1 +apiVersion: v1
  2 +kind: Service
  3 +metadata:
  4 + name: allied-creation-user
  5 + namespace: mmm-suplus-prd
  6 + labels:
  7 + k8s-app: allied-creation-user
  8 +spec:
  9 + ports:
  10 + - name: "http"
  11 + port: 80
  12 + targetPort: 8082
  13 + - name: "https"
  14 + port: 443
  15 + targetPort: 443
  16 + selector:
  17 + k8s-app: allied-creation-user
  18 +---
  19 +apiVersion: extensions/v1beta1
  20 +kind: Deployment
  21 +metadata:
  22 + name: allied-creation-user
  23 + namespace: mmm-suplus-prd
  24 + labels:
  25 + k8s-app: allied-creation-user
  26 +spec:
  27 + replicas: 1
  28 + template:
  29 + metadata:
  30 + labels:
  31 + k8s-app: allied-creation-user
  32 + spec:
  33 + affinity:
  34 + nodeAffinity:
  35 + preferredDuringSchedulingIgnoredDuringExecution:
  36 + - preference: {}
  37 + weight: 100
  38 + requiredDuringSchedulingIgnoredDuringExecution:
  39 + nodeSelectorTerms:
  40 + - matchExpressions:
  41 + - key: kubernetes.io/hostname
  42 + operator: In
  43 + values:
  44 + - cn-hangzhou.i-bp1djh1xn7taumbue1ze
  45 + - cn-hangzhou.i-bp1djh1xn7taumbue1zd
  46 + - cn-hangzhou.i-bp1euf5u1ph9kbhtndhb
  47 + - cn-hangzhou.i-bp1hyp5oips9cdwxxgxy
  48 + containers:
  49 + - name: allied-creation-user
  50 + image: 192.168.0.243:5000/mmm/allied-creation-user:master
  51 + imagePullPolicy: Always
  52 + ports:
  53 + - containerPort: 8082
  54 + - containerPort: 443
  55 + volumeMounts:
  56 + - mountPath: /opt/logs
  57 + name: accesslogs
  58 + env:
  59 + - name: POSTGRESQL_DB_NAME
  60 + valueFrom:
  61 + configMapKeyRef:
  62 + name: suplus-config
  63 + key: postgresqlalliedcreation.dbname
  64 + - name: POSTGRESQL_USER
  65 + valueFrom:
  66 + configMapKeyRef:
  67 + name: suplus-config
  68 + key: postgresql.user
  69 + - name: POSTGRESQL_PASSWORD
  70 + valueFrom:
  71 + configMapKeyRef:
  72 + name: suplus-config
  73 + key: postgresql.password
  74 + - name: POSTGRESQL_HOST
  75 + valueFrom:
  76 + configMapKeyRef:
  77 + name: suplus-config
  78 + key: postgresql.host
  79 + - name: POSTGRESQL_PORT
  80 + valueFrom:
  81 + configMapKeyRef:
  82 + name: suplus-config
  83 + key: postgresql.port
  84 + - name: REDIS_HOST
  85 + valueFrom:
  86 + configMapKeyRef:
  87 + name: suplus-config
  88 + key: redis.ip
  89 + - name: REDIS_PORT
  90 + valueFrom:
  91 + configMapKeyRef:
  92 + name: suplus-config
  93 + key: redis.port
  94 + - name: REDIS_AUTH
  95 + value: ""
  96 + - name: LOG_LEVEL
  97 + value: "debug"
  98 + - name: ERROR_BASE_CODE
  99 + value: "1"
  100 + - name: ERROR_BASE_CODE_MULTIPLE
  101 + value: "1000"
  102 + - name: ENABLE_KAFKA_LOG
  103 + value: "true"
  104 + - name: HTTP_PORT
  105 + value: "8082"
  106 + - name: SERVICE_ENV
  107 + value: "prd"
  108 + - name: REDIS_HOST
  109 + valueFrom:
  110 + configMapKeyRef:
  111 + name: suplus-config
  112 + key: redis.ip
  113 + - name: REDIS_PORT
  114 + valueFrom:
  115 + configMapKeyRef:
  116 + name: suplus-config
  117 + key: redis.port
  118 + volumes:
  119 + - name: accesslogs
  120 + emptyDir: {}