小编sou*_*ala的帖子

使用jq,如何替换特定键的值?

如何替换xxxyyy

{
    "spec": {
        "template": {
            "spec": {
                "containers": [{
                    "args": [
                        "proxy",
                        "router",
                        "--domain",
                        "$(POD_NAMESPACE).svc.cluster.local",
                        "--proxyLogLevel=warning",
                        "--proxyComponentLogLevel=misc:error",
                        "--log_output_level=default:info",
                        "--serviceCluster",
                        "istio-ingressgateway"
                    ],
                    "env": [{
                            "name": "JWT_POLICY",
                            "value": "third-party-jwt"
                        },
                        {
                            "name": "ISTIO_META_OWNER",
                            "value": "kubernetes://apis/apps/v1/namespaces/istio-system/deployments/xxx"
                        }
                    ]
                }]
            }
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

replace json jq

7
推荐指数
1
解决办法
1万
查看次数

标签 统计

jq ×1

json ×1

replace ×1