update k8s yaml

This commit is contained in:
wusong
2022-03-07 18:48:48 +08:00
parent 59e3b1d648
commit 0422d19ff2
2 changed files with 19 additions and 11 deletions

View File

@@ -5,20 +5,23 @@ metadata:
namespace: crawlab namespace: crawlab
spec: spec:
ports: ports:
- port: 8080 - port: 80
targetPort: 8080 targetPort: 8080
nodePort: 30088 name: http
- name: grpc
port: 9666
targetPort: 9666
selector: selector:
app: crawlab-master app: crawlab-master
type: NodePort type: ClusterIP
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
kind: StatefulSet kind: Deployment
metadata: metadata:
name: crawlab-master name: crawlab-master
namespace: crawlab namespace: crawlab
spec: spec:
serviceName: crawlab-master
selector: selector:
matchLabels: matchLabels:
app: crawlab-master app: crawlab-master
@@ -28,11 +31,11 @@ spec:
app: crawlab-master app: crawlab-master
spec: spec:
containers: containers:
- image: tikazyq/crawlab:latest - image: crawlabteam/crawlab:latest
imagePullPolicy: Always imagePullPolicy: Always
name: crawlab name: crawlab
env: env:
- name: CRAWLAB_SERVER_MASTER - name: CRAWLAB_NODE_MASTER
value: "Y" value: "Y"
- name: CRAWLAB_MONGO_HOST - name: CRAWLAB_MONGO_HOST
value: "mongo" value: "mongo"
@@ -51,3 +54,5 @@ spec:
ports: ports:
- containerPort: 8080 - containerPort: 8080
name: crawlab name: crawlab
- containerPort: 9666
name: grpc

View File

@@ -1,10 +1,9 @@
apiVersion: apps/v1 apiVersion: apps/v1
kind: StatefulSet kind: Deployment
metadata: metadata:
name: crawlab-worker name: crawlab-worker
namespace: crawlab namespace: crawlab
spec: spec:
serviceName: crawlab-worker
replicas: 2 replicas: 2
selector: selector:
matchLabels: matchLabels:
@@ -19,7 +18,7 @@ spec:
imagePullPolicy: Always imagePullPolicy: Always
name: crawlab name: crawlab
env: env:
- name: CRAWLAB_SERVER_MASTER - name: CRAWLAB_NODE_MASTER
value: "N" value: "N"
- name: CRAWLAB_MONGO_HOST - name: CRAWLAB_MONGO_HOST
value: "mongo" value: "mongo"
@@ -33,3 +32,7 @@ spec:
value: "Y" value: "Y"
- name: CRAWLAB_SERVER_REGISTER_TYPE - name: CRAWLAB_SERVER_REGISTER_TYPE
value: "hostname" value: "hostname"
- name: CRAWLAB_GRPC_ADDRESS
value: "crawlab"
- name: CRAWLAB_FS_FILER_URL
value: "http://crawlab/api/filer"