Kustomize resources.limits 패치


개요

kustomize resources 패치
set_memory.yaml

patchesStrategicMerge ★

별도 파일

kustomization.yaml
patchesStrategicMerge:
- set_memory.yaml
set_memory.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-nginx
spec:
  template:
    spec:
      containers:
      - name: my-nginx
        resources:
          limits:
            memory: 512Mi

인라인

kustomization.yaml
patchesStrategicMerge:
- |
  apiVersion: apps/v1
  kind: Deployment
  metadata:
    name: my-nginx
  spec:
    template:
      spec:
        containers:
        - name: my-nginx
          resources:
            limits:
              memory: 512Mi

patchesJson6902

별도 파일

kustomization.yaml
patchesJson6902:
- target:
    kind: Deployment
    name: my-nginx
  path: patch.yaml
patch.yaml
- op: replace
  path: /spec/template/spec/containers/0/resources/limits/memory
  value: 512Mi

인라인

kustomization.yaml
patchesJson6902:
- target:
    kind: Deployment
    name: my-nginx
  path: |
    - op: replace
      path: /spec/template/spec/containers/0/resources/limits/memory
      value: 512Mi

같이 보기

참고