Skip to content

Commit

Permalink
update deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahoo-Wang committed Jun 20, 2023
1 parent 6b8adbf commit c44078a
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 37 deletions.
35 changes: 14 additions & 21 deletions k8s/deployment/cosky-cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,32 @@ metadata:
app: cosky
spec:
replicas: 1

selector:
matchLabels:
app: cosky
template:
metadata:
labels:
app: cosky
annotations:
instrumentation.opentelemetry.io/inject-java: "true"
spec:
containers:
- env:
- name: LANG
value: C.utf8
- name: SPRING_DATA_REDIS_CLUSTER_NODES
value: redis-host:6379
- name: SPRING_REDIS_CLUSTER_MAX_REDIRECTS
value: "3"
valueFrom:
secretKeyRef:
name: redis-secret
key: nodes
- name: SPRING_DATA_REDIS_PASSWORD
value: redis-pwd
valueFrom:
secretKeyRef:
name: redis-secret
key: password
- name: SPRING_DATA_REDIS_CLUSTER_MAX_REDIRECTS
value: "3"
- name: TZ
value: Asia/Shanghai
image: registry.cn-shanghai.aliyuncs.com/ahoo/cosky:4.0.0
Expand Down Expand Up @@ -58,19 +67,3 @@ spec:
type: ""
name: volume-localtime

---
apiVersion: v1
kind: Service
metadata:
name: cosky
labels:
app: cosky
spec:
selector:
app: cosky
ports:
- name: rest
port: 80
protocol: TCP
targetPort: 8080

14 changes: 14 additions & 0 deletions k8s/deployment/cosky-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: cosky
labels:
app: cosky
spec:
selector:
app: cosky
ports:
- name: rest
port: 80
protocol: TCP
targetPort: 8080
18 changes: 2 additions & 16 deletions k8s/deployment/cosky.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ spec:
metadata:
labels:
app: cosky
annotations:
instrumentation.opentelemetry.io/inject-java: "true"
spec:
containers:
- env:
Expand Down Expand Up @@ -55,19 +57,3 @@ spec:
type: ""
name: volume-localtime

---
apiVersion: v1
kind: Service
metadata:
name: cosky
labels:
app: cosky
spec:
selector:
app: cosky
ports:
- name: rest
port: 80
protocol: TCP
targetPort: 8080

0 comments on commit c44078a

Please sign in to comment.