diff --git a/k8s/deployment/cosky-cluster.yml b/k8s/deployment/cosky-cluster.yml index cc7ec568..2ae1d333 100644 --- a/k8s/deployment/cosky-cluster.yml +++ b/k8s/deployment/cosky-cluster.yml @@ -6,7 +6,6 @@ metadata: app: cosky spec: replicas: 1 - selector: matchLabels: app: cosky @@ -14,15 +13,25 @@ spec: 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 @@ -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 - diff --git a/k8s/deployment/cosky-service.yaml b/k8s/deployment/cosky-service.yaml new file mode 100644 index 00000000..0a3b8a7a --- /dev/null +++ b/k8s/deployment/cosky-service.yaml @@ -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 \ No newline at end of file diff --git a/k8s/deployment/cosky.yml b/k8s/deployment/cosky.yml index f5c10f9b..ab08b5d0 100644 --- a/k8s/deployment/cosky.yml +++ b/k8s/deployment/cosky.yml @@ -13,6 +13,8 @@ spec: metadata: labels: app: cosky + annotations: + instrumentation.opentelemetry.io/inject-java: "true" spec: containers: - env: @@ -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 -