我们正在使用 Openshift(Kubernetes 的托管版本),我正在努力将部署配置创建的所有 pod 的 pod 重启策略从“始终”设置为“从不”,但我不确定 yaml 中的位置做出这一改变。
我们的部署配置如下所示:
kind: DeploymentConfig
metadata:
generation: 19
name: my-deployment-config
namespace: my-deployment-config-namespace
selfLink: >-
...
uid: af918183-c780-11ea-8945-525400d3e4d9
spec:
replicas: 1
revisionHistoryLimit: 10
selector:
name: my-selector
strategy:
activeDeadlineSeconds: 21600
resources: {}
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
template:
metadata:
...
spec:
containers:
- image: >-
(image source)
imagePullPolicy: Always
name: my-container
ports:
- containerPort: 8080
protocol: TCP
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
restartPolicy: Always
schedulerName: default-scheduler …Run Code Online (Sandbox Code Playgroud)