我已经开始使用kustomize来更新 yaml 文件。我正在尝试为Deployment
对象添加标签。commonLabels
看起来不错,但它也适用于标签selector
(我不想要)
有没有办法只将新标签添加到metadata.labels
or spec.template.metadata.labels
?
这是一个示例deployment
对象:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
service: servieName
owner: ownerName
name: myName
spec:
replicas: 1
strategy:
type: Recreate
template:
metadata:
labels:
app: servieName
owner: ownerName
<newLableHere>: <newValueHere>
...