OKR/toc-upgrade/service_group/discover-service.yaml

144 lines
3.1 KiB
YAML

# apiVersion: v1
# kind: ConfigMap
# metadata:
# name: discovery-service
# data:
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: discovery-service
spec:
replicas: 1
selector:
matchLabels:
app: discovery-service
template:
metadata:
labels:
app: discovery-service
spec:
imagePullSecrets:
- name: docker-regcred
containers:
- name: discovery-service
image: beaconfireiic/service-discovery:1.1.0
imagePullPolicy: Always
ports:
- name: http
containerPort: 8761
protocol: TCP
env:
- name: "LOGGING_LEVEL_ROOT"
value: "info"
- name: "EUREKA_INSTANCE_HOSTNAME"
value: "discovery-service"
- name: "SERVER_PORT"
value: "8761"
- name: "LOG_APP-NAME"
value: "discovery-service"
- name: "SPRING_PROFILES_ACTIVE"
value: "sdet"
volumeMounts:
- name: app-logs
mountPath: /logs
resources:
requests:
cpu: 0.1
memory: 128Mi
limits:
cpu: 1
memory: 2Gi
volumes:
- name: app-logs
hostPath:
path: /data/app_logs/discovery-service
---
apiVersion: v1
kind: Service
metadata:
name: discovery-service
spec:
type: ClusterIP
ports:
- name: http
protocol: TCP
port: 8761
targetPort: http
selector:
app: discovery-service
---
# apiVersion: v1
# kind: ConfigMap
# metadata:
# name: gateway
# data:
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: gateway
spec:
replicas: 1
selector:
matchLabels:
app: gateway
template:
metadata:
labels:
app: gateway
spec:
imagePullSecrets:
- name: docker-regcred
containers:
- name: gateway
image: beaconfireiic/gateway:1.1.0
imagePullPolicy: Always
ports:
- name: http
containerPort: 8888
protocol: TCP
env:
- name: "LOGGING_LEVEL_ROOT"
value: "info"
- name: "EUREKA_INSTANCE_HOSTNAME"
value: "discovery-service"
- name: "SERVER_PORT"
value: "8888"
- name: "EUREKA_CLIENT_SERVICE-URL_DEFAULT-ZONE"
value: "http://discovery-service:8761/eureka/"
- name: "LOG_APP-NAME"
value: "gateway"
- name: "SPRING_PROFILES_ACTIVE"
value: "sdet"
volumeMounts:
- name: app-logs
mountPath: /logs
resources:
requests:
cpu: 0.1
memory: 128Mi
limits:
cpu: 1
memory: 2Gi
volumes:
- name: app-logs
hostPath:
path: /data/app_logs/gateway
---
apiVersion: v1
kind: Service
metadata:
name: gateway
spec:
type: ClusterIP
ports:
- name: http
protocol: TCP
port: 8888
targetPort: http
selector:
app: gateway