作者 Administrator

增加新文件

  1 +apiVersion: v1
  2 +kind: Service
  3 +metadata:
  4 + name: allied-creation-gateway
  5 + namespace: mmm-suplus-test
  6 + labels:
  7 + k8s-app: allied-creation-gateway
  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-gateway
  18 +---
  19 +apiVersion: extensions/v1beta1
  20 +kind: Deployment
  21 +metadata:
  22 + name: allied-creation-gateway
  23 + namespace: mmm-suplus-test
  24 + labels:
  25 + k8s-app: allied-creation-gateway
  26 +spec:
  27 + replicas: 1
  28 + template:
  29 + metadata:
  30 + labels:
  31 + k8s-app: allied-creation-gateway
  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-gateway
  50 + image: 192.168.0.243:5000/mmm/allied-creation-gateway:dev
  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: LOG_TYPE
  99 + value: file
  100 + - name: ERROR_BASE_CODE
  101 + value: "1"
  102 + - name: ERROR_BASE_CODE_MULTIPLE
  103 + value: "1000"
  104 + - name: ENABLE_KAFKA_LOG
  105 + value: "true"
  106 + - name: HTTP_PORT
  107 + value: "8082"
  108 + - name: ALLIED_CREATION_USER_HOST
  109 + value: "http://allied-creation-user-test.fjmaimaimai.com"
  110 + - name: ALLIED_CREATION_COOPERATION_HOST
  111 + value: "http://allied-creation-cooperation-test.fjmaimaimai.com"
  112 + - name: ALLIED_CREATION_BASIC_HOST
  113 + value: "http://allied-creation-basic-test.fjmaimaimai.com"
  114 + - name: SMS_SERVE_HOST
  115 + value: "https://sms.fjmaimaimai.com:9897"
  116 + # - name: REDIS_HOST
  117 + # valueFrom:
  118 + # configMapKeyRef:
  119 + # name: suplus-config
  120 + # key: redis.ip
  121 + # - name: REDIS_PORT
  122 + # valueFrom:
  123 + # configMapKeyRef:
  124 + # name: suplus-config
  125 + # key: redis.port
  126 + volumes:
  127 + - name: accesslogs
  128 + emptyDir: {}