forked from mtusi2026/mtusi2026lab3
36 lines
1.0 KiB
YAML
36 lines
1.0 KiB
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata: {name: pingap}
|
|
spec:
|
|
type: LoadBalancer
|
|
allocateLoadBalancerNodePorts: false
|
|
selector: {app: pingap}
|
|
ports: [{name: http, port: 80, targetPort: http}]
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata: {name: pingap}
|
|
spec:
|
|
replicas: 1
|
|
selector: {matchLabels: {app: pingap}}
|
|
template:
|
|
metadata: {labels: {app: pingap}}
|
|
spec:
|
|
automountServiceAccountToken: false
|
|
terminationGracePeriodSeconds: 25
|
|
containers:
|
|
- name: pingap
|
|
image: vp-pingap:local
|
|
imagePullPolicy: Never
|
|
args: [-c, /etc/pingap/pingap.toml, --autoreload, --strict]
|
|
ports: [{name: http, containerPort: 8080}]
|
|
resources:
|
|
requests: {cpu: 50m, memory: 32Mi}
|
|
limits: {cpu: 500m, memory: 128Mi}
|
|
readinessProbe:
|
|
tcpSocket: {port: http}
|
|
periodSeconds: 1
|
|
volumeMounts: [{name: configuration, mountPath: /etc/pingap, readOnly: true}]
|
|
volumes:
|
|
- {name: configuration, configMap: {name: pingap-config}}
|