apiVersion: apps/v1 kind: Deployment metadata: labels: app: magic-api name: magic-api namespace: magic spec: progressDeadlineSeconds: 600 replicas: 1 revisionHistoryLimit: 10 selector: matchLabels: app: magic-api strategy: rollingUpdate: maxSurge: 25% maxUnavailable: 25% type: RollingUpdate template: metadata: creationTimestamp: null labels: app: magic-api spec: containers: - env: - name: POD_NAME valueFrom: fieldRef: apiVersion: v1 fieldPath: metadata.name - name: POD_NAMESPACE valueFrom: fieldRef: apiVersion: v1 fieldPath: metadata.namespace args: ["api"] 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-api 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-api-config name: config --- apiVersion: v1 kind: ConfigMap metadata: name: magic-api-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 } }