commit bbd9ab4830a2aab448b28420ea7dc66ca5990887 Author: qxsugar Date: Mon Nov 4 18:40:21 2024 +0800 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..723ef36 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..598e418 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +# This Makefile provides convenient methods for common git operations + +.PHONY: add commit push + +# The default commit message +MESSAGE = "updated: `date '+%Y-%m-%d %H:%M:%S'`" + +# Add all changes to the staging area +add: + git add . + +# Commit changes with the provided message +commit: + git commit -m $(MESSAGE) + +# Push changes to the master branch +push: + git push origin master + +# Run add, commit, and push in one command +all: add commit push diff --git a/README.md b/README.md new file mode 100644 index 0000000..9a5ef56 --- /dev/null +++ b/README.md @@ -0,0 +1,107 @@ +### jenkins 配置 + +```yaml +user: admin +pwd: U!fM2g2* +``` + +### gitlab 配置 + +```yaml +user: root +pwd: GB2yN264aEXZ +``` + +### 机器配置 + +```bash +Host juno-base # qwer123#@!M + Hostname 43.143.113.34 + User root + Port 22 + +Host juno-uat # 7088588822a9d2E4 + Hostname 106.54.25.21 + User root + Port 22 + +Host juno-product-data # 7088588822a9d2E4 + Hostname 124.221.245.182 + User root + Port 22 + +Host juno-product-svc # 7088588822a9d2E4 + Hostname 124.221.225.216 + User root + Port 22 +``` + +### 腾讯云帐号 + +```yaml +id: 100035811614 +user: huangjingkai +pwd: 7z8CH57%j8X9HTgptDkehuYJWnUiJz^pj + +id2: 100030605182 +user2: mingtao +pwd2: qwer123#@!M +``` + +### 腾讯云docker hub + +```yaml +repo: ccr.ccs.tencentyun.com +namespace: juno +user: 100030649327 +pwd: DRn2Vg6iPubd +``` + +### drone 配置 +```yaml +appid: 5b3ea89d3c75b03e075eae7dad7b907a9f59aa57eac4d6d387608a6536a829ba +secret: gloas-d379c826969dd38fe2ca6c05ff68b969c4af093b98fd9cc174962138850dcb3b +callback: https://drone.lingpaike.com/login +``` + +### kibana 账号配置 +```text +sugar:$apr1$D/xE.jx6$ryMsW4q.rzrHXIXymhQM41 +liumingtao:$apr1$mm.Ip3e4$XNiiVWak8a9IfdEcZZrLD. +huminghui:$apr1$gHrCGuVZ$yJk4AMsHzyIyMvbastxSb0 +dufeng:$apr1$3L5vVFRq$7g/uxkc3bcyfVVZvzdjcR0 +huangrongzhi:$apr1$HEnEkVDJ$nuBWbzlre.7C7rkGQOGgm1 +zhouxiangguang:$apr1$o5vsfIN4$4xQCR9zrxsnyRlbjHjl2p/ +zhangzhe:$apr1$f.WACNwQ$Eg7yuapzsvziLU6iCclep0 + +## 上面的文本base64后丢到k8s的secrets +## htpasswd -nb $user $password 生成密码 + +sugar:meimima +liumingtao:TjvRST44Dbkf +huminghui:VeND2m24AGUv +dufeng:24ouCHrmJSeJ +huangrongzhi:Xwmicej2zduS +zhouxiangguang:e4K42UQjjtDG +zhangzhe:RJZtEpdADo8w +``` + +```yaml +### minio 配置 +admin-web: https://minio-admin.lingpaike.com +user: admin +password: hEWDoUr6iAwP + +### 访问配置 +endpoint: minio.lingpaike.com +buckets: +- uat # 测试环境 +- product # 正式环境 + +uat: + key: WnNnehJLuSaPVRizxXCm + secret: nf3uYJeVBBf8dvSxkumQch8EwCkfjIepLfmwjuQn +product: + key: n0Z66Sy1OtrIpp8eI9A4 + secret: IvIGohy8Ms17qLwAJ0aaCpqzctaTDygvypzNi8Oq +``` \ No newline at end of file diff --git a/backup/README.md b/backup/README.md new file mode 100644 index 0000000..34b283d --- /dev/null +++ b/backup/README.md @@ -0,0 +1,10 @@ +# 备份数据库 +0 8 * * * /root/backup/backup.sh + +# 或者用备份全部数据 +```bash +# 每天备份数据库 +0 8 * * * /usr/bin/docker exec postgres pg_dumpall -h /var/run/postgresql -U postgres > /usr/local/docker/pgdata-back/backup_$(date +\%Y\%m\%d).sql +# 删除10天前的数据库备份 +0 3 * * * find /usr/local/docker/pgdata-back/ -type f -name 'backup_*.sql' -mtime +10 -exec rm {} \; +``` \ No newline at end of file diff --git a/backup/backup.sh b/backup/backup.sh new file mode 100644 index 0000000..6b8bb85 --- /dev/null +++ b/backup/backup.sh @@ -0,0 +1,4 @@ +for db in juno_center_basic juno_center_sp juno_logs_center juno_material_center juno_order_server juno_user_center +do + /usr/bin/docker exec -u postgres -it postgres pg_dump $db > /root/backup/${db}_$(date +%Y%m%d).sql +done diff --git a/devops/daemon.json b/devops/daemon.json new file mode 100644 index 0000000..a009ab8 --- /dev/null +++ b/devops/daemon.json @@ -0,0 +1,10 @@ +{ + "registry-mirrors": [ + "https://registry.docker-cn.com" + ], + "log-driver": "json-file", + "log-opts": { + "max-size": "50m", + "max-file": "3" + } +}e \ No newline at end of file diff --git a/devops/database/docker-compose.yaml b/devops/database/docker-compose.yaml new file mode 100644 index 0000000..eb01b50 --- /dev/null +++ b/devops/database/docker-compose.yaml @@ -0,0 +1,26 @@ +version: '3' +services: + redis: + container_name: redis + image: redis:7.2.4 + command: redis-server /etc/redis/redis.conf --appendonly yes --requirepass E798C60F9EADAA07 + restart: always + ports: + - "6379:6379" + volumes: + - /usr/local/docker/redis/data:/data + - /usr/local/docker/redis/conf/redis.conf:/etc/redis/redis.conf + logging: + options: + max-size: "100m" + max-file: "2" + + postgres: + container_name: postgres + image: postgres:16.2 + ports: + - "5432:5432" + volumes: + - /usr/local/docker/pgdata:/var/lib/postgresql/data + environment: + - POSTGRES_PASSWORD=B2D83DE12717D043 \ No newline at end of file diff --git a/devops/drone/docker-compose.yaml b/devops/drone/docker-compose.yaml new file mode 100644 index 0000000..abf51e6 --- /dev/null +++ b/devops/drone/docker-compose.yaml @@ -0,0 +1,36 @@ +version: "3" +services: + drone-server: + container_name: drone-server + image: drone/drone:2 + environment: + DRONE_LOGS_DEBUG: true + DRONE_SERVER_HOST: drone.lingpaike.com + DRONE_SERVER_PROTO: https + DRONE_RPC_SECRET: bf5f296c-3e53-40da-94ee-f171fbb33fac + DRONE_GITLAB_CLIENT_ID: 5b3ea89d3c75b03e075eae7dad7b907a9f59aa57eac4d6d387608a6536a829ba + DRONE_GITLAB_CLIENT_SECRET: gloas-d379c826969dd38fe2ca6c05ff68b969c4af093b98fd9cc174962138850dcb3b + DRONE_GITLAB_SERVER: https://gitlab.lingpaike.com/ + DRONE_USER_CREATE: username:root,admin:true + DRONE_DATABASE_DRIVER: mysql + DRONE_DATABASE_DATASOURCE: root:rG8tAxtM9Js3@tcp(172.17.0.6:3306)/drone?parseTime=true + ports: + - "8082:80" + restart: always + volumes: + - /var/run/docker.sock:/var/run/docker.sock + + drone-runner: + container_name: drone-runner + image: drone/drone-runner-docker:1 + restart: always + environment: + DRONE_RPC_HOST: drone-server + DRONE_RPC_PROTO: http + DRONE_RPC_SECRET: bf5f296c-3e53-40da-94ee-f171fbb33fac + DRONE_RUNNER_CAPACITY: 2 + DRONE_RUNNER_NAME: default-agent + DRONE_DATABASE_DRIVER: mysql + DRONE_DATABASE_DATASOURCE: root:rG8tAxtM9Js3@tcp(172.17.0.6:3306)/drone?parseTime=true + volumes: + - /var/run/docker.sock:/var/run/docker.sock diff --git a/devops/drone/ingress.yaml b/devops/drone/ingress.yaml new file mode 100644 index 0000000..debde77 --- /dev/null +++ b/devops/drone/ingress.yaml @@ -0,0 +1,46 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: juno-drone + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod +spec: + tls: + - hosts: + - drone.lingpaike.com + secretName: drone.lingpaike.com + rules: + - host: drone.lingpaike.com + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: juno-drone + port: + number: 80 +--- +apiVersion: v1 +kind: Service +metadata: + name: juno-drone +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: http + +--- +apiVersion: v1 +kind: Endpoints +metadata: + name: juno-drone +subsets: + - addresses: + - ip: 172.17.0.6 + ports: + - name: http + port: 8082 + protocol: TCP \ No newline at end of file diff --git a/devops/elk/docker/docker-compose.yaml b/devops/elk/docker/docker-compose.yaml new file mode 100644 index 0000000..27fc9b1 --- /dev/null +++ b/devops/elk/docker/docker-compose.yaml @@ -0,0 +1,55 @@ +version: "3" +services: + elasticsearch: + container_name: elasticsearch + image: "ccr.ccs.tencentyun.com/wwww/public-app:elasticsearch-7.9.2" + environment: + - node.name=elasticsearch + - cluster.name=es-docker-cluster + - discovery.type=single-node + - bootstrap.memory_lock=true + - "ES_JAVA_OPTS=-Xms512m -Xmx512m" + volumes: + - /etc/localtime:/etc/localtime + - /usr/local/docker/es/data:/usr/share/elasticsearch/data + ports: + - "9200:9200" + - "9300:9300" + deploy: + resources: + limits: + cpus: "2.0" + memory: 2g + + logstash: + container_name: logstash + image: "ccr.ccs.tencentyun.com/wwww/public-app:logstash-7.9.2" + volumes: + - ./logstash.conf:/usr/share/logstash/pipeline/logstash.conf + ports: + - "5044:5044" + - "12345:12345" + links: + - elasticsearch + depends_on: + - elasticsearch + deploy: + resources: + limits: + cpus: "2.0" + memory: 2g + + kibana: + container_name: kibana + image: "ccr.ccs.tencentyun.com/wwww/public-app:kibana-7.9.2" + environment: + - ELASTICSEARCH_URL=http://elasticsearch:9200 + volumes: + - /etc/localtime:/etc/localtime + - ./kibana.yml:/usr/share/kibana/config/kibana.yml + ports: + - "5601:5601" + links: + - elasticsearch + depends_on: + - elasticsearch diff --git a/devops/elk/docker/kibana.yml b/devops/elk/docker/kibana.yml new file mode 100644 index 0000000..6ff9d1f --- /dev/null +++ b/devops/elk/docker/kibana.yml @@ -0,0 +1,113 @@ +# Kibana is served by a back end server. This setting specifies the port to use. +server.port: 5601 + +# Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values. +# The default is 'localhost', which usually means remote machines will not be able to connect. +# To allow connections from remote users, set this parameter to a non-loopback address. +server.host: "0.0.0.0" + +# Enables you to specify a path to mount Kibana at if you are running behind a proxy. +# Use the `server.rewriteBasePath` setting to tell Kibana if it should remove the basePath +# from requests it receives, and to prevent a deprecation warning at startup. +# This setting cannot end in a slash. +# server.basePath: "" + +# Specifies whether Kibana should rewrite requests that are prefixed with +# `server.basePath` or require that they are rewritten by your reverse proxy. +# This setting was effectively always `false` before Kibana 6.3 and will +# default to `true` starting in Kibana 7.0. +server.rewriteBasePath: false + +# The maximum payload size in bytes for incoming server requests. +server.maxPayloadBytes: 1048576 + +# The Kibana server's name. This is used for display purposes. +# server.name: "your-hostname" + +# The URLs of the Elasticsearch instances to use for all your queries. +elasticsearch.hosts: ["http://elasticsearch:9200"] + +# When this setting's value is true Kibana uses the hostname specified in the server.host +# setting. When the value of this setting is false, Kibana uses the hostname of the host +# that connects to this Kibana instance. +elasticsearch.preserveHost: true + +# Kibana uses an index in Elasticsearch to store saved searches, visualizations and +# dashboards. Kibana creates a new index if the index doesn't already exist. +kibana.index: ".kibana7" + +# The default application to load. +kibana.defaultAppId: "home" + +# If your Elasticsearch is protected with basic authentication, these settings provide +# the username and password that the Kibana server uses to perform maintenance on the Kibana +# index at startup. Your Kibana users still need to authenticate with Elasticsearch, which +# is proxied through the Kibana server. +#elasticsearch.username: "user" +#elasticsearch.password: "pass" + +# Enables SSL and paths to the PEM-format SSL certificate and SSL key files, respectively. +# These settings enable SSL for outgoing requests from the Kibana server to the browser. +#server.ssl.enabled: false +#server.ssl.certificate: /path/to/your/server.crt +#server.ssl.key: /path/to/your/server.key + +# Optional settings that provide the paths to the PEM-format SSL certificate and key files. +# These files validate that your Elasticsearch backend uses the same key files. +#elasticsearch.ssl.certificate: /path/to/your/client.crt +#elasticsearch.ssl.key: /path/to/your/client.key + +# Optional setting that enables you to specify a path to the PEM file for the certificate +# authority for your Elasticsearch instance. +#elasticsearch.ssl.certificateAuthorities: [ "/path/to/your/CA.pem" ] + +# To disregard the validity of SSL certificates, change this setting's value to 'none'. +#elasticsearch.ssl.verificationMode: full + +# Time in milliseconds to wait for Elasticsearch to respond to pings. Defaults to the value of +# the elasticsearch.requestTimeout setting. +elasticsearch.pingTimeout: 1500 + +# Time in milliseconds to wait for responses from the back end or Elasticsearch. This value +# must be a positive integer. +elasticsearch.requestTimeout: 300000 + +# List of Kibana client-side headers to send to Elasticsearch. To send *no* client-side +# headers, set this value to [] (an empty list). +# elasticsearch.requestHeadersWhitelist: [ authorization ] + +# Header names and values that are sent to Elasticsearch. Any custom headers cannot be overwritten +# by client-side headers, regardless of the elasticsearch.requestHeadersWhitelist configuration. +elasticsearch.customHeaders: {} + +# Time in milliseconds for Elasticsearch to wait for responses from shards. Set to 0 to disable. +elasticsearch.shardTimeout: 30000 + +# Time in milliseconds to wait for Elasticsearch at Kibana startup before retrying. +elasticsearch.startupTimeout: 5000 + +# Logs queries sent to Elasticsearch. Requires logging.verbose set to true. +elasticsearch.logQueries: false + +# Specifies the path where Kibana creates the process ID file. +# pid.file: /var/run/kibana.pid + +# Enables you specify a file where Kibana stores log output. +logging.dest: stdout + +# Set the value of this setting to true to suppress all logging output. +logging.silent: false + +# Set the value of this setting to true to suppress all logging output other than error messages. +logging.quiet: false + +# Set the value of this setting to true to log all events, including system usage information +# and all requests. +logging.verbose: false + +# Set the interval in milliseconds to sample system and process performance +# metrics. Minimum is 100ms. Defaults to 5000. +ops.interval: 5000 + +# Specifies locale to be used for all localizable strings, dates and number formats. +i18n.locale: "zh-CN" diff --git a/devops/elk/docker/logstash.conf b/devops/elk/docker/logstash.conf new file mode 100644 index 0000000..d847baf --- /dev/null +++ b/devops/elk/docker/logstash.conf @@ -0,0 +1,56 @@ +input { + http{ + user => "juno" + password => "tr0ngP4ssWD" + } + beats { + port => "5044" + } + tcp { + port => "12345" + } +} + +filter{ + grok { + match => { "message" => "%{TIMESTAMP_ISO8601:timestamp} %{WORD:logtype} F %{GREEDYDATA:json_string}" } + } + json { + source => "json_string" + target => "msg" + } + if ![msg] { + drop { } + } + # 如果 type 字段的值以 uat 开头,并且 msg['level'] 是 info,则删除这个事件 + if ["type"] =~ /^uat/ and ["msg"]["level"] == "INFO" { + drop { } + } + mutate { + remove_field => ["event"] + remove_field => ["original"] + remove_field => ["tags"] + remove_field => ["input"] + remove_field => ["json_string"] + remove_field => ["log"] + remove_field => ["agent"] + remove_field => ["ecs"] + remove_field => ["cloud"] + + rename => ["host", "server"] + add_field => { + "host" => "%{[server][name]}" + "[@metadata][target_index]" => "%{[type]}-%{+YYYY.MM.dd}" + } + remove_field => ["server"] + remove_field => ["message"] + } +} + +output { + elasticsearch { + hosts => ["http://elasticsearch:9200"] + index => "%{[@metadata][target_index]}" + } + stdout { codec => rubydebug } +} diff --git a/devops/elk/kube/filebeat/filebeat-rbac.yaml b/devops/elk/kube/filebeat/filebeat-rbac.yaml new file mode 100644 index 0000000..4e693e7 --- /dev/null +++ b/devops/elk/kube/filebeat/filebeat-rbac.yaml @@ -0,0 +1,34 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: juno-filebeat + namespace: default +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: juno-filebeat + labels: + k8s-app: juno-filebeat +rules: + - apiGroups: [""] # "" indicates the core API group + resources: + - namespaces + - pods + verbs: + - get + - watch + - list +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: juno-filebeat +subjects: + - kind: ServiceAccount + name: juno-filebeat + namespace: default +roleRef: + kind: ClusterRole + name: juno-filebeat + apiGroup: rbac.authorization.k8s.io diff --git a/devops/elk/kube/filebeat/filebeat.yaml b/devops/elk/kube/filebeat/filebeat.yaml new file mode 100644 index 0000000..4a69a9c --- /dev/null +++ b/devops/elk/kube/filebeat/filebeat.yaml @@ -0,0 +1,92 @@ +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: juno-filebeat +spec: + selector: + matchLabels: + app: juno-filebeat + template: + metadata: + labels: + app: juno-filebeat + spec: + serviceAccountName: juno-filebeat + containers: + - name: june-filebeat + args: + - -e + - -E + - http.enabled=true + env: + - name: POD_NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + - name: NODE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName + image: ccr.ccs.tencentyun.com/juno/public:filebeat-7.1.0 + imagePullPolicy: IfNotPresent +# livenessProbe: +# exec: +# command: +# - sh +# - -c +# - | +# #!/usr/bin/env bash -e +# curl --fail 127.0.0.1:5044 +# failureThreshold: 3 +# initialDelaySeconds: 10 +# periodSeconds: 10 +# successThreshold: 1 +# timeoutSeconds: 5 +# readinessProbe: +# exec: +# command: +# - sh +# - -c +# - | +# #!/usr/bin/env bash -e +# filebeat test output +# failureThreshold: 3 +# initialDelaySeconds: 10 +# periodSeconds: 10 +# successThreshold: 1 +# timeoutSeconds: 5 + resources: + limits: + cpu: "2" + memory: 4000Mi + requests: + cpu: 50m + memory: 40Mi + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + securityContext: + runAsUser: 0 + volumeMounts: + - mountPath: /usr/share/filebeat/filebeat.yml + name: filebeat-config + readOnly: true + subPath: filebeat.yml + - mountPath: /usr/share/filebeat/data + name: data + - mountPath: /var/log + name: var-log + readOnly: true + volumes: + - configMap: + name: juno-filebeat-config + name: filebeat-config + - hostPath: + path: /var/lib/juno-filebeat + type: DirectoryOrCreate + name: data + - hostPath: + path: /var/log + type: "" + name: var-log diff --git a/devops/elk/kube/filebeat/product/filebeat-configmap.yaml b/devops/elk/kube/filebeat/product/filebeat-configmap.yaml new file mode 100644 index 0000000..ad1fd78 --- /dev/null +++ b/devops/elk/kube/filebeat/product/filebeat-configmap.yaml @@ -0,0 +1,137 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: juno-filebeat-config +data: + filebeat.yml: | + logging.level: debug + filebeat.inputs: + - type: log + fields: + type: juno-admin-gateway + fields_under_root: true + paths: + - /var/log/containers/juno-admin-gateway*.log + processors: + - add_kubernetes_metadata: + in_cluster: true + symlinks: true + - type: log + fields: + type: juno-basic + fields_under_root: true + paths: + - /var/log/containers/juno-basic*.log + processors: + - add_kubernetes_metadata: + in_cluster: true + symlinks: true + - type: log + fields: + type: juno-gateway + fields_under_root: true + paths: + - /var/log/containers/juno-gateway*.log + processors: + - add_kubernetes_metadata: + in_cluster: true + symlinks: true + - type: log + fields: + type: juno-job + fields_under_root: true + paths: + - /var/log/containers/juno-job*.log + processors: + - add_kubernetes_metadata: + in_cluster: true + symlinks: true + - type: log + fields: + type: juno-material + fields_under_root: true + paths: + - /var/log/containers/juno-material*.log + processors: + - add_kubernetes_metadata: + in_cluster: true + symlinks: true + - type: log + fields: + type: juno-message + fields_under_root: true + paths: + - /var/log/containers/juno-message*.log + processors: + - add_kubernetes_metadata: + in_cluster: true + symlinks: true + - type: log + fields: + type: juno-mina-gateway + fields_under_root: true + paths: + - /var/log/containers/juno-mina-gateway*.log + processors: + - add_kubernetes_metadata: + in_cluster: true + symlinks: true + - type: log + fields: + type: juno-order + fields_under_root: true + paths: + - /var/log/containers/juno-order*.log + processors: + - add_kubernetes_metadata: + in_cluster: true + symlinks: true + - type: log + fields: + type: juno-report + fields_under_root: true + paths: + - /var/log/containers/juno-report*.log + processors: + - add_kubernetes_metadata: + in_cluster: true + symlinks: true + - type: log + fields: + type: juno-sp + fields_under_root: true + paths: + - /var/log/containers/juno-sp*.log + processors: + - add_kubernetes_metadata: + in_cluster: true + symlinks: true + - type: log + fields: + type: juno-user + fields_under_root: true + paths: + - /var/log/containers/juno-user*.log + processors: + - add_kubernetes_metadata: + in_cluster: true + symlinks: true + - type: log + fields: + type: juno-outside + fields_under_root: true + paths: + - /var/log/containers/juno-outside*.log + processors: + - add_kubernetes_metadata: + in_cluster: true + symlinks: true + processors: + - add_cloud_metadata: + - add_host_metadata: + + output.logstash: + hosts: + - "43.143.113.34:5044" + username: juno + password: tr0ngP4ssWD diff --git a/devops/elk/kube/filebeat/uat/filebeat-configmap.yaml b/devops/elk/kube/filebeat/uat/filebeat-configmap.yaml new file mode 100644 index 0000000..625df02 --- /dev/null +++ b/devops/elk/kube/filebeat/uat/filebeat-configmap.yaml @@ -0,0 +1,137 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: juno-filebeat-config +data: + filebeat.yml: | + logging.level: debug + filebeat.inputs: + - type: log + fields: + type: uat-juno-admin-gateway + fields_under_root: true + paths: + - /var/log/containers/juno-admin-gateway*.log + processors: + - add_kubernetes_metadata: + in_cluster: true + symlinks: true + - type: log + fields: + type: uat-juno-basic + fields_under_root: true + paths: + - /var/log/containers/juno-basic*.log + processors: + - add_kubernetes_metadata: + in_cluster: true + symlinks: true + - type: log + fields: + type: uat-juno-gateway + fields_under_root: true + paths: + - /var/log/containers/juno-gateway*.log + processors: + - add_kubernetes_metadata: + in_cluster: true + symlinks: true + - type: log + fields: + type: uat-juno-job + fields_under_root: true + paths: + - /var/log/containers/juno-job*.log + processors: + - add_kubernetes_metadata: + in_cluster: true + symlinks: true + - type: log + fields: + type: uat-juno-material + fields_under_root: true + paths: + - /var/log/containers/juno-material*.log + processors: + - add_kubernetes_metadata: + in_cluster: true + symlinks: true + - type: log + fields: + type: uat-juno-message + fields_under_root: true + paths: + - /var/log/containers/juno-message*.log + processors: + - add_kubernetes_metadata: + in_cluster: true + symlinks: true + - type: log + fields: + type: uat-juno-mina-gateway + fields_under_root: true + paths: + - /var/log/containers/juno-mina-gateway*.log + processors: + - add_kubernetes_metadata: + in_cluster: true + symlinks: true + - type: log + fields: + type: uat-juno-order + fields_under_root: true + paths: + - /var/log/containers/juno-order*.log + processors: + - add_kubernetes_metadata: + in_cluster: true + symlinks: true + - type: log + fields: + type: uat-juno-report + fields_under_root: true + paths: + - /var/log/containers/juno-report*.log + processors: + - add_kubernetes_metadata: + in_cluster: true + symlinks: true + - type: log + fields: + type: uat-juno-sp + fields_under_root: true + paths: + - /var/log/containers/juno-sp*.log + processors: + - add_kubernetes_metadata: + in_cluster: true + symlinks: true + - type: log + fields: + type: uat-juno-user + fields_under_root: true + paths: + - /var/log/containers/juno-user*.log + processors: + - add_kubernetes_metadata: + in_cluster: true + symlinks: true + - type: log + fields: + type: uat-juno-outside + fields_under_root: true + paths: + - /var/log/containers/juno-outside*.log + processors: + - add_kubernetes_metadata: + in_cluster: true + symlinks: true + processors: + - add_cloud_metadata: + - add_host_metadata: + + output.logstash: + hosts: + - "172.17.0.6:5044" + username: juno + password: tr0ngP4ssWD \ No newline at end of file diff --git a/devops/elk/kube/kibana/kibana-basic-auth.yaml b/devops/elk/kube/kibana/kibana-basic-auth.yaml new file mode 100644 index 0000000..6b4eda1 --- /dev/null +++ b/devops/elk/kube/kibana/kibana-basic-auth.yaml @@ -0,0 +1,16 @@ +# kibana的basic auth +apiVersion: traefik.containo.us/v1alpha1 +kind: Middleware +metadata: + name: juno-auth +spec: + basicAuth: + secret: juno-auth-secret +--- +apiVersion: v1 +kind: Secret +metadata: + name: juno-auth-secret +data: + users: c3VnYXI6JGFwcjEkRC94RS5qeDYkcnlNc1c0cS5yenJIWElYeW1oUU00MQpsaXVtaW5ndGFvOiRhcHIxJG1tLklwM2U0JFhOaWlWV2FrOGE5SWZkRWNaWnJMRC4KaHVtaW5naHVpOiRhcHIxJGdIckNHdVZaJHlKazRBTXNIenlJeU12YmFzdHhTYjAKZHVmZW5nOiRhcHIxJDNMNXZWRlJxJDdnL3V4a2MzYmN5ZlZWWnZ6ZGpjUjAKaHVhbmdyb25nemhpOiRhcHIxJEhFbkVrVkRKJG51QldiemxyZS43Qzdya0dRT0dnbTEKemhvdXhpYW5nZ3Vhbmc6JGFwcjEkbzV2c2ZJTjQkNHhRQ1I5enJ4c255UmxiakhqbDJwLwp6aGFuZ3poZTokYXByMSRmLldBQ053USRFZzd5dWFwenN2emlMVTZpQ2NsZXAw + diff --git a/devops/elk/kube/kibana/kibana-ingress.yaml b/devops/elk/kube/kibana/kibana-ingress.yaml new file mode 100644 index 0000000..c0675fe --- /dev/null +++ b/devops/elk/kube/kibana/kibana-ingress.yaml @@ -0,0 +1,48 @@ +# kibana的ingress +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: juno-kibana + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + traefik.ingress.kubernetes.io/router.middlewares: default-juno-auth@kubernetescrd +spec: + tls: + - hosts: + - kibana.lingpaike.com + secretName: kibana.lingpaike.com + rules: + - host: kibana.lingpaike.com + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: juno-kibana + port: + number: 80 +--- +apiVersion: v1 +kind: Service +metadata: + name: juno-kibana +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: http + +--- +apiVersion: v1 +kind: Endpoints +metadata: + name: juno-kibana +subsets: + - addresses: + - ip: 172.17.0.6 + ports: + - name: http + port: 5601 + protocol: TCP \ No newline at end of file diff --git a/devops/elk/policy.bash b/devops/elk/policy.bash new file mode 100644 index 0000000..98ae6c0 --- /dev/null +++ b/devops/elk/policy.bash @@ -0,0 +1,51 @@ +curl -X PUT "localhost:9200/_ilm/policy/my_policy_7d" -H 'Content-Type: application/json' -d' +{ + "policy": { + "phases": { + "delete": { + "min_age": "7d", + "actions": { + "delete": {} + } + } + } + } +} +' + +curl -X PUT "localhost:9200/_ilm/policy/my_policy_15d" -H 'Content-Type: application/json' -d' +{ + "policy": { + "phases": { + "delete": { + "min_age": "15d", + "actions": { + "delete": {} + } + } + } + } +} +' + +curl -X PUT "localhost:9200/_index_template/my_template_7d" -H 'Content-Type: application/json' -d' +{ + "index_patterns": ["uat-*"], + "template": { + "settings": { + "index.lifecycle.name": "my_policy_7d" + } + } +} +' + +curl -X PUT "localhost:9200/_index_template/my_template_15d" -H 'Content-Type: application/json' -d' +{ + "index_patterns": ["juno-*"], + "template": { + "settings": { + "index.lifecycle.name": "my_policy_15d" + } + } +} +' \ No newline at end of file diff --git a/devops/gitlab/docker-compose.yaml b/devops/gitlab/docker-compose.yaml new file mode 100644 index 0000000..4114adc --- /dev/null +++ b/devops/gitlab/docker-compose.yaml @@ -0,0 +1,21 @@ +version: "3" +services: + gitlab: + container_name: gitlab + image: gitlab/gitlab-ce:16.10.2-ce.0 + restart: always + privileged: true + ports: + - "9980:80" + - "9922:22" + volumes: + - /usr/local/docker/gitlab/etc:/etc/gitlab + - /usr/local/docker/gitlab/log:/var/log/gitlab + - /usr/local/docker/gitlab/opt:/var/opt/gitlab + environment: + - TZ=Asia/Shanghai + deploy: + resources: + limits: + cpus: '4' + memory: 4g diff --git a/devops/gitlab/ingress.yaml b/devops/gitlab/ingress.yaml new file mode 100644 index 0000000..ee7a3b6 --- /dev/null +++ b/devops/gitlab/ingress.yaml @@ -0,0 +1,46 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: juno-gitlab + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod +spec: + tls: + - hosts: + - gitlab.lingpaike.com + secretName: gitlab.lingpaike.com + rules: + - host: gitlab.lingpaike.com + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: juno-gitlab + port: + number: 80 +--- +apiVersion: v1 +kind: Service +metadata: + name: juno-gitlab +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: http + +--- +apiVersion: v1 +kind: Endpoints +metadata: + name: juno-gitlab +subsets: + - addresses: + - ip: 172.17.0.6 + ports: + - name: http + port: 9980 + protocol: TCP \ No newline at end of file diff --git a/devops/minio/docker-compose.yaml b/devops/minio/docker-compose.yaml new file mode 100644 index 0000000..8a9b1e5 --- /dev/null +++ b/devops/minio/docker-compose.yaml @@ -0,0 +1,14 @@ +version: '3' +services: + juno-minio: + container_name: juno-minio + image: docker-registry-1.ppapi.cn/minio/minio:RELEASE.2024-07-26T20-48-21Z + command: ["minio", "server", "--console-address", ":9001", "/data1"] + ports: + - "9000:9000" + - "9001:9001" + environment: + MINIO_ROOT_USER: admin + MINIO_ROOT_PASSWORD: hEWDoUr6iAwP + volumes: + - /data/minio/data1:/data1 diff --git a/devops/minio/ingress.yaml b/devops/minio/ingress.yaml new file mode 100644 index 0000000..51f7023 --- /dev/null +++ b/devops/minio/ingress.yaml @@ -0,0 +1,76 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: juno-minio + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod +spec: + rules: + - host: minio.lingpaike.com + http: + paths: + - backend: + service: + name: juno-minio + port: + number: 9000 + path: / + pathType: Prefix + tls: + - secretName: minio.lingpaike.com + hosts: + - minio.lingpaike.com +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: juno-minio-admin + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod +spec: + rules: + - host: minio-admin.lingpaike.com + http: + paths: + - backend: + service: + name: juno-minio + port: + number: 9001 + path: / + pathType: Prefix + tls: + - secretName: minio-admin.lingpaike.com + hosts: + - minio-admin.lingpaike.com +--- +apiVersion: v1 +kind: Service +metadata: + name: juno-minio +spec: + ports: + - name: p9000 + port: 9000 + protocol: TCP + targetPort: 9000 + - name: p9001 + port: 9001 + protocol: TCP + targetPort: 9001 + +--- +apiVersion: v1 +kind: Endpoints +metadata: + name: juno-minio +subsets: + - addresses: + - ip: 172.17.0.6 + ports: + - name: p9000 + port: 9000 + protocol: TCP + - name: p9001 + port: 9001 + protocol: TCP \ No newline at end of file diff --git a/devops/mysql/docker-compose.yaml b/devops/mysql/docker-compose.yaml new file mode 100644 index 0000000..d6f55bd --- /dev/null +++ b/devops/mysql/docker-compose.yaml @@ -0,0 +1,14 @@ +version: "3" +services: + mysql: + container_name: mysql + image: ccr.ccs.tencentyun.com/juno/public:mysql-8.0 + environment: + TZ: Asia/Shanghai + MYSQL_ROOT_PASSWORD: rG8tAxtM9Js3 + MYSQL_USER: lpk + MYSQL_PASSWORD: rG8tAxtM9Js3 + volumes: + - ./mysql:/var/lib/mysql + ports: + - "3306:3306" \ No newline at end of file diff --git a/product/admin/gateway/deployment.yaml b/product/admin/gateway/deployment.yaml new file mode 100644 index 0000000..f097700 --- /dev/null +++ b/product/admin/gateway/deployment.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-admin-gateway +spec: + replicas: 1 + selector: + matchLabels: + app: juno-admin-gateway + template: + metadata: + labels: + app: juno-admin-gateway + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/admin-gateway:uat + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8011 + name: http + protocol: TCP + livenessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + resources: + limits: + cpu: "2" + memory: 2Gi + requests: + cpu: 1m + memory: 1Mi \ No newline at end of file diff --git a/product/admin/gateway/service.yaml b/product/admin/gateway/service.yaml new file mode 100644 index 0000000..49d22a0 --- /dev/null +++ b/product/admin/gateway/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-admin-gateway +spec: + selector: + app: juno-admin-gateway + ports: + - name: http + port: 8011 + protocol: TCP + targetPort: http + - name: http80 + port: 80 + protocol: TCP + targetPort: http \ No newline at end of file diff --git a/product/admin/ingress.yaml b/product/admin/ingress.yaml new file mode 100644 index 0000000..ddcdfd8 --- /dev/null +++ b/product/admin/ingress.yaml @@ -0,0 +1,94 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: juno-admin + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + traefik.ingress.kubernetes.io/router.middlewares: default-cors@kubernetescrd, default-strip-api@kubernetescrd +spec: + rules: + - host: admin.lingpaike.com + http: + paths: + - backend: + service: + name: juno-admin-gateway + port: + number: 8011 + pathType: Prefix + path: /api + - backend: + service: + name: juno-admin-web + port: + number: 80 + path: / + pathType: Prefix + # 也许应该去掉 + - backend: + service: + name: juno-file + port: + number: 80 + pathType: Prefix + path: /banner + - backend: + service: + name: juno-admin-gateway + port: + number: 8011 + pathType: Prefix + path: /doc.html + - backend: + service: + name: juno-admin-gateway + port: + number: 8011 + pathType: Prefix + path: /swagger + - backend: + service: + name: juno-admin-gateway + port: + number: 8011 + pathType: Prefix + path: /swagger-ui.html + - backend: + service: + name: juno-admin-gateway + port: + number: 8011 + pathType: Prefix + path: /webjars + - backend: + service: + name: juno-admin-gateway + port: + number: 8011 + pathType: Prefix + path: /v2 + - backend: + service: + name: juno-admin-gateway + port: + number: 8011 + pathType: Prefix + path: /swagger-resources + - backend: + service: + name: juno-admin-gateway + port: + number: 8011 + pathType: Prefix + path: /v3 + - backend: + service: + name: juno-admin-gateway + port: + number: 8011 + pathType: Prefix + path: /swaggers + tls: + - secretName: admin.lingpaike.com + hosts: + - admin.lingpaike.com diff --git a/product/admin/web/deployment.yaml b/product/admin/web/deployment.yaml new file mode 100644 index 0000000..f6a6fb7 --- /dev/null +++ b/product/admin/web/deployment.yaml @@ -0,0 +1,46 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-admin-web +spec: + replicas: 1 + selector: + matchLabels: + app: juno-admin-web + template: + metadata: + labels: + app: juno-admin-web + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/admin-web:latest + imagePullPolicy: IfNotPresent + ports: + - containerPort: 80 + name: http + protocol: TCP + livenessProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + resources: + limits: + cpu: "1" + memory: 1Gi + requests: + cpu: 1m + memory: 1Mi + diff --git a/product/admin/web/service.yaml b/product/admin/web/service.yaml new file mode 100644 index 0000000..be42ceb --- /dev/null +++ b/product/admin/web/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-admin-web +spec: + selector: + app: juno-admin-web + ports: + - name: http + port: 80 + protocol: TCP + targetPort: http diff --git a/product/basic/deployment.yaml b/product/basic/deployment.yaml new file mode 100644 index 0000000..f9d1307 --- /dev/null +++ b/product/basic/deployment.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-basic +spec: + replicas: 1 + selector: + matchLabels: + app: juno-basic + template: + metadata: + labels: + app: juno-basic + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/basic:uat + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8070 + name: http + protocol: TCP + livenessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + resources: + limits: + cpu: "2" + memory: 2Gi + requests: + cpu: 1m + memory: 1Mi diff --git a/product/basic/service.yaml b/product/basic/service.yaml new file mode 100644 index 0000000..44abc67 --- /dev/null +++ b/product/basic/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-center-basic +spec: + selector: + app: juno-basic + ports: + - name: http + port: 8070 + protocol: TCP + targetPort: http + - name: http80 + port: 80 + protocol: TCP + targetPort: http \ No newline at end of file diff --git a/product/database.yaml b/product/database.yaml new file mode 100644 index 0000000..93184d2 --- /dev/null +++ b/product/database.yaml @@ -0,0 +1,38 @@ +kind: Service +apiVersion: v1 +metadata: + name: juno-postgres +spec: + ports: + - port: 5432 + targetPort: 5432 +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: juno-postgres +subsets: + - addresses: + - ip: 172.17.0.16 + ports: + - port: 5432 + +--- +kind: Service +apiVersion: v1 +metadata: + name: juno-redis +spec: + ports: + - port: 6379 + targetPort: 6379 +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: juno-redis +subsets: + - addresses: + - ip: 172.17.0.16 + ports: + - port: 6379 \ No newline at end of file diff --git a/product/file/deployment.yaml b/product/file/deployment.yaml new file mode 100644 index 0000000..1fe2021 --- /dev/null +++ b/product/file/deployment.yaml @@ -0,0 +1,52 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-file +spec: + replicas: 1 + selector: + matchLabels: + app: juno-file + template: + metadata: + labels: + app: juno-file + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/basic:nginx + imagePullPolicy: IfNotPresent + ports: + - containerPort: 80 + name: http + protocol: TCP +# livenessProbe: +# httpGet: +# path: / +# port: http +# initialDelaySeconds: 20 +# periodSeconds: 10 +# timeoutSeconds: 5 +# readinessProbe: +# httpGet: +# path: / +# port: http +# initialDelaySeconds: 20 +# periodSeconds: 10 +# timeoutSeconds: 5 + resources: + limits: + cpu: "2" + memory: 2Gi + requests: + cpu: 1m + memory: 1Mi + volumeMounts: + - mountPath: /usr/share/nginx/html + name: ftp + volumes: + - name: ftp + hostPath: + path: /ftp \ No newline at end of file diff --git a/product/file/ingress.yaml b/product/file/ingress.yaml new file mode 100644 index 0000000..0586092 --- /dev/null +++ b/product/file/ingress.yaml @@ -0,0 +1,23 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: juno-file + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + traefik.ingress.kubernetes.io/router.middlewares: default-cors@kubernetescrd +spec: + tls: + - hosts: + - file.lingpaike.com + secretName: file.lingpaike.com + rules: + - host: file.lingpaike.com + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: juno-file + port: + number: 80 \ No newline at end of file diff --git a/product/file/service.yaml b/product/file/service.yaml new file mode 100644 index 0000000..2655294 --- /dev/null +++ b/product/file/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-file +spec: + selector: + app: juno-file + ports: + - name: http + port: 80 + protocol: TCP + targetPort: http diff --git a/product/gateway/gateway/deployment.yaml b/product/gateway/gateway/deployment.yaml new file mode 100644 index 0000000..7026394 --- /dev/null +++ b/product/gateway/gateway/deployment.yaml @@ -0,0 +1,49 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-gateway +spec: + replicas: 1 + selector: + matchLabels: + app: juno-gateway + template: + metadata: + labels: + app: juno-gateway + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/gateway:uat + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8010 + name: http + protocol: TCP + - containerPort: 9092 + name: socket + protocol: TCP + livenessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + resources: + limits: + cpu: "2" + memory: 2Gi + requests: + cpu: 1m + memory: 1Mi + diff --git a/product/gateway/gateway/service.yaml b/product/gateway/gateway/service.yaml new file mode 100644 index 0000000..829857d --- /dev/null +++ b/product/gateway/gateway/service.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-gateway +spec: + selector: + app: juno-gateway + ports: + - name: http + port: 8010 + protocol: TCP + targetPort: http + - name: socket + protocol: TCP + port: 9092 + targetPort: socket + - name: http80 + port: 80 + protocol: TCP + targetPort: http \ No newline at end of file diff --git a/product/gateway/ingress-www.yaml b/product/gateway/ingress-www.yaml new file mode 100644 index 0000000..9f1c75e --- /dev/null +++ b/product/gateway/ingress-www.yaml @@ -0,0 +1,23 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: juno-www + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + traefik.ingress.kubernetes.io/router.middlewares: default-cors@kubernetescrd, default-strip-api@kubernetescrd +spec: + tls: + - hosts: + - www.lingpaike.com + secretName: www.lingpaike.com + rules: + - host: www.lingpaike.com + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: juno-www + port: + number: 80 diff --git a/product/gateway/ingress.yaml b/product/gateway/ingress.yaml new file mode 100644 index 0000000..28b75cf --- /dev/null +++ b/product/gateway/ingress.yaml @@ -0,0 +1,107 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: juno-saas + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + traefik.ingress.kubernetes.io/router.middlewares: default-cors@kubernetescrd, default-strip-api@kubernetescrd +spec: + tls: + - hosts: + - saas.lingpaike.com + secretName: saas.lingpaike.com + rules: + - host: saas.lingpaike.com + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: juno-web-ui + port: + number: 80 + - pathType: Prefix + path: "/api" + backend: + service: + name: juno-gateway + port: + number: 8010 + - pathType: Prefix + path: "/websocket" + backend: + service: + name: juno-gateway + port: + number: 8010 + - pathType: Prefix + path: "/socket.io" + backend: + service: + name: juno-gateway + port: + number: 9092 + - pathType: Prefix + path: "/chat" + backend: + service: + name: juno-gateway + port: + number: 9092 + - backend: + service: + name: juno-gateway + port: + number: 8010 + pathType: Prefix + path: /doc.html + - backend: + service: + name: juno-gateway + port: + number: 8010 + pathType: Prefix + path: /swagger + - backend: + service: + name: juno-gateway + port: + number: 8010 + pathType: Prefix + path: /swagger-ui.html + - backend: + service: + name: juno-gateway + port: + number: 8010 + pathType: Prefix + path: /webjars + - backend: + service: + name: juno-gateway + port: + number: 8010 + pathType: Prefix + path: /v2 + - backend: + service: + name: juno-gateway + port: + number: 8010 + pathType: Prefix + path: /swagger-resources + - backend: + service: + name: juno-gateway + port: + number: 8010 + pathType: Prefix + path: /v3 + - backend: + service: + name: juno-gateway + port: + number: 8010 + pathType: Prefix + path: /swaggers \ No newline at end of file diff --git a/product/gateway/web/deployment.yaml b/product/gateway/web/deployment.yaml new file mode 100644 index 0000000..8a2f28c --- /dev/null +++ b/product/gateway/web/deployment.yaml @@ -0,0 +1,46 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-web-ui +spec: + replicas: 1 + selector: + matchLabels: + app: juno-web-ui + template: + metadata: + labels: + app: juno-web-ui + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/web-ui:latest + imagePullPolicy: IfNotPresent + ports: + - containerPort: 80 + name: http + protocol: TCP + livenessProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + resources: + limits: + cpu: "1" + memory: 1Gi + requests: + cpu: 1m + memory: 1Mi + diff --git a/product/gateway/web/service.yaml b/product/gateway/web/service.yaml new file mode 100644 index 0000000..7263da5 --- /dev/null +++ b/product/gateway/web/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-web-ui +spec: + selector: + app: juno-web-ui + ports: + - name: http + port: 80 + protocol: TCP + targetPort: http diff --git a/product/gateway/www/deployment.yaml b/product/gateway/www/deployment.yaml new file mode 100644 index 0000000..ef81efa --- /dev/null +++ b/product/gateway/www/deployment.yaml @@ -0,0 +1,46 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-www +spec: + replicas: 1 + selector: + matchLabels: + app: juno-www + template: + metadata: + labels: + app: juno-www + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/juno-www:uat + imagePullPolicy: IfNotPresent + ports: + - containerPort: 80 + name: http + protocol: TCP + livenessProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + resources: + limits: + cpu: "1" + memory: 1Gi + requests: + cpu: 1m + memory: 1Mi + diff --git a/product/gateway/www/service.yaml b/product/gateway/www/service.yaml new file mode 100644 index 0000000..188a330 --- /dev/null +++ b/product/gateway/www/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-www +spec: + selector: + app: juno-www + ports: + - name: http + port: 80 + protocol: TCP + targetPort: http diff --git a/product/job/deployment.yaml b/product/job/deployment.yaml new file mode 100644 index 0000000..98db3bd --- /dev/null +++ b/product/job/deployment.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-job +spec: + replicas: 1 + selector: + matchLabels: + app: juno-job + template: + metadata: + labels: + app: juno-job + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/job:uat + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8089 + name: http + protocol: TCP + livenessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + resources: + limits: + cpu: "2" + memory: 2Gi + requests: + cpu: 1m + memory: 1Mi diff --git a/product/job/service.yaml b/product/job/service.yaml new file mode 100644 index 0000000..413cba7 --- /dev/null +++ b/product/job/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-job +spec: + selector: + app: juno-job + ports: + - name: http + port: 8089 + protocol: TCP + targetPort: http + - name: http80 + port: 80 + protocol: TCP + targetPort: http \ No newline at end of file diff --git a/product/material/deployment.yaml b/product/material/deployment.yaml new file mode 100644 index 0000000..1ad7145 --- /dev/null +++ b/product/material/deployment.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-material +spec: + replicas: 1 + selector: + matchLabels: + app: juno-material + template: + metadata: + labels: + app: juno-material + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/material:uat + imagePullPolicy: IfNotPresent + ports: + - containerPort: 9003 + name: http + protocol: TCP + livenessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + resources: + limits: + cpu: "2" + memory: 2Gi + requests: + cpu: 1m + memory: 1Mi diff --git a/product/material/service.yaml b/product/material/service.yaml new file mode 100644 index 0000000..f4f780b --- /dev/null +++ b/product/material/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-material-center +spec: + selector: + app: juno-material + ports: + - name: http + port: 9003 + protocol: TCP + targetPort: http + - name: http80 + port: 80 + protocol: TCP + targetPort: http \ No newline at end of file diff --git a/product/message/deployment.yaml b/product/message/deployment.yaml new file mode 100644 index 0000000..b8e3721 --- /dev/null +++ b/product/message/deployment.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-message +spec: + replicas: 1 + selector: + matchLabels: + app: juno-message + template: + metadata: + labels: + app: juno-message + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/message:uat + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8056 + name: http + protocol: TCP + livenessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + resources: + limits: + cpu: "2" + memory: 2Gi + requests: + cpu: 1m + memory: 1Mi diff --git a/product/message/service.yaml b/product/message/service.yaml new file mode 100644 index 0000000..be88f6a --- /dev/null +++ b/product/message/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-message-center +spec: + selector: + app: juno-message + ports: + - name: http + port: 8056 + protocol: TCP + targetPort: http + - name: http80 + port: 80 + protocol: TCP + targetPort: http \ No newline at end of file diff --git a/product/middle-cors.yaml b/product/middle-cors.yaml new file mode 100644 index 0000000..a9b0564 --- /dev/null +++ b/product/middle-cors.yaml @@ -0,0 +1,23 @@ +apiVersion: traefik.containo.us/v1alpha1 +kind: Middleware +metadata: + name: cors +spec: + headers: + accessControlAllowMethods: + - "GET" + - "POST" + - "PUT" + - "DELETE" + - "OPTIONS" + accessControlAllowHeaders: + - "Content-Type" + - "DNT" + - "User-Agent" + - "X-Requested-With" + - "If-Modified-Since" + - "Cache-Control" + - "Content-Type" + - "Range" + accessControlMaxAge: 1728000 + addVaryHeader: true \ No newline at end of file diff --git a/product/middle-strip-api.yaml b/product/middle-strip-api.yaml new file mode 100644 index 0000000..1fd1f3a --- /dev/null +++ b/product/middle-strip-api.yaml @@ -0,0 +1,9 @@ +apiVersion: traefik.containo.us/v1alpha1 +kind: Middleware +metadata: + name: strip-api +spec: + stripPrefix: + prefixes: + - "/api" + forceSlash: false \ No newline at end of file diff --git a/product/mina-gateway/deployment.yaml b/product/mina-gateway/deployment.yaml new file mode 100644 index 0000000..6f589dd --- /dev/null +++ b/product/mina-gateway/deployment.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-mina-gateway +spec: + replicas: 1 + selector: + matchLabels: + app: juno-mina-gateway + template: + metadata: + labels: + app: juno-mina-gateway + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/mina_gateway:uat + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8077 + name: http + protocol: TCP + livenessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + resources: + limits: + cpu: "2" + memory: 2Gi + requests: + cpu: 1m + memory: 1Mi diff --git a/product/mina-gateway/ingress.yaml b/product/mina-gateway/ingress.yaml new file mode 100644 index 0000000..d257c22 --- /dev/null +++ b/product/mina-gateway/ingress.yaml @@ -0,0 +1,37 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: juno-mini + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + traefik.ingress.kubernetes.io/router.middlewares: default-cors@kubernetescrd, default-strip-api@kubernetescrd +spec: + tls: + - hosts: + - miniapp.lingpaike.com + secretName: miniapp.lingpaike.com + rules: + - host: miniapp.lingpaike.com + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: juno-web-ui + port: + number: 80 + - pathType: Prefix + path: "/api" + backend: + service: + name: juno-mina-gateway + port: + number: 8077 + - pathType: Prefix + path: "/websocket" + backend: + service: + name: juno-gateway + port: + number: 8010 diff --git a/product/mina-gateway/service.yaml b/product/mina-gateway/service.yaml new file mode 100644 index 0000000..87750ce --- /dev/null +++ b/product/mina-gateway/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-mina-gateway +spec: + selector: + app: juno-mina-gateway + ports: + - name: http + port: 8077 + protocol: TCP + targetPort: http + - name: http80 + port: 80 + protocol: TCP + targetPort: http \ No newline at end of file diff --git a/product/order/deployment.yaml b/product/order/deployment.yaml new file mode 100644 index 0000000..9803ff7 --- /dev/null +++ b/product/order/deployment.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-order +spec: + replicas: 1 + selector: + matchLabels: + app: juno-order + template: + metadata: + labels: + app: juno-order + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/order:1716457060 + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8088 + name: http + protocol: TCP + livenessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + resources: + limits: + cpu: "2" + memory: 2Gi + requests: + cpu: 1m + memory: 1Mi diff --git a/product/order/service.yaml b/product/order/service.yaml new file mode 100644 index 0000000..02a37aa --- /dev/null +++ b/product/order/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-order-center +spec: + selector: + app: juno-order + ports: + - name: http + port: 8088 + protocol: TCP + targetPort: http + - name: http80 + port: 80 + protocol: TCP + targetPort: http \ No newline at end of file diff --git a/product/outside/deployment.yaml b/product/outside/deployment.yaml new file mode 100644 index 0000000..bfa5e4f --- /dev/null +++ b/product/outside/deployment.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-outside +spec: + replicas: 1 + selector: + matchLabels: + app: juno-outside + template: + metadata: + labels: + app: juno-outside + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/outside:uat + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8070 + name: http + protocol: TCP + livenessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + resources: + limits: + cpu: "2" + memory: 2Gi + requests: + cpu: 1m + memory: 1Mi diff --git a/product/outside/service.yaml b/product/outside/service.yaml new file mode 100644 index 0000000..b070fba --- /dev/null +++ b/product/outside/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-outside-service +spec: + selector: + app: juno-outside + ports: + - name: http + port: 8070 + protocol: TCP + targetPort: http + - name: http80 + port: 80 + protocol: TCP + targetPort: http \ No newline at end of file diff --git a/product/report/deployment.yaml b/product/report/deployment.yaml new file mode 100644 index 0000000..f2bf4b5 --- /dev/null +++ b/product/report/deployment.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-report +spec: + replicas: 1 + selector: + matchLabels: + app: juno-report + template: + metadata: + labels: + app: juno-report + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/report:uat + imagePullPolicy: IfNotPresent + ports: + - containerPort: 9004 + name: http + protocol: TCP + livenessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + resources: + limits: + cpu: "2" + memory: 2Gi + requests: + cpu: 1m + memory: 1Mi diff --git a/product/report/service.yaml b/product/report/service.yaml new file mode 100644 index 0000000..1dcd35f --- /dev/null +++ b/product/report/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-report-center +spec: + selector: + app: juno-report + ports: + - name: http + port: 9004 + protocol: TCP + targetPort: http + - name: http80 + port: 80 + protocol: TCP + targetPort: http \ No newline at end of file diff --git a/product/sp/deployment.yaml b/product/sp/deployment.yaml new file mode 100644 index 0000000..05d2b1f --- /dev/null +++ b/product/sp/deployment.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-sp +spec: + replicas: 1 + selector: + matchLabels: + app: juno-sp + template: + metadata: + labels: + app: juno-sp + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/sp:uat + imagePullPolicy: IfNotPresent + ports: + - containerPort: 9002 + name: http + protocol: TCP + livenessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + resources: + limits: + cpu: "2" + memory: 2Gi + requests: + cpu: 1m + memory: 1Mi diff --git a/product/sp/service.yaml b/product/sp/service.yaml new file mode 100644 index 0000000..850e50a --- /dev/null +++ b/product/sp/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-center-sp +spec: + selector: + app: juno-sp + ports: + - name: http + port: 9002 + protocol: TCP + targetPort: http + - name: http80 + port: 80 + protocol: TCP + targetPort: http \ No newline at end of file diff --git a/product/user/deployment.yaml b/product/user/deployment.yaml new file mode 100644 index 0000000..567dfe3 --- /dev/null +++ b/product/user/deployment.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-user +spec: + replicas: 1 + selector: + matchLabels: + app: juno-user + template: + metadata: + labels: + app: juno-user + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/user:uat + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8072 + name: http + protocol: TCP + livenessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + resources: + limits: + cpu: "2" + memory: 2Gi + requests: + cpu: 1m + memory: 1Mi diff --git a/product/user/service.yaml b/product/user/service.yaml new file mode 100644 index 0000000..8592960 --- /dev/null +++ b/product/user/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-user-center +spec: + selector: + app: juno-user + ports: + - name: http + port: 8072 + protocol: TCP + targetPort: http + - name: http80 + port: 80 + protocol: TCP + targetPort: http \ No newline at end of file diff --git a/uat/admin/gateway/deployment.yaml b/uat/admin/gateway/deployment.yaml new file mode 100644 index 0000000..f097700 --- /dev/null +++ b/uat/admin/gateway/deployment.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-admin-gateway +spec: + replicas: 1 + selector: + matchLabels: + app: juno-admin-gateway + template: + metadata: + labels: + app: juno-admin-gateway + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/admin-gateway:uat + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8011 + name: http + protocol: TCP + livenessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + resources: + limits: + cpu: "2" + memory: 2Gi + requests: + cpu: 1m + memory: 1Mi \ No newline at end of file diff --git a/uat/admin/gateway/service.yaml b/uat/admin/gateway/service.yaml new file mode 100644 index 0000000..49d22a0 --- /dev/null +++ b/uat/admin/gateway/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-admin-gateway +spec: + selector: + app: juno-admin-gateway + ports: + - name: http + port: 8011 + protocol: TCP + targetPort: http + - name: http80 + port: 80 + protocol: TCP + targetPort: http \ No newline at end of file diff --git a/uat/admin/ingress.yaml b/uat/admin/ingress.yaml new file mode 100644 index 0000000..f379408 --- /dev/null +++ b/uat/admin/ingress.yaml @@ -0,0 +1,94 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: juno-admin + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + traefik.ingress.kubernetes.io/router.middlewares: default-cors@kubernetescrd, default-strip-api@kubernetescrd +spec: + rules: + - host: admin.qa.lingpaike.com + http: + paths: + - backend: + service: + name: juno-admin-gateway + port: + number: 8011 + pathType: Prefix + path: /api + - backend: + service: + name: juno-admin-web + port: + number: 80 + path: / + pathType: Prefix + # 也许应该去掉 + - backend: + service: + name: juno-file + port: + number: 80 + pathType: Prefix + path: /banner + - backend: + service: + name: juno-admin-gateway + port: + number: 8011 + pathType: Prefix + path: /doc.html + - backend: + service: + name: juno-admin-gateway + port: + number: 8011 + pathType: Prefix + path: /swagger + - backend: + service: + name: juno-admin-gateway + port: + number: 8011 + pathType: Prefix + path: /swagger-ui.html + - backend: + service: + name: juno-admin-gateway + port: + number: 8011 + pathType: Prefix + path: /webjars + - backend: + service: + name: juno-admin-gateway + port: + number: 8011 + pathType: Prefix + path: /v2 + - backend: + service: + name: juno-admin-gateway + port: + number: 8011 + pathType: Prefix + path: /swagger-resources + - backend: + service: + name: juno-admin-gateway + port: + number: 8011 + pathType: Prefix + path: /v3 + - backend: + service: + name: juno-admin-gateway + port: + number: 8011 + pathType: Prefix + path: /swaggers + tls: + - secretName: admin.qa.lingpaike.com + hosts: + - admin.qa.lingpaike.com diff --git a/uat/admin/web/deployment.yaml b/uat/admin/web/deployment.yaml new file mode 100644 index 0000000..f6a6fb7 --- /dev/null +++ b/uat/admin/web/deployment.yaml @@ -0,0 +1,46 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-admin-web +spec: + replicas: 1 + selector: + matchLabels: + app: juno-admin-web + template: + metadata: + labels: + app: juno-admin-web + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/admin-web:latest + imagePullPolicy: IfNotPresent + ports: + - containerPort: 80 + name: http + protocol: TCP + livenessProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + resources: + limits: + cpu: "1" + memory: 1Gi + requests: + cpu: 1m + memory: 1Mi + diff --git a/uat/admin/web/service.yaml b/uat/admin/web/service.yaml new file mode 100644 index 0000000..be42ceb --- /dev/null +++ b/uat/admin/web/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-admin-web +spec: + selector: + app: juno-admin-web + ports: + - name: http + port: 80 + protocol: TCP + targetPort: http diff --git a/uat/basic/deployment.yaml b/uat/basic/deployment.yaml new file mode 100644 index 0000000..f9d1307 --- /dev/null +++ b/uat/basic/deployment.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-basic +spec: + replicas: 1 + selector: + matchLabels: + app: juno-basic + template: + metadata: + labels: + app: juno-basic + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/basic:uat + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8070 + name: http + protocol: TCP + livenessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + resources: + limits: + cpu: "2" + memory: 2Gi + requests: + cpu: 1m + memory: 1Mi diff --git a/uat/basic/service.yaml b/uat/basic/service.yaml new file mode 100644 index 0000000..44abc67 --- /dev/null +++ b/uat/basic/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-center-basic +spec: + selector: + app: juno-basic + ports: + - name: http + port: 8070 + protocol: TCP + targetPort: http + - name: http80 + port: 80 + protocol: TCP + targetPort: http \ No newline at end of file diff --git a/uat/database.yaml b/uat/database.yaml new file mode 100644 index 0000000..429c67c --- /dev/null +++ b/uat/database.yaml @@ -0,0 +1,38 @@ +kind: Service +apiVersion: v1 +metadata: + name: juno-postgres +spec: + ports: + - port: 5432 + targetPort: 5432 +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: juno-postgres +subsets: + - addresses: + - ip: 172.17.0.6 + ports: + - port: 5432 + +--- +kind: Service +apiVersion: v1 +metadata: + name: juno-redis +spec: + ports: + - port: 6379 + targetPort: 6379 +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: juno-redis +subsets: + - addresses: + - ip: 172.17.0.6 + ports: + - port: 6379 \ No newline at end of file diff --git a/uat/file/deployment.yaml b/uat/file/deployment.yaml new file mode 100644 index 0000000..1fe2021 --- /dev/null +++ b/uat/file/deployment.yaml @@ -0,0 +1,52 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-file +spec: + replicas: 1 + selector: + matchLabels: + app: juno-file + template: + metadata: + labels: + app: juno-file + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/basic:nginx + imagePullPolicy: IfNotPresent + ports: + - containerPort: 80 + name: http + protocol: TCP +# livenessProbe: +# httpGet: +# path: / +# port: http +# initialDelaySeconds: 20 +# periodSeconds: 10 +# timeoutSeconds: 5 +# readinessProbe: +# httpGet: +# path: / +# port: http +# initialDelaySeconds: 20 +# periodSeconds: 10 +# timeoutSeconds: 5 + resources: + limits: + cpu: "2" + memory: 2Gi + requests: + cpu: 1m + memory: 1Mi + volumeMounts: + - mountPath: /usr/share/nginx/html + name: ftp + volumes: + - name: ftp + hostPath: + path: /ftp \ No newline at end of file diff --git a/uat/file/ingress.yaml b/uat/file/ingress.yaml new file mode 100644 index 0000000..967a2b4 --- /dev/null +++ b/uat/file/ingress.yaml @@ -0,0 +1,23 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: juno-file + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + traefik.ingress.kubernetes.io/router.middlewares: default-cors@kubernetescrd +spec: + tls: + - hosts: + - file.qa.lingpaike.com + secretName: file.qa.lingpaike.com + rules: + - host: file.qa.lingpaike.com + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: juno-file + port: + number: 80 \ No newline at end of file diff --git a/uat/file/service.yaml b/uat/file/service.yaml new file mode 100644 index 0000000..2655294 --- /dev/null +++ b/uat/file/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-file +spec: + selector: + app: juno-file + ports: + - name: http + port: 80 + protocol: TCP + targetPort: http diff --git a/uat/gateway/gateway/deployment.yaml b/uat/gateway/gateway/deployment.yaml new file mode 100644 index 0000000..7026394 --- /dev/null +++ b/uat/gateway/gateway/deployment.yaml @@ -0,0 +1,49 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-gateway +spec: + replicas: 1 + selector: + matchLabels: + app: juno-gateway + template: + metadata: + labels: + app: juno-gateway + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/gateway:uat + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8010 + name: http + protocol: TCP + - containerPort: 9092 + name: socket + protocol: TCP + livenessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + resources: + limits: + cpu: "2" + memory: 2Gi + requests: + cpu: 1m + memory: 1Mi + diff --git a/uat/gateway/gateway/service.yaml b/uat/gateway/gateway/service.yaml new file mode 100644 index 0000000..829857d --- /dev/null +++ b/uat/gateway/gateway/service.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-gateway +spec: + selector: + app: juno-gateway + ports: + - name: http + port: 8010 + protocol: TCP + targetPort: http + - name: socket + protocol: TCP + port: 9092 + targetPort: socket + - name: http80 + port: 80 + protocol: TCP + targetPort: http \ No newline at end of file diff --git a/uat/gateway/ingress-www.yaml b/uat/gateway/ingress-www.yaml new file mode 100644 index 0000000..3d3b40a --- /dev/null +++ b/uat/gateway/ingress-www.yaml @@ -0,0 +1,23 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: juno-www + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + traefik.ingress.kubernetes.io/router.middlewares: default-cors@kubernetescrd, default-strip-api@kubernetescrd +spec: + tls: + - hosts: + - www.qa.lingpaike.com + secretName: www.qa.lingpaike.com + rules: + - host: www.qa.lingpaike.com + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: juno-www + port: + number: 80 diff --git a/uat/gateway/ingress.yaml b/uat/gateway/ingress.yaml new file mode 100644 index 0000000..c100b0f --- /dev/null +++ b/uat/gateway/ingress.yaml @@ -0,0 +1,114 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: juno-saas + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + traefik.ingress.kubernetes.io/router.middlewares: default-cors@kubernetescrd, default-strip-api@kubernetescrd +spec: + tls: + - hosts: + - saas.qa.lingpaike.com + secretName: saas.qa.lingpaike.com + rules: + - host: saas.qa.lingpaike.com + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: juno-web-ui + port: + number: 80 + - pathType: Prefix + path: "/testing" + backend: + service: + name: juno-testing-report + port: + number: 80 + - pathType: Prefix + path: "/api" + backend: + service: + name: juno-gateway + port: + number: 8010 + - pathType: Prefix + path: "/websocket" + backend: + service: + name: juno-gateway + port: + number: 8010 + - pathType: Prefix + path: "/socket.io" + backend: + service: + name: juno-gateway + port: + number: 9092 + - pathType: Prefix + path: "/chat" + backend: + service: + name: juno-gateway + port: + number: 9092 + - backend: + service: + name: juno-gateway + port: + number: 8010 + pathType: Prefix + path: /doc.html + - backend: + service: + name: juno-gateway + port: + number: 8010 + pathType: Prefix + path: /swagger + - backend: + service: + name: juno-gateway + port: + number: 8010 + pathType: Prefix + path: /swagger-ui.html + - backend: + service: + name: juno-gateway + port: + number: 8010 + pathType: Prefix + path: /webjars + - backend: + service: + name: juno-gateway + port: + number: 8010 + pathType: Prefix + path: /v2 + - backend: + service: + name: juno-gateway + port: + number: 8010 + pathType: Prefix + path: /swagger-resources + - backend: + service: + name: juno-gateway + port: + number: 8010 + pathType: Prefix + path: /v3 + - backend: + service: + name: juno-gateway + port: + number: 8010 + pathType: Prefix + path: /swaggers \ No newline at end of file diff --git a/uat/gateway/web/deployment.yaml b/uat/gateway/web/deployment.yaml new file mode 100644 index 0000000..8a2f28c --- /dev/null +++ b/uat/gateway/web/deployment.yaml @@ -0,0 +1,46 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-web-ui +spec: + replicas: 1 + selector: + matchLabels: + app: juno-web-ui + template: + metadata: + labels: + app: juno-web-ui + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/web-ui:latest + imagePullPolicy: IfNotPresent + ports: + - containerPort: 80 + name: http + protocol: TCP + livenessProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + resources: + limits: + cpu: "1" + memory: 1Gi + requests: + cpu: 1m + memory: 1Mi + diff --git a/uat/gateway/web/service.yaml b/uat/gateway/web/service.yaml new file mode 100644 index 0000000..7263da5 --- /dev/null +++ b/uat/gateway/web/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-web-ui +spec: + selector: + app: juno-web-ui + ports: + - name: http + port: 80 + protocol: TCP + targetPort: http diff --git a/uat/gateway/www/deployment.yaml b/uat/gateway/www/deployment.yaml new file mode 100644 index 0000000..ef81efa --- /dev/null +++ b/uat/gateway/www/deployment.yaml @@ -0,0 +1,46 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-www +spec: + replicas: 1 + selector: + matchLabels: + app: juno-www + template: + metadata: + labels: + app: juno-www + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/juno-www:uat + imagePullPolicy: IfNotPresent + ports: + - containerPort: 80 + name: http + protocol: TCP + livenessProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + resources: + limits: + cpu: "1" + memory: 1Gi + requests: + cpu: 1m + memory: 1Mi + diff --git a/uat/gateway/www/service.yaml b/uat/gateway/www/service.yaml new file mode 100644 index 0000000..188a330 --- /dev/null +++ b/uat/gateway/www/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-www +spec: + selector: + app: juno-www + ports: + - name: http + port: 80 + protocol: TCP + targetPort: http diff --git a/uat/job/deployment.yaml b/uat/job/deployment.yaml new file mode 100644 index 0000000..98db3bd --- /dev/null +++ b/uat/job/deployment.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-job +spec: + replicas: 1 + selector: + matchLabels: + app: juno-job + template: + metadata: + labels: + app: juno-job + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/job:uat + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8089 + name: http + protocol: TCP + livenessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + resources: + limits: + cpu: "2" + memory: 2Gi + requests: + cpu: 1m + memory: 1Mi diff --git a/uat/job/service.yaml b/uat/job/service.yaml new file mode 100644 index 0000000..413cba7 --- /dev/null +++ b/uat/job/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-job +spec: + selector: + app: juno-job + ports: + - name: http + port: 8089 + protocol: TCP + targetPort: http + - name: http80 + port: 80 + protocol: TCP + targetPort: http \ No newline at end of file diff --git a/uat/material/deployment.yaml b/uat/material/deployment.yaml new file mode 100644 index 0000000..1ad7145 --- /dev/null +++ b/uat/material/deployment.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-material +spec: + replicas: 1 + selector: + matchLabels: + app: juno-material + template: + metadata: + labels: + app: juno-material + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/material:uat + imagePullPolicy: IfNotPresent + ports: + - containerPort: 9003 + name: http + protocol: TCP + livenessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + resources: + limits: + cpu: "2" + memory: 2Gi + requests: + cpu: 1m + memory: 1Mi diff --git a/uat/material/service.yaml b/uat/material/service.yaml new file mode 100644 index 0000000..f4f780b --- /dev/null +++ b/uat/material/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-material-center +spec: + selector: + app: juno-material + ports: + - name: http + port: 9003 + protocol: TCP + targetPort: http + - name: http80 + port: 80 + protocol: TCP + targetPort: http \ No newline at end of file diff --git a/uat/message/deployment.yaml b/uat/message/deployment.yaml new file mode 100644 index 0000000..b8e3721 --- /dev/null +++ b/uat/message/deployment.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-message +spec: + replicas: 1 + selector: + matchLabels: + app: juno-message + template: + metadata: + labels: + app: juno-message + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/message:uat + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8056 + name: http + protocol: TCP + livenessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + resources: + limits: + cpu: "2" + memory: 2Gi + requests: + cpu: 1m + memory: 1Mi diff --git a/uat/message/service.yaml b/uat/message/service.yaml new file mode 100644 index 0000000..be88f6a --- /dev/null +++ b/uat/message/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-message-center +spec: + selector: + app: juno-message + ports: + - name: http + port: 8056 + protocol: TCP + targetPort: http + - name: http80 + port: 80 + protocol: TCP + targetPort: http \ No newline at end of file diff --git a/uat/middle-cors.yaml b/uat/middle-cors.yaml new file mode 100644 index 0000000..a9b0564 --- /dev/null +++ b/uat/middle-cors.yaml @@ -0,0 +1,23 @@ +apiVersion: traefik.containo.us/v1alpha1 +kind: Middleware +metadata: + name: cors +spec: + headers: + accessControlAllowMethods: + - "GET" + - "POST" + - "PUT" + - "DELETE" + - "OPTIONS" + accessControlAllowHeaders: + - "Content-Type" + - "DNT" + - "User-Agent" + - "X-Requested-With" + - "If-Modified-Since" + - "Cache-Control" + - "Content-Type" + - "Range" + accessControlMaxAge: 1728000 + addVaryHeader: true \ No newline at end of file diff --git a/uat/middle-strip-api.yaml b/uat/middle-strip-api.yaml new file mode 100644 index 0000000..1fd1f3a --- /dev/null +++ b/uat/middle-strip-api.yaml @@ -0,0 +1,9 @@ +apiVersion: traefik.containo.us/v1alpha1 +kind: Middleware +metadata: + name: strip-api +spec: + stripPrefix: + prefixes: + - "/api" + forceSlash: false \ No newline at end of file diff --git a/uat/mina-gateway/deployment.yaml b/uat/mina-gateway/deployment.yaml new file mode 100644 index 0000000..6f589dd --- /dev/null +++ b/uat/mina-gateway/deployment.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-mina-gateway +spec: + replicas: 1 + selector: + matchLabels: + app: juno-mina-gateway + template: + metadata: + labels: + app: juno-mina-gateway + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/mina_gateway:uat + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8077 + name: http + protocol: TCP + livenessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + resources: + limits: + cpu: "2" + memory: 2Gi + requests: + cpu: 1m + memory: 1Mi diff --git a/uat/mina-gateway/ingress.yaml b/uat/mina-gateway/ingress.yaml new file mode 100644 index 0000000..c3fdfba --- /dev/null +++ b/uat/mina-gateway/ingress.yaml @@ -0,0 +1,37 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: juno-mini + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + traefik.ingress.kubernetes.io/router.middlewares: default-cors@kubernetescrd, default-strip-api@kubernetescrd +spec: + tls: + - hosts: + - miniapp.qa.lingpaike.com + secretName: miniapp.qa.lingpaike.com + rules: + - host: miniapp.qa.lingpaike.com + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: juno-web-ui + port: + number: 80 + - pathType: Prefix + path: "/api" + backend: + service: + name: juno-mina-gateway + port: + number: 8077 + - pathType: Prefix + path: "/websocket" + backend: + service: + name: juno-gateway + port: + number: 8010 diff --git a/uat/mina-gateway/service.yaml b/uat/mina-gateway/service.yaml new file mode 100644 index 0000000..87750ce --- /dev/null +++ b/uat/mina-gateway/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-mina-gateway +spec: + selector: + app: juno-mina-gateway + ports: + - name: http + port: 8077 + protocol: TCP + targetPort: http + - name: http80 + port: 80 + protocol: TCP + targetPort: http \ No newline at end of file diff --git a/uat/order/deployment.yaml b/uat/order/deployment.yaml new file mode 100644 index 0000000..9803ff7 --- /dev/null +++ b/uat/order/deployment.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-order +spec: + replicas: 1 + selector: + matchLabels: + app: juno-order + template: + metadata: + labels: + app: juno-order + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/order:1716457060 + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8088 + name: http + protocol: TCP + livenessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + resources: + limits: + cpu: "2" + memory: 2Gi + requests: + cpu: 1m + memory: 1Mi diff --git a/uat/order/service.yaml b/uat/order/service.yaml new file mode 100644 index 0000000..02a37aa --- /dev/null +++ b/uat/order/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-order-center +spec: + selector: + app: juno-order + ports: + - name: http + port: 8088 + protocol: TCP + targetPort: http + - name: http80 + port: 80 + protocol: TCP + targetPort: http \ No newline at end of file diff --git a/uat/outside/deployment.yaml b/uat/outside/deployment.yaml new file mode 100644 index 0000000..90132ad --- /dev/null +++ b/uat/outside/deployment.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-outside +spec: + replicas: 1 + selector: + matchLabels: + app: juno-outside + template: + metadata: + labels: + app: juno-outside + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/outside:1719884167 + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8070 + name: http + protocol: TCP + livenessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + resources: + limits: + cpu: "2" + memory: 2Gi + requests: + cpu: 1m + memory: 1Mi diff --git a/uat/outside/service.yaml b/uat/outside/service.yaml new file mode 100644 index 0000000..b070fba --- /dev/null +++ b/uat/outside/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-outside-service +spec: + selector: + app: juno-outside + ports: + - name: http + port: 8070 + protocol: TCP + targetPort: http + - name: http80 + port: 80 + protocol: TCP + targetPort: http \ No newline at end of file diff --git a/uat/report/deployment.yaml b/uat/report/deployment.yaml new file mode 100644 index 0000000..f2bf4b5 --- /dev/null +++ b/uat/report/deployment.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-report +spec: + replicas: 1 + selector: + matchLabels: + app: juno-report + template: + metadata: + labels: + app: juno-report + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/report:uat + imagePullPolicy: IfNotPresent + ports: + - containerPort: 9004 + name: http + protocol: TCP + livenessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + resources: + limits: + cpu: "2" + memory: 2Gi + requests: + cpu: 1m + memory: 1Mi diff --git a/uat/report/service.yaml b/uat/report/service.yaml new file mode 100644 index 0000000..1dcd35f --- /dev/null +++ b/uat/report/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-report-center +spec: + selector: + app: juno-report + ports: + - name: http + port: 9004 + protocol: TCP + targetPort: http + - name: http80 + port: 80 + protocol: TCP + targetPort: http \ No newline at end of file diff --git a/uat/sp/deployment.yaml b/uat/sp/deployment.yaml new file mode 100644 index 0000000..05d2b1f --- /dev/null +++ b/uat/sp/deployment.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-sp +spec: + replicas: 1 + selector: + matchLabels: + app: juno-sp + template: + metadata: + labels: + app: juno-sp + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/sp:uat + imagePullPolicy: IfNotPresent + ports: + - containerPort: 9002 + name: http + protocol: TCP + livenessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + resources: + limits: + cpu: "2" + memory: 2Gi + requests: + cpu: 1m + memory: 1Mi diff --git a/uat/sp/service.yaml b/uat/sp/service.yaml new file mode 100644 index 0000000..850e50a --- /dev/null +++ b/uat/sp/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-center-sp +spec: + selector: + app: juno-sp + ports: + - name: http + port: 9002 + protocol: TCP + targetPort: http + - name: http80 + port: 80 + protocol: TCP + targetPort: http \ No newline at end of file diff --git a/uat/testing-report/deployment.yaml b/uat/testing-report/deployment.yaml new file mode 100644 index 0000000..736021a --- /dev/null +++ b/uat/testing-report/deployment.yaml @@ -0,0 +1,31 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-testing-report +spec: + replicas: 1 + selector: + matchLabels: + app: juno-testing-report + template: + metadata: + labels: + app: juno-testing-report + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/testing-report + imagePullPolicy: IfNotPresent + ports: + - containerPort: 80 + name: http + protocol: TCP + resources: + limits: + cpu: "2" + memory: 2Gi + requests: + cpu: 1m + memory: 1Mi diff --git a/uat/testing-report/service.yaml b/uat/testing-report/service.yaml new file mode 100644 index 0000000..6f7d429 --- /dev/null +++ b/uat/testing-report/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-testing-report +spec: + selector: + app: juno-testing-report + ports: + - name: http + port: 80 + protocol: TCP + targetPort: http \ No newline at end of file diff --git a/uat/user/deployment.yaml b/uat/user/deployment.yaml new file mode 100644 index 0000000..567dfe3 --- /dev/null +++ b/uat/user/deployment.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-user +spec: + replicas: 1 + selector: + matchLabels: + app: juno-user + template: + metadata: + labels: + app: juno-user + spec: + imagePullSecrets: + - name: ccr + containers: + - name: app + image: ccr.ccs.tencentyun.com/juno/user:uat + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8072 + name: http + protocol: TCP + livenessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: /ping + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + resources: + limits: + cpu: "2" + memory: 2Gi + requests: + cpu: 1m + memory: 1Mi diff --git a/uat/user/service.yaml b/uat/user/service.yaml new file mode 100644 index 0000000..8592960 --- /dev/null +++ b/uat/user/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: juno-user-center +spec: + selector: + app: juno-user + ports: + - name: http + port: 8072 + protocol: TCP + targetPort: http + - name: http80 + port: 80 + protocol: TCP + targetPort: http \ No newline at end of file