我有一个包含以下内容的文件,
- groups:
- system:bootstrappers
- system:nodes
rolearn: arn:aws:iam::1234566:role/radeks-project-us-east-1-NodeInstanceRole
username: system:node:{{EC2PrivateDNSName}}
我想附加这个文件内容,如下所示,前两行是 eks ,iammappings,
eks:
iammappings:
- groups:
- system:bootstrappers
- system:nodes
rolearn: arn:aws:iam::1234566:role/radeks-project-us-east-1-NodeInstanceRole
username: system:node:{{EC2PrivateDNSName}}
我尝试了 yq 合并。但它对我不起作用。请让我知道如何执行此操作。