作者 Administrator

增加新文件

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