mirror of
https://github.com/fluxcd/flux2.git
synced 2025-11-03 03:12:00 +08:00
Minimize deployment yaml
Signed-off-by: Philip Laine <philip.laine@gmail.com>
This commit is contained in:
@ -255,78 +255,12 @@ A deployment failure can be forced by setting an invalid image tag in the podinf
|
|||||||
```yaml
|
```yaml
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
|
||||||
name: podinfo
|
|
||||||
spec:
|
spec:
|
||||||
minReadySeconds: 3
|
|
||||||
revisionHistoryLimit: 5
|
|
||||||
progressDeadlineSeconds: 60
|
|
||||||
strategy:
|
|
||||||
rollingUpdate:
|
|
||||||
maxUnavailable: 0
|
|
||||||
type: RollingUpdate
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: podinfo
|
|
||||||
template:
|
template:
|
||||||
metadata:
|
|
||||||
annotations:
|
|
||||||
prometheus.io/scrape: "true"
|
|
||||||
prometheus.io/port: "9797"
|
|
||||||
labels:
|
|
||||||
app: podinfo
|
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: podinfod
|
- name: podinfod
|
||||||
image: ghcr.io/stefanprodan/podinfo:fake
|
image: ghcr.io/stefanprodan/podinfo:fake
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
containerPort: 9898
|
|
||||||
protocol: TCP
|
|
||||||
- name: http-metrics
|
|
||||||
containerPort: 9797
|
|
||||||
protocol: TCP
|
|
||||||
- name: grpc
|
|
||||||
containerPort: 9999
|
|
||||||
protocol: TCP
|
|
||||||
command:
|
|
||||||
- ./podinfo
|
|
||||||
- --port=9898
|
|
||||||
- --port-metrics=9797
|
|
||||||
- --grpc-port=9999
|
|
||||||
- --grpc-service-name=podinfo
|
|
||||||
- --level=info
|
|
||||||
- --random-delay=false
|
|
||||||
- --random-error=false
|
|
||||||
env:
|
|
||||||
- name: PODINFO_UI_COLOR
|
|
||||||
value: "#34577c"
|
|
||||||
livenessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- podcli
|
|
||||||
- check
|
|
||||||
- http
|
|
||||||
- localhost:9898/healthz
|
|
||||||
initialDelaySeconds: 5
|
|
||||||
timeoutSeconds: 5
|
|
||||||
readinessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- podcli
|
|
||||||
- check
|
|
||||||
- http
|
|
||||||
- localhost:9898/readyz
|
|
||||||
initialDelaySeconds: 5
|
|
||||||
timeoutSeconds: 5
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: 2000m
|
|
||||||
memory: 512Mi
|
|
||||||
requests:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 64Mi
|
|
||||||
```
|
```
|
||||||
|
|
||||||
After the commit has been reconciled it should return a failed commit status.
|
After the commit has been reconciled it should return a failed commit status.
|
||||||
|
|||||||
Reference in New Issue
Block a user