作者 Administrator

增加新文件

  1 +apiVersion: v1
  2 +kind: Service
  3 +metadata:
  4 + name: performance-back
  5 + namespace: mmm-suplus-prd
  6 + labels:
  7 + k8s-app: performance-back
  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: performance-back
  18 +---
  19 +apiVersion: extensions/v1beta1
  20 +kind: Deployment
  21 +metadata:
  22 + name: performance-back
  23 + namespace: mmm-suplus-prd
  24 + labels:
  25 + k8s-app: performance-back
  26 +spec:
  27 + replicas: 1
  28 + template:
  29 + metadata:
  30 + labels:
  31 + k8s-app: performance-back
  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: performance-back
  50 + image: 192.168.0.243:5000/mmm/performance-back: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: LOG_LEVEL
  60 + value: "debug"
  61 + - name: LOG_FILE
  62 + value: "true"
  63 + - name: ERROR_BASE_CODE
  64 + value: "1"
  65 + - name: ERROR_BASE_CODE_MULTIPLE
  66 + value: "1000"
  67 + - name: POSTGRESQL_DB_NAME
  68 + value: "performance_prd"
  69 + - name: ENABLE_HTTPS
  70 + value: "true"
  71 + - name: POSTGRESQL_USER
  72 + valueFrom:
  73 + configMapKeyRef:
  74 + name: suplus-config
  75 + key: postgresql.user
  76 + - name: POSTGRESQL_PASSWORD
  77 + valueFrom:
  78 + configMapKeyRef:
  79 + name: suplus-config
  80 + key: postgresql.password
  81 + - name: POSTGRESQL_HOST
  82 + valueFrom:
  83 + configMapKeyRef:
  84 + name: suplus-config
  85 + key: postgresql.host
  86 + - name: POSTGRESQL_PORT
  87 + valueFrom:
  88 + configMapKeyRef:
  89 + name: suplus-config
  90 + key: postgresql.port
  91 + - name: REDIS_HOST
  92 + valueFrom:
  93 + configMapKeyRef:
  94 + name: suplus-config
  95 + key: redis.ip
  96 + - name: REDIS_PORT
  97 + valueFrom:
  98 + configMapKeyRef:
  99 + name: suplus-config
  100 + key: redis.port
  101 + - name: KAFKA_HOSTS
  102 + valueFrom:
  103 + configMapKeyRef:
  104 + name: suplus-config
  105 + key: kafka.host
  106 + - name: KAFKA_PERFORMANCE_ID
  107 + valueFrom:
  108 + configMapKeyRef:
  109 + name: suplus-config
  110 + key: kafkaperformance.id
  111 + - name: KAFKA_BUSINESS_TOPIC
  112 + value: "mmm_business_prd"
  113 + - name: UCENTER_SERVICE_HOST
  114 + value: "https://suplus-ucenter-prd.fjmaimaimai.com"
  115 + - name: BUSINESS_ADMIN_SERVICE_HOST
  116 + value: "https://suplus-business-admin-prd.fjmaimaimai.com"
  117 + volumes:
  118 + - name: accesslogs
  119 + emptyDir: {}
  120 +