Commit 1069c38d by peterchu

fix:1.修改部署配置

parent 7cb2843c
# 指定基础镜像
FROM openjdk:8-jdk-alpine
VOLUME /log
# 维护者信息
MAINTAINER wangyu(wangyu@yutu-it.com)
# 用于指定持久化目录
......@@ -15,7 +14,7 @@ RUN echo '#!/bin/sh' >/root/run.sh
RUN echo "nohup java -Djava.security.egd=file:/dev/./urandom $javaopt -jar /app.jar --spring.profiles.active=prod >/usr/java/logs/app.log 2>&1" >>/root/run.sh
RUN chmod 755 /root/run.sh
# 指定于外界交互的端口
EXPOSE 8066
EXPOSE 8270
ENV TZ Asia/Shanghai
ENV LANG C.UTF-8
# 配置容器,使其可执行化
......
......@@ -4,9 +4,9 @@ kind: ConfigMap
metadata:
name: polestar-statement-servicesfilebeatconfig
name: myPjNamefilebeatconfig
namespace: yutu
namespace: myNameSpace
labels:
......@@ -34,7 +34,7 @@ data:
fields:
log_topics: polestar-statement-services
log_topics: myIndexName
#pod_name: '${pod_name}'
......@@ -48,46 +48,46 @@ data:
# The Logstash hosts
hosts: ["192.168.0.220:5044"]
hosts: ["myLogstashHost:5044"]
---
apiVersion: v1
kind: Service
metadata:
name: polestar-statement-services
namespace: yutu
name: myPjName
namespace: myNameSpace
labels:
k8s.eip.work/layer: web
k8s.eip.work/name: polestar-statement-services
k8s.eip.work/name: myPjName
spec:
selector:
app: polestar-statement-services
app: myPjName
release: canary
type: NodePort
ports:
- name: http
targetPort: 8080 # application.yml port: 8080
targetPort: 8080
port: 8999
nodePort: 32483
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: polestar-statement-services
namespace: yutu
name: myPjName
namespace: myNameSpace
labels:
k8s.eip.work/layer: web
k8s.eip.work/name: polestar-statement-services
k8s.eip.work/name: myPjName
spec:
replicas: 1
selector:
matchLabels:
app: polestar-statement-services
app: myPjName
release: canary
template:
metadata:
labels:
app: polestar-statement-services
app: myPjName
release: canary
spec:
#hostAliases:
......@@ -97,8 +97,8 @@ spec:
imagePullSecrets:
- name: secret-harbor
containers:
- name: polestar-statement-servicesfilebeat
image: docker.elastic.co/beats/filebeat:7.10.1
- name: myPjNamefilebeat
image: myFilebeatImageId
#lifecycle:
#lifecycle:
# type: Sidecar
......@@ -126,25 +126,25 @@ spec:
mountPath: /usr/share/filebeat/data
- name: logdata
mountPath: /logdata
- name: polestar-statement-services
image: 120.27.1.123:8089/yutu/polestar-statement-services:20210326093442
#livenessProbe:
# tcpSocket:
# port: 8080
# initialDelaySeconds: 45
# periodSeconds: 45
# timeoutSeconds: 15
#readinessProbe:
# tcpSocket:
# port: 8080
# initialDelaySeconds: 45
# periodSeconds: 45
# timeoutSeconds: 15
- name: myPjName
image: myImageId
livenessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 45
periodSeconds: 45
timeoutSeconds: 15
readinessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 45
periodSeconds: 45
timeoutSeconds: 15
args:
- --link redis7010:redis
env:
- name: JAVA_OPTS
value: "-Xms2048m -Xmx2048m -XX:PermSize=2048M -XX:MaxPermSize=2048M"
value: "JAVA_OPTS_VALUE"
- name: NODE_IP
valueFrom:
fieldRef:
......@@ -163,7 +163,7 @@ spec:
emptyDir: {}
- name: config
configMap:
name: polestar-product-domesticfilebeatconfig
name: myPjNamefilebeatconfig
items:
- key: filebeat.yml
path: filebeat.yml
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment