Commit 9255d7b5 authored by zhouwei's avatar zhouwei

部署配置文件

parent ad977310
FROM openjdk:8 FROM openjdk:8
ARG JAR_FILE=target/*.jar ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar COPY ${JAR_FILE} app.jar
COPY apiclient_key.pem apiclient_key.pem
ENTRYPOINT ["java","-jar","/app.jar"] ENTRYPOINT ["java","-jar","/app.jar"]
\ No newline at end of file
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: securitylink-user name: sl-config-center
namespace: securitylink namespace: securitylink
spec: spec:
replicas: 1 replicas: 1
selector: selector:
matchLabels: matchLabels:
app: securitylink-user app: sl-config-center
template: template:
metadata: metadata:
labels: labels:
app: securitylink-user app: sl-config-center
spec: spec:
containers: containers:
- name: securitylink-user - name: sl-config-center
image: 381492067916.dkr.ecr.ap-east-1.amazonaws.com/securitylink-user:latest image: 381492067916.dkr.ecr.ap-east-1.amazonaws.com/sl-config-center:latest
resources: resources:
limits: limits:
memory: "2Gi" memory: "2Gi"
cpu: "1000m" cpu: "1000m"
requests: requests:
memory: "500Mi" memory: "500Mi"
cpu: "500m" cpu: "200m"
ports: ports:
- name: httpport - name: httpport
containerPort: 8080 containerPort: 8080
livenessProbe: livenessProbe:
tcpSocket: tcpSocket:
port: 8080 port: 8080
initialDelaySeconds: 90 initialDelaySeconds: 30
periodSeconds: 10 periodSeconds: 10
timeoutSeconds: 5 timeoutSeconds: 5
failureThreshold: 5 failureThreshold: 5
......
...@@ -3,7 +3,7 @@ apiVersion: v1 ...@@ -3,7 +3,7 @@ apiVersion: v1
kind: Service kind: Service
metadata: metadata:
namespace: securitylink namespace: securitylink
name: securitylink-user name: sl-config-center
spec: spec:
ports: ports:
- port: 8080 - port: 8080
...@@ -11,13 +11,13 @@ spec: ...@@ -11,13 +11,13 @@ spec:
protocol: TCP protocol: TCP
type: NodePort type: NodePort
selector: selector:
app: securitylink-user app: sl-config-center
--- ---
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:
namespace: securitylink namespace: securitylink
name: ingress-securitylink-user name: ingress-sl-config-center
annotations: annotations:
alb.ingress.kubernetes.io/scheme: internet-facing alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/target-type: ip alb.ingress.kubernetes.io/target-type: ip
...@@ -30,6 +30,6 @@ spec: ...@@ -30,6 +30,6 @@ spec:
pathType: Prefix pathType: Prefix
backend: backend:
service: service:
name: securitylink-user name: sl-config-center
port: port:
number: 8080 number: 8080
\ No newline at end of file
spring.application.name=configCenter spring.application.name=sl-config-center
server.port=8081 server.port=8080
#spring.profiles.active=qa #spring.profiles.active=qa
#server.servlet.context-path=/api #server.servlet.context-path=/api
spring.cloud.config.server.git.uri=http://git.ssish.com/zhouwei/sl-config.git spring.cloud.config.server.git.uri=http://git.ssish.com/zhouwei/sl-config.git
......
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