Commit 55ccd29f by tingweiwang

seetaas关键字整改配置适配

1 parent 502e33ea
Showing with 358 additions and 142 deletions
apiVersion: v1
kind: Namespace
metadata:
creationTimestamp: null
name: autodl
selfLink: /api/v1/namespaces/autodl
spec:
finalizers:
- kubernetes
status:
phase: Active
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: autodl-serviceaccount
namespace: autodl
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: autodl-clusterrole
rules:
- apiGroups:
- ""
resources:
- nodes
verbs: ["watch", "list", "patch"]
- nonResourceURLs:
- /version/
verbs: ["get"]
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: Role
metadata:
name: autodl-role
namespace: autodl
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "watch", "list", "create", "delete", "patch"]
- apiGroups: [""]
resources: ["configmaps", "secrets"]
verbs: ["get", "update", "patch", "create", "delete"]
- apiGroups: ["", "extensions"]
resources: ["services", "ingresses", "deployments", "replicasets"]
verbs: ["get", "create", "patch", "delete", "list"]
- apiGroups: ["", "*"]
resources: ["events", "pods/status", "pods/log"]
verbs: ["watch", "get", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
name: autodl-role-binding
namespace: autodl
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: autodl-role
subjects:
- kind: ServiceAccount
name: autodl-serviceaccount
namespace: autodl
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: autodl-clusterrole-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: autodl-clusterrole
subjects:
- kind: ServiceAccount
name: autodl-serviceaccount
namespace: autodl
apiVersion: v1
kind: Secret
metadata:
name: releasev1-autodl-secret
labels:
app: releasev1-autocnn
release: releasev1
type: autocnn-core
namespace: autodl
type: Opaque
data:
autocnn-secret: U2VlVGFhU0F1dG9DTk4xMzUK # echo SeeTaaSAutoCNN135 | base64
user-password: U2VlVGFhU0F1dG9DTk4xMzUK
smtp-password: ""
k8s-authorisation: ""
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: adl-pv
spec:
nfs:
path: xxx #nfs path
server: xxxx #nfs ip
accessModes:
- ReadWriteMany
capacity:
storage: 500Gi
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: adl-pvc
namespace: autodl
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 100Gi
apiVersion: v1
kind: Namespace
metadata:
creationTimestamp: null
name: kpl
spec:
finalizers:
- kubernetes
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: kpl-serviceaccount
namespace: kpl
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: kpl-clusterrole
rules:
- apiGroups:
- ""
resources:
- nodes
verbs: ["watch", "list", "patch"]
- nonResourceURLs:
- /version/
verbs: ["get"]
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: Role
metadata:
name: kpl-role
namespace: kpl
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "watch", "list", "create", "delete", "patch"]
- apiGroups: [""]
resources: ["configmaps", "secrets"]
verbs: ["get", "update", "patch", "create", "delete"]
- apiGroups: ["", "extensions"]
resources: ["services", "ingresses", "deployments", "replicasets"]
verbs: ["get", "create", "patch", "delete", "list"]
- apiGroups: ["", "*"]
resources: ["events", "pods/status", "pods/log"]
verbs: ["watch", "get", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
name: kpl-role-binding
namespace: kpl
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: kpl-role
subjects:
- kind: ServiceAccount
name: kpl-serviceaccount
namespace: kpl
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: kpl-clusterrole-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kpl-clusterrole
subjects:
- kind: ServiceAccount
name: kpl-serviceaccount
namespace: kpl
apiVersion: v1
kind: Secret
metadata:
name: releasev1-kpl-secret
labels:
app: releasev1-autocnn
release: releasev1
type: autocnn-core
namespace: kpl
type: Opaque
data:
autocnn-secret: U2VlVGFhU0F1dG9DTk4xMzUK # echo SeeTaaSAutoCNN135 | base64
user-password: U2VlVGFhU0F1dG9DTk4xMzUK
smtp-password: ""
k8s-authorisation: ""
apiVersion: v1
kind: PersistentVolume
metadata:
name: kpl-pv
spec:
nfs:
path: xxx #修改nfs的path
server: xxxx #nfs ip
accessModes:
- ReadWriteMany
capacity:
storage: 500Gi
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: kpl-pvc
namespace: kpl
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 100Gi
#!/bin/bash #!/bin/bash
#测试环境执行脚本用户为seetaas,执行sed 需要sudo 并设置 NOPASSWD
######################项目所在路径################################# ######################项目所在路径#################################
#workspace=/home/wangtingwei/workspace #workspace=/home/wangtingwei/workspace
config_workspace=/root/configmap/ #configmap模板所在的路径 config_workspace=/root/configmap-kpl/ #configmap模板所在的路径
################seetaas组件变量信息########################## ################kpl组件变量信息##########################
seetaas_frontend=http://106.38.203.204:30180 #seetaas前端访问主页 kpl_frontend=http://106.38.203.204:30180 #kpl前端访问主页
seetaas_backend=http://106.38.203.204:30200 #seetaas后端api kpl_backend=http://106.38.203.204:30200 #kpl后端api
seetaas_back_socket=ws://106.38.203.204:30200 # https对应wss kpl_back_socket=ws://106.38.203.204:30200 # https对应wss
seetaas_imageproxy=http://106.38.203.204:30202 #seetaas图片服务器api kpl_imageproxy=http://106.38.203.204:30202 #kpl图片服务器api
seetaas_deploy=http://106.38.203.204:30201 #seetaas部署api kpl_deploy=http://106.38.203.204:30201 #kpl部署api
usercenter_frontend=http://106.38.203.204:30302 #用户中心前端 usercenter_frontend=http://106.38.203.204:30302 #用户中心前端
usercenter_backend=http://106.38.203.204:30300 #用户中心后端 usercenter_backend=http://106.38.203.204:30300 #用户中心后端
core_nginx=http://106.38.203.204:30099 core_nginx=http://106.38.203.204:30099
visit_uc_frontend=106.38.203.204 #user-center前端的主机ip 或域名 visit_uc_frontend=106.38.203.204 #user-center前端的主机ip 或域名
mobile_frontend=http://106.38.203.204:30181 #seetaas手机端扫码页面 mobile_frontend=http://106.38.203.204:30181 #kpl手机端扫码页面
################################autodl配置文件##########################
#autodl_backend=http://106.38.203.204:30091
#autodl_back_socket=ws://106.38.203.204:30091
#autodl_file=http://106.38.203.204:30093
#deploy_is_private=true #true代表私有部署
#autodl_admin_backend=http://106.38.203.204:30092 # 30092
#autodl_admin_back_socket=ws://106.38.203.204:30092
#custom_source=
###############其他依赖服务变量信息######################################### ###############其他依赖服务变量信息#########################################
#autodl_es=http://192.168.1.51:9200 #autodl_es=http://192.168.1.51:9200
mysql_host=192.168.1.53:3306 mysql_host=192.168.1.53:3306
...@@ -29,11 +20,13 @@ mysql_user=root ...@@ -29,11 +20,13 @@ mysql_user=root
mysql_password=root mysql_password=root
redis_host=192.168.1.53:6379 redis_host=192.168.1.53:6379
redis_password= redis_password=
mongo_host='mongodb://admin:admin@192.168.1.51:27017,192.168.1.14:27017/seetaas?replicaSet=my-mongodb\&authSource=admin' #&号前记得加转义 mongo_host='mongodb://admin:admin@192.168.1.51:27017,192.168.1.14:27017/kpl?replicaSet=my-mongodb\&authSource=admin' #&号前记得加转义
harbor_host=192.168.1.53:5000 #内部镜像仓库, harbor_host=192.168.1.53:5000 #内部镜像仓库,
hb_host=hb.seetatech.com #外部镜像仓库 (定义算法用的镜像仓库拉取位置) hb_host=hb.seetatech.com #外部镜像仓库 (定义算法用的镜像仓库拉取位置)
##################################go_proxy_server############### #################################kpl关键字################################
#go_proxy_server=http://goproxy.seetatech.com kpl_db_name=kpl
kpl_service_id=kpl3
kpl_realy_path=kpl
###############################修改后端app.yaml################################ ###############################修改后端app.yaml################################
sudo sed -i s#redis_host#$redis_host#g `find $config_workspace -type f -name "*.yaml"` sudo sed -i s#redis_host#$redis_host#g `find $config_workspace -type f -name "*.yaml"`
sudo sed -i s#mysql_host#$mysql_host#g `find $config_workspace -type f -name "*.yaml"` sudo sed -i s#mysql_host#$mysql_host#g `find $config_workspace -type f -name "*.yaml"`
...@@ -43,31 +36,20 @@ sudo sed -i s#harbor_host#$harbor_host#g `find $config_workspace -type f -name " ...@@ -43,31 +36,20 @@ sudo sed -i s#harbor_host#$harbor_host#g `find $config_workspace -type f -name "
sudo sed -i s#redis_password#$redis_password#g `find $config_workspace -type f -name "*.yaml"` sudo sed -i s#redis_password#$redis_password#g `find $config_workspace -type f -name "*.yaml"`
sudo sed -i s#mysql_password#$mysql_password#g `find $config_workspace -type f -name "*.yaml"` sudo sed -i s#mysql_password#$mysql_password#g `find $config_workspace -type f -name "*.yaml"`
################################################################################### ###################################################################################
sudo sed -i s#seetaas_deploy#$seetaas_deploy#g `find $config_workspace -type f -name "*.yaml"` sudo sed -i s#kpl_deploy#$kpl_deploy#g `find $config_workspace -type f -name "*.yaml"`
sudo sed -i s#core_nginx#$core_nginx#g `find $config_workspace -type f -name "*.yaml"` sudo sed -i s#core_nginx#$core_nginx#g `find $config_workspace -type f -name "*.yaml"`
sudo sed -i s#seetaas_frontend#$seetaas_frontend#g `find $config_workspace -type f -name "*.yaml"` sudo sed -i s#kpl_frontend#$kpl_frontend#g `find $config_workspace -type f -name "*.yaml"`
sudo sed -i s#visit_uc_frontend#$visit_uc_frontend#g `find $config_workspace -type f -name "*.yaml"` sudo sed -i s#visit_uc_frontend#$visit_uc_frontend#g `find $config_workspace -type f -name "*.yaml"`
###############################修改前端app.yaml####################################### ###############################修改前端app.yaml#######################################
sudo sed -i s#seetaas_backend#$seetaas_backend#g `find $config_workspace -type f -name "*.yaml"` sudo sed -i s#kpl_backend#$kpl_backend#g `find $config_workspace -type f -name "*.yaml"`
sudo sed -i s#usercenter_frontend#$usercenter_frontend#g `find $config_workspace -type f -name "*.yaml"` sudo sed -i s#usercenter_frontend#$usercenter_frontend#g `find $config_workspace -type f -name "*.yaml"`
sudo sed -i s#usercenter_backend#$usercenter_backend#g `find $config_workspace -type f -name "*.yaml"` sudo sed -i s#usercenter_backend#$usercenter_backend#g `find $config_workspace -type f -name "*.yaml"`
sudo sed -i s#seetaas_back_socket#$seetaas_back_socket#g `find $config_workspace -type f -name "*.yaml"` sudo sed -i s#kpl_back_socket#$kpl_back_socket#g `find $config_workspace -type f -name "*.yaml"`
sudo sed -i s#seetaas_imageproxy#$seetaas_imageproxy#g `find $config_workspace -type f -name "*.yaml"` sudo sed -i s#kpl_imageproxy#$kpl_imageproxy#g `find $config_workspace -type f -name "*.yaml"`
sudo sed -i s#mobile_frontend#$mobile_frontend#g `find $config_workspace -type f -name "*.yaml"` sudo sed -i s#mobile_frontend#$mobile_frontend#g `find $config_workspace -type f -name "*.yaml"`
sudo sed -i s#custom_source#$custom_source#g `find $config_workspace -type f -name "*.yaml"` sudo sed -i s#custom_source#$custom_source#g `find $config_workspace -type f -name "*.yaml"`
sudo sed -i s#hb_host#$hb_host#g `find $config_workspace -type f -name "*.yaml"` sudo sed -i s#hb_host#$hb_host#g `find $config_workspace -type f -name "*.yaml"`
################################################################# #######################################kpl################################
#cp ~/.docker/config.json $workspace/src/autodl-core/conf/ sudo sed -i s#kpl_db_name#$kpl_db_name#g `find $config_workspace -type f -name "*.yaml"`
#cp ~/.docker/config.json $workspace/src/seetaas-backend/conf/ sudo sed -i s#kpl_service_id#$kpl_service_id#g `find $config_workspace -type f -name "*.yaml"`
#测试环境部署的仓库是registry。pod内部推送镜像不需要认证。 sudo sed -i s#kpl_realy_path#$kpl_realy_path#g `find $config_workspace -type f -name "*.yaml"`
########################################autodl配置文件#######################################
#sudo sed -i s#autodl_es#$autodl_es#g `find $config_workspace -type f -name "*.yaml"`
#sudo sed -i s#deploy_is_private#$deploy_is_private#g `find $config_workspace -type f -name "*.yaml"`
#sudo sed -i s#autodl_backend#$autodl_backend#g `find $config_workspace -type f -name "*.yaml"`
#sudo sed -i s#autodl_admin_backend#$autodl_admin_backend#g `find $config_workspace -type f -name "*.yaml"`
##############################################################################
#sudo sed -i s#autodl_backend#$autodl_backend#g `find $config_workspace -type f -name "*.yaml"`
#sudo sed -i s#autodl_back_socket#$autodl_back_socket#g `find $config_workspace -type f -name "*.yaml"`
#sudo sed -i s#autodl_file#$autodl_file#g `find $config_workspace -type f -name "*.yaml"`
#sudo sed -i s#autodl_admin_backend#$autodl_admin_backend#g `find $config_workspace -type f -name "*.yaml"`
#sudo sed -i s#autodl_admin_back_socket#$autodl_admin_back_socket#g `find $config_workspace -type f -name "*.yaml"`
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: seetaas--frontend name: kpl--frontend
namespace: seetaas namespace: kpl
spec: spec:
type: NodePort type: NodePort
selector: selector:
app: seetaas--frontend app: kpl--frontend
ports: ports:
- port: 80 - port: 80
name: port-80 name: port-80
......
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
name: seetaas--frontend name: kpl--frontend
namespace: seetaas namespace: kpl
spec: spec:
replicas: 1 replicas: 1
template: template:
metadata: metadata:
labels: labels:
app: seetaas--frontend app: kpl--frontend
spec: spec:
imagePullSecrets: imagePullSecrets:
- name: "harbor-secret" - name: "harbor-secret"
nodeSelector: nodeSelector:
internal_service_node: "true" internal_service_node: "true"
containers: containers:
- name: seetaas--frontend - name: kpl--frontend
image: DOCKER_REGISTRY/seetaas--frontend:latest image: DOCKER_REGISTRY/kpl--frontend:latest
imagePullPolicy: Always imagePullPolicy: Always
volumeMounts: volumeMounts:
- name: config - name: config
...@@ -40,4 +40,4 @@ spec: ...@@ -40,4 +40,4 @@ spec:
volumes: volumes:
- name: config - name: config
configMap: configMap:
name: cfg-seetaas-frontend name: cfg-kpl-frontend
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
name: seetaas--deploy name: kpl--deploy
namespace: seetaas namespace: kpl
spec: spec:
replicas: 1 replicas: 1
template: template:
metadata: metadata:
labels: labels:
app: seetaas--deploy app: kpl--deploy
logCollect: "true" logCollect: "true"
spec: spec:
imagePullSecrets: imagePullSecrets:
- name: "harbor-secret" - name: "harbor-secret"
serviceAccountName: seetaas-serviceaccount serviceAccountName: kpl-serviceaccount
nodeSelector: nodeSelector:
seetaas: "true" kpl: "true"
internal_service_node: "true" internal_service_node: "true"
containers: containers:
- name: seetaas--deploy - name: kpl--deploy
image: DOCKER_REGISTRY/seetaas-backend-v1:latest image: DOCKER_REGISTRY/kpl-backend-v1:latest
imagePullPolicy: Always imagePullPolicy: Always
volumeMounts: volumeMounts:
- name: docker-sock - name: docker-sock
...@@ -28,7 +28,7 @@ spec: ...@@ -28,7 +28,7 @@ spec:
- name: config - name: config
mountPath: /adl/bin/conf/app.yaml mountPath: /adl/bin/conf/app.yaml
subPath: app.yaml subPath: app.yaml
command: ["seetaas--deploy"] command: ["kpl--deploy"]
ports: ports:
- containerPort: 8921 - containerPort: 8921
name: port-8921 name: port-8921
...@@ -50,4 +50,4 @@ spec: ...@@ -50,4 +50,4 @@ spec:
path: /var/run/ path: /var/run/
- name: config - name: config
configMap: configMap:
name: cfg-seetaas-backend name: cfg-kpl-backend
...@@ -2,12 +2,12 @@ apiVersion: v1 ...@@ -2,12 +2,12 @@ apiVersion: v1
kind: Service kind: Service
metadata: metadata:
labels: labels:
app: seetaas--deploy app: kpl--deploy
name: seetaas--deploy name: kpl--deploy
namespace: seetaas namespace: kpl
spec: spec:
selector: selector:
app: seetaas--deploy app: kpl--deploy
ports: ports:
- port: 8921 - port: 8921
name: port-8921 name: port-8921
......
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
name: seetaas--image-proxy name: kpl--image-proxy
namespace: seetaas namespace: kpl
spec: spec:
replicas: 1 replicas: 1
template: template:
metadata: metadata:
labels: labels:
app: seetaas--image-proxy app: kpl--image-proxy
spec: spec:
imagePullSecrets: imagePullSecrets:
- name: "harbor-secret" - name: "harbor-secret"
serviceAccountName: seetaas-serviceaccount serviceAccountName: kpl-serviceaccount
nodeSelector: nodeSelector:
seetaas: "true" kpl: "true"
internal_service_node: "true" internal_service_node: "true"
containers: containers:
- name: seetaas--image-proxy - name: kpl--image-proxy
image: DOCKER_REGISTRY/image-proxy-v1:latest image: DOCKER_REGISTRY/image-proxy-v1:latest
imagePullPolicy: Always imagePullPolicy: Always
volumeMounts: volumeMounts:
- mountPath: /mnt/ceph - mountPath: /mnt/ceph
name: seetaas-volume name: kpl-volume
- name: docker-sock - name: docker-sock
mountPath: /var/run/docker.sock mountPath: /var/run/docker.sock
subPath: docker.sock subPath: docker.sock
...@@ -45,13 +45,13 @@ spec: ...@@ -45,13 +45,13 @@ spec:
cpu: "1000m" cpu: "1000m"
memory: "1024Mi" memory: "1024Mi"
volumes: volumes:
- name: seetaas-volume - name: kpl-volume
persistentVolumeClaim: persistentVolumeClaim:
claimName: seetaas-pvc claimName: kpl-pvc
readOnly: false readOnly: false
- name: docker-sock - name: docker-sock
hostPath: hostPath:
path: /var/run/ path: /var/run/
- name: config - name: config
configMap: configMap:
name: cfg-seetaas-backend name: cfg-kpl-backend
...@@ -2,12 +2,12 @@ apiVersion: v1 ...@@ -2,12 +2,12 @@ apiVersion: v1
kind: Service kind: Service
metadata: metadata:
labels: labels:
app: seetaas--image-proxy app: kpl--image-proxy
name: seetaas--image-proxy name: kpl--image-proxy
namespace: seetaas namespace: kpl
spec: spec:
selector: selector:
app: seetaas--image-proxy app: kpl--image-proxy
ports: ports:
- port: 8922 - port: 8922
name: port-8922 name: port-8922
......
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
name: seetaas--monitor name: kpl--monitor
namespace: seetaas namespace: kpl
spec: spec:
replicas: 1 replicas: 1
template: template:
metadata: metadata:
labels: labels:
app: seetaas--monitor app: kpl--monitor
logCollect: "true" logCollect: "true"
spec: spec:
imagePullSecrets: imagePullSecrets:
- name: "harbor-secret" - name: "harbor-secret"
serviceAccountName: seetaas-serviceaccount serviceAccountName: kpl-serviceaccount
nodeSelector: nodeSelector:
seetaas: "true" kpl: "true"
internal_service_node: "true" internal_service_node: "true"
containers: containers:
- name: seetaas--monitor - name: kpl--monitor
image: DOCKER_REGISTRY/seetaas-backend-v1:latest image: DOCKER_REGISTRY/kpl-backend-v1:latest
imagePullPolicy: Always imagePullPolicy: Always
volumeMounts: volumeMounts:
- mountPath: /mnt/ceph - mountPath: /mnt/ceph
name: seetaas-volume name: kpl-volume
- name: docker-sock - name: docker-sock
mountPath: /var/run/docker.sock mountPath: /var/run/docker.sock
subPath: docker.sock subPath: docker.sock
- name: config - name: config
mountPath: /adl/bin/conf/app.yaml mountPath: /adl/bin/conf/app.yaml
subPath: app.yaml subPath: app.yaml
command: ["seetaas--monitor"] command: ["kpl--monitor"]
ports: ports:
- containerPort: 8920 - containerPort: 8920
name: port-8920 name: port-8920
...@@ -47,13 +47,13 @@ spec: ...@@ -47,13 +47,13 @@ spec:
cpu: "1000m" cpu: "1000m"
memory: "1024Mi" memory: "1024Mi"
volumes: volumes:
- name: seetaas-volume - name: kpl-volume
persistentVolumeClaim: persistentVolumeClaim:
claimName: seetaas-pvc claimName: kpl-pvc
readOnly: false readOnly: false
- name: docker-sock - name: docker-sock
hostPath: hostPath:
path: /var/run/ path: /var/run/
- name: config - name: config
configMap: configMap:
name: cfg-seetaas-backend name: cfg-kpl-backend
...@@ -2,12 +2,12 @@ apiVersion: v1 ...@@ -2,12 +2,12 @@ apiVersion: v1
kind: Service kind: Service
metadata: metadata:
labels: labels:
app: seetaas--monitor app: kpl--monitor
name: seetaas--monitor name: kpl--monitor
namespace: seetaas namespace: kpl
spec: spec:
selector: selector:
app: seetaas--monitor app: kpl--monitor
ports: ports:
- port: 8920 - port: 8920
name: port-8920 name: port-8920
......
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: seetaas--nginx-svc name: kpl--nginx-svc
namespace: seetaas namespace: kpl
spec: spec:
type: NodePort type: NodePort
selector: selector:
app: seetaas--nginx app: kpl--nginx
ports: ports:
- port: 80 - port: 80
name: port-80 name: port-80
......
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
name: seetaas--nginx name: kpl--nginx
namespace: seetaas namespace: kpl
spec: spec:
replicas: 1 replicas: 1
template: template:
metadata: metadata:
labels: labels:
app: seetaas--nginx app: kpl--nginx
spec: spec:
imagePullSecrets: imagePullSecrets:
- name: "harbor-secret" - name: "harbor-secret"
nodeSelector: nodeSelector:
seetaas: "true" kpl: "true"
internal_service_node: "true" internal_service_node: "true"
containers: containers:
- name: seetaas--nginx - name: kpl--nginx
image: DOCKER_REGISTRY/seetaas--nginx:latest image: DOCKER_REGISTRY/kpl--nginx:latest
imagePullPolicy: Always imagePullPolicy: Always
volumeMounts: volumeMounts:
- name: config - name: config
...@@ -54,7 +54,7 @@ spec: ...@@ -54,7 +54,7 @@ spec:
volumes: volumes:
- name: config - name: config
configMap: configMap:
name: cfg-seetaas-nginx name: cfg-kpl-nginx
items: items:
- key: apiserver.conf - key: apiserver.conf
path: default.conf path: default.conf
......
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
name: seetaas--backend name: kpl--backend
namespace: seetaas namespace: kpl
spec: spec:
replicas: 1 replicas: 1
template: template:
metadata: metadata:
labels: labels:
app: seetaas--backend app: kpl--backend
spec: spec:
imagePullSecrets: imagePullSecrets:
- name: "harbor-secret" - name: "harbor-secret"
serviceAccountName: seetaas-serviceaccount serviceAccountName: kpl-serviceaccount
nodeSelector: nodeSelector:
seetaas: "true" kpl: "true"
internal_service_node: "true" internal_service_node: "true"
containers: containers:
- name: seetaas--backend - name: kpl--backend
image: DOCKER_REGISTRY/seetaas-backend-v1:latest image: DOCKER_REGISTRY/kpl-backend-v1:latest
imagePullPolicy: Always imagePullPolicy: Always
volumeMounts: volumeMounts:
- mountPath: /mnt/ceph - mountPath: /mnt/ceph
name: seetaas-volume name: kpl-volume
- name: docker-sock - name: docker-sock
mountPath: /var/run/docker.sock mountPath: /var/run/docker.sock
subPath: docker.sock subPath: docker.sock
- name: config - name: config
mountPath: /adl/bin/conf/app.yaml mountPath: /adl/bin/conf/app.yaml
subPath: app.yaml subPath: app.yaml
command: ["seetaas--backend"] command: ["kpl--backend"]
ports: ports:
- containerPort: 8919 - containerPort: 8919
name: port-8919 name: port-8919
...@@ -46,13 +46,13 @@ spec: ...@@ -46,13 +46,13 @@ spec:
cpu: "6000m" cpu: "6000m"
memory: "8Gi" memory: "8Gi"
volumes: volumes:
- name: seetaas-volume - name: kpl-volume
persistentVolumeClaim: persistentVolumeClaim:
claimName: seetaas-pvc claimName: kpl-pvc
readOnly: false readOnly: false
- name: docker-sock - name: docker-sock
hostPath: hostPath:
path: /var/run/ path: /var/run/
- name: config - name: config
configMap: configMap:
name: cfg-seetaas-backend name: cfg-kpl-backend
...@@ -2,12 +2,12 @@ apiVersion: v1 ...@@ -2,12 +2,12 @@ apiVersion: v1
kind: Service kind: Service
metadata: metadata:
labels: labels:
app: seetaas--backend app: kpl--backend
name: seetaas--backend name: kpl--backend
namespace: seetaas namespace: kpl
spec: spec:
selector: selector:
app: seetaas--backend app: kpl--backend
ports: ports:
- port: 8919 - port: 8919
name: port-8919 name: port-8919
......
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
name: seetaas--worker name: kpl--worker
namespace: seetaas namespace: kpl
spec: spec:
replicas: 1 replicas: 1
template: template:
metadata: metadata:
labels: labels:
app: seetaas--worker app: kpl--worker
spec: spec:
imagePullSecrets: imagePullSecrets:
- name: "harbor-secret" - name: "harbor-secret"
serviceAccountName: seetaas-serviceaccount serviceAccountName: kpl-serviceaccount
nodeSelector: nodeSelector:
seetaas: "true" kpl: "true"
internal_service_node: "true" internal_service_node: "true"
containers: containers:
- name: seetaas--worker - name: kpl--worker
image: DOCKER_REGISTRY/seetaas-backend-v1:latest image: DOCKER_REGISTRY/kpl-backend-v1:latest
imagePullPolicy: Always imagePullPolicy: Always
volumeMounts: volumeMounts:
- mountPath: /mnt/ceph - mountPath: /mnt/ceph
name: seetaas-volume name: kpl-volume
- name: docker-sock - name: docker-sock
mountPath: /var/run/docker.sock mountPath: /var/run/docker.sock
subPath: docker.sock subPath: docker.sock
...@@ -38,7 +38,7 @@ spec: ...@@ -38,7 +38,7 @@ spec:
path: /health path: /health
port: wport-8080 port: wport-8080
scheme: HTTP scheme: HTTP
args: ["seetaas--script && seetaas--worker"] args: ["kpl--script && kpl--worker"]
resources: resources:
requests: requests:
cpu: "500m" cpu: "500m"
...@@ -47,13 +47,13 @@ spec: ...@@ -47,13 +47,13 @@ spec:
cpu: "1000m" cpu: "1000m"
memory: "1024Mi" memory: "1024Mi"
volumes: volumes:
- name: seetaas-volume - name: kpl-volume
persistentVolumeClaim: persistentVolumeClaim:
claimName: seetaas-pvc claimName: kpl-pvc
readOnly: false readOnly: false
- name: docker-sock - name: docker-sock
hostPath: hostPath:
path: /var/run/ path: /var/run/
- name: config - name: config
configMap: configMap:
name: cfg-seetaas-backend name: cfg-kpl-backend
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
name: seetaas--workspace-worker name: kpl--workspace-worker
namespace: seetaas namespace: kpl
spec: spec:
replicas: 1 replicas: 1
template: template:
metadata: metadata:
labels: labels:
app: seetaas--workspace-worker app: kpl--workspace-worker
spec: spec:
imagePullSecrets: imagePullSecrets:
- name: "harbor-secret" - name: "harbor-secret"
serviceAccountName: seetaas-serviceaccount serviceAccountName: kpl-serviceaccount
nodeSelector: nodeSelector:
seetaas: "true" kpl: "true"
internal_service_node: "true" internal_service_node: "true"
containers: containers:
- name: seetaas--workspace-worker - name: kpl--workspace-worker
image: DOCKER_REGISTRY/seetaas-backend-v1:latest image: DOCKER_REGISTRY/kpl-backend-v1:latest
imagePullPolicy: Always imagePullPolicy: Always
volumeMounts: volumeMounts:
- mountPath: /mnt/ceph - mountPath: /mnt/ceph
name: seetaas-volume name: kpl-volume
- name: docker-sock - name: docker-sock
mountPath: /var/run/docker.sock mountPath: /var/run/docker.sock
subPath: docker.sock subPath: docker.sock
- name: config - name: config
mountPath: /adl/bin/conf/app.yaml mountPath: /adl/bin/conf/app.yaml
subPath: app.yaml subPath: app.yaml
command: ["seetaas--workspace-worker"] command: ["kpl--workspace-worker"]
ports: ports:
- containerPort: 8080 - containerPort: 8080
name: wwport-8080 name: wwport-8080
...@@ -46,13 +46,13 @@ spec: ...@@ -46,13 +46,13 @@ spec:
cpu: "1000m" cpu: "1000m"
memory: "1024Mi" memory: "1024Mi"
volumes: volumes:
- name: seetaas-volume - name: kpl-volume
persistentVolumeClaim: persistentVolumeClaim:
claimName: seetaas-pvc claimName: kpl-pvc
readOnly: false readOnly: false
- name: docker-sock - name: docker-sock
hostPath: hostPath:
path: /var/run/ path: /var/run/
- name: config - name: config
configMap: configMap:
name: cfg-seetaas-backend name: cfg-kpl-backend
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!