提交 e70b87b3 作者: 余乾开

feat(config):滚动升级

上级 52b92f67
...@@ -4,6 +4,8 @@ metadata: ...@@ -4,6 +4,8 @@ metadata:
name: ims-deployment name: ims-deployment
namespace: default namespace: default
spec: spec:
minReadySeconds: 250
revisionHistoryLimit: 2
replicas: 1 replicas: 1
selector: selector:
matchLabels: matchLabels:
...@@ -18,7 +20,7 @@ spec: ...@@ -18,7 +20,7 @@ spec:
image: REGISTRY/NAMESPACE/IMAGE:TAG image: REGISTRY/NAMESPACE/IMAGE:TAG
resources: resources:
limits: limits:
memory: 4096Mi memory: 1024Mi
cpu: 100m cpu: 100m
ports: ports:
- containerPort: 10001 - containerPort: 10001
......
apiVersion: apps/v1
kind: Deployment
metadata:
name: ims-deployment
spec:
replicas: 2
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
\ No newline at end of file
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
- ../../base - ../../base
#namePrefix: dev- #namePrefix: dev-
namespace: dev namespace: dev
commonLabels: commonLabels:
...@@ -9,12 +9,13 @@ commonLabels: ...@@ -9,12 +9,13 @@ commonLabels:
commonAnnotations: commonAnnotations:
note: This is dev! note: This is dev!
patches: patches:
- path: ./configMap.yaml - path: ./increase_replicas.yaml
- path: ./service-patch.yaml - path: ./configMap.yaml
target: - path: ./service-patch.yaml
kind: Service target:
name: ims-svc kind: Service
name: ims-svc
images: images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG - name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/ims newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/ims
newTag: 01424bfc71116f6733576e8f34d41d92aa8d3af3 newTag: 01424bfc71116f6733576e8f34d41d92aa8d3af3
\ No newline at end of file
...@@ -3,7 +3,9 @@ kind: Deployment ...@@ -3,7 +3,9 @@ kind: Deployment
metadata: metadata:
name: ims-deployment name: ims-deployment
spec: spec:
replicas: 1 replicas: 2
# template: strategy:
# spec: type: RollingUpdate
# nodeName: master rollingUpdate:
\ No newline at end of file maxSurge: 1
maxUnavailable: 1
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论