Kustomizeで共通で定義したいフィールドを埋め込む

1
2
3
$ kubectl vesrion
Client Version: v1.28.1
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
configMapGenerator:
  - name: datadog-config
    options:
      disableNameSuffixHash: true
    literals:
      - DD_AGENT_HOST=status.hostIP
replacements:
  - source:
      kind: ConfigMap
      name: datadog-config
      fieldPath: data.DD_AGENT_HOST
    targets:
      - select:
          kind: Deployment
          group: apps
        fieldPaths:
          - spec.template.spec.containers.*.env.[name=DD_AGENT_HOST].valueFrom.fieldRef.fieldPath
        options:
          create: true
> back to posts