【发布时间】:2021-02-15 09:05:35
【问题描述】:
我正在尝试使用 kustomize 应用一个补丁,将 ownerReferences 添加到基础中的所有资源
我想做这样的事情:
# kustomization.yaml
resources:
- deployment.yaml
- svc.yaml
secretGenerator:
- name: mysecret
files:
- mysecret.txt
patches:
- owner_references.yaml
# owner_references.yaml
metadata:
ownerReferences:
- apiVersion: my.crdapi/v1
blockOwnerDeletion: true
controller: true
kind: MyCrd
name: all-the-things
uid: <todo>
但我得到了错误:
error unmarshaling JSON: while decoding JSON: Object 'Kind' is missing in
所以看起来 kustomize 需要一个“Kind:”的补丁?但我想修补所有资源..
谁能提出一个好的方法来做到这一点?谢谢:)
【问题讨论】:
标签: kubernetes kubectl kustomize