This commit is contained in:
qxsugar 2024-11-04 18:40:21 +08:00
commit bbd9ab4830
106 changed files with 3885 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.idea

21
Makefile Normal file
View File

@ -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

107
README.md Normal file
View File

@ -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
```

10
backup/README.md Normal file
View File

@ -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 {} \;
```

4
backup/backup.sh Normal file
View File

@ -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

10
devops/daemon.json Normal file
View File

@ -0,0 +1,10 @@
{
"registry-mirrors": [
"https://registry.docker-cn.com"
],
"log-driver": "json-file",
"log-opts": {
"max-size": "50m",
"max-file": "3"
}
}e

View File

@ -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

View File

@ -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

46
devops/drone/ingress.yaml Normal file
View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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 }
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

51
devops/elk/policy.bash Normal file
View File

@ -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"
}
}
}
'

View File

@ -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

View File

@ -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

View File

@ -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

76
devops/minio/ingress.yaml Normal file
View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

38
product/database.yaml Normal file
View File

@ -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

View File

@ -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

23
product/file/ingress.yaml Normal file
View File

@ -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

12
product/file/service.yaml Normal file
View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

16
product/job/service.yaml Normal file
View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

23
product/middle-cors.yaml Normal file
View File

@ -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

View File

@ -0,0 +1,9 @@
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: strip-api
spec:
stripPrefix:
prefixes:
- "/api"
forceSlash: false

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

16
product/sp/service.yaml Normal file
View File

@ -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

View File

@ -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

16
product/user/service.yaml Normal file
View File

@ -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

View File

@ -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

View File

@ -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

94
uat/admin/ingress.yaml Normal file
View File

@ -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

View File

@ -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

View File

@ -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

45
uat/basic/deployment.yaml Normal file
View File

@ -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

16
uat/basic/service.yaml Normal file
View File

@ -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

38
uat/database.yaml Normal file
View File

@ -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

52
uat/file/deployment.yaml Normal file
View File

@ -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

23
uat/file/ingress.yaml Normal file
View File

@ -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

12
uat/file/service.yaml Normal file
View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

114
uat/gateway/ingress.yaml Normal file
View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

45
uat/job/deployment.yaml Normal file
View File

@ -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

16
uat/job/service.yaml Normal file
View File

@ -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

View File

@ -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

16
uat/material/service.yaml Normal file
View File

@ -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

View File

@ -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

16
uat/message/service.yaml Normal file
View File

@ -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

23
uat/middle-cors.yaml Normal file
View File

@ -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

View File

@ -0,0 +1,9 @@
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: strip-api
spec:
stripPrefix:
prefixes:
- "/api"
forceSlash: false

View File

@ -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

View File

@ -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

View File

@ -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

45
uat/order/deployment.yaml Normal file
View File

@ -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

16
uat/order/service.yaml Normal file
View File

@ -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

View File

@ -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

16
uat/outside/service.yaml Normal file
View File

@ -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

View File

@ -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

16
uat/report/service.yaml Normal file
View File

@ -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

Some files were not shown because too many files have changed in this diff Show More