Open dlarson04 opened 9 months ago
agent-install.sh runs a command
kubectl get deployment agent -n mesh-ns01 -o 'jsonpath={.spec.template.spec.containers[0].env}'
to check for an environment variable. The script is expecting json as an output but my environment returns
# kubectl get deployment agent -n mesh-ns01 -o 'jsonpath={.spec.template.spec.containers[0].env}' [map[name:HZN_ORG_ID value:saasops] map[name:AGENT_NAMESPACE value:mesh-ns01] map[name:HZN_NAMESPACE_SCOPED value:true] map[name:AGENT_CLUSTER_IMAGE_REGISTRY_HOST value:__ImageRegistryHost__] map[name:HZN_MGMT_HUB_CERT_PATH value:/etc/default/cert/agent-install.crt]]
that is not json
so the next part of the that script
jq -r '.[] | select(.name=="HZN_NAMESPACE_SCOPED").value'
fails.
I changed it to
local namespace_scoped_env_value_in_use=$($KUBECTL get deployment agent -n ${namespace_to_check} -o json | jq '.spec.template.spec.containers[0].env' | jq -r '.[] | select(.name=="HZN_NAMESPACE_SCOPED").value')
and that worked...
No response
Linux
Describe the bug.
agent-install.sh runs a command
to check for an environment variable. The script is expecting json as an output but my environment returns
that is not json
so the next part of the that script
fails.
I changed it to
and that worked...
Describe the steps to reproduce the behavior.
No response
Expected behavior.
No response
Screenshots.
No response
Operating Environment
Linux
Additional Information
No response