| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171 |
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- labels:
- app: magic-daily-job
- name: magic-daily-job
- namespace: magic
- spec:
- progressDeadlineSeconds: 600
- replicas: 1
- revisionHistoryLimit: 10
- selector:
- matchLabels:
- app: magic-daily-job
- strategy:
- rollingUpdate:
- maxSurge: 25%
- maxUnavailable: 25%
- type: RollingUpdate
- template:
- metadata:
- creationTimestamp: null
- labels:
- app: magic-daily-job
- spec:
- containers:
- - env:
- - name: POD_NAME
- valueFrom:
- fieldRef:
- apiVersion: v1
- fieldPath: metadata.name
- - name: POD_NAMESPACE
- valueFrom:
- fieldRef:
- apiVersion: v1
- fieldPath: metadata.namespace
- args: ["dailyJob"]
- image: 654654279104.dkr.ecr.ap-southeast-1.amazonaws.com/jcwork-test:tide-api-8f4ca0ab-117
- imagePullPolicy: Always
- lifecycle:
- preStop:
- exec:
- command:
- - /bin/bash
- - -c
- - sleep 20
- livenessProbe:
- failureThreshold: 3
- httpGet:
- path: /health/liveness
- port: 8090
- scheme: HTTP
- initialDelaySeconds: 30
- periodSeconds: 10
- successThreshold: 1
- timeoutSeconds: 10
- name: magic-daily-job
- ports:
- - containerPort: 8090
- protocol: TCP
- readinessProbe:
- failureThreshold: 3
- httpGet:
- path: /health/readiness
- port: 8090
- scheme: HTTP
- initialDelaySeconds: 30
- periodSeconds: 10
- successThreshold: 1
- timeoutSeconds: 10
- resources:
- limits:
- cpu: "1"
- memory: 2Gi
- requests:
- cpu: 50m
- memory: 500Mi
- terminationMessagePath: /dev/termination-log
- terminationMessagePolicy: File
- volumeMounts:
- - mountPath: /app/conf.d/app.json
- name: config
- readOnly: true
- subPath: app.json
- - mountPath: /app/conf.d/config.test.json
- name: config
- readOnly: true
- subPath: config.test.json
- dnsPolicy: ClusterFirst
- imagePullSecrets:
- - name: dockersecret
- restartPolicy: Always
- schedulerName: default-scheduler
- securityContext: {}
- terminationGracePeriodSeconds: 30
- volumes:
- - configMap:
- defaultMode: 384
- name: magic-daily-job-config
- name: config
- ---
- apiVersion: v1
- kind: ConfigMap
- metadata:
- name: magic-daily-job-config
- namespace: magic
- data:
- app.json: |-
- {
- "api_addr": 8090,
- "job_addr": 8090,
- "mod": "test",
- "router_prefix": ""
- }
- config.test.json: |-
- {
- "exchange": {
- "root_url": "https://www.coinvex.one",
- "appid": "2hhaivhKhb7Q",
- "secret": "m6iITfTEsMVHRqCxVj4GLqmY2KFuG4Mh",
- "redirect_url": "http://127.0.0.1:5173/login",
- "callback_url": "http://127.0.0.1:5173/callback"
- },
- "jwt": {
- "signing-key": "magic!@#¥Secret",
- "expires-time": 24,
- "issuer": "app"
- },
- "mysql": {
- "prefix": "",
- "port": "3306",
- "config": "charset=utf8mb4\u0026parseTime=True\u0026loc=Local",
- "db-name": "magic",
- "username": "magic_rw",
- "password": "uStGqJvd4Ura4YLhpQ",
- "path": "coinvex-mysql-vexnode-test.cluster-cbgwq2qs2ozz.ap-southeast-1.rds.amazonaws.com:3358",
- "engine": "",
- "log-mode": "error",
- "max-idle-conns": 10,
- "max-open-conns": 10,
- "singular": false,
- "log-zap": false
- },
- "redis": {
- "addr": "clustercfg.coinvex-redis-vexnode-test.h3ywp2.apse1.cache.amazonaws.com:6379",
- "password": "6D7AbG8mTjFjVRgg",
- "db": 0,
- "enabledTls": true,
- "enabledCluster": true,
- "cluster": [
- "clustercfg.coinvex-redis-vexnode-test.h3ywp2.apse1.cache.amazonaws.com:6379",
- "clustercfg.coinvex-redis-vexnode-test.h3ywp2.apse1.cache.amazonaws.com:6379"
- ]
- },
- "zap": {
- "tag_name": "app",
- "level": "debug",
- "prefix": "APP_",
- "format": "_json",
- "director": "logs",
- "encode_level": "LowercaseLevelEncoder",
- "stacktrace_key": "error",
- "max_age": 10,
- "rotation_size": 100,
- "rotation_count": 10,
- "show_line": true,
- "log_in_console": true,
- "log_output_file": true
- }
- }
|