Skip to content
This repository was archived by the owner on Dec 21, 2023. It is now read-only.
This repository was archived by the owner on Dec 21, 2023. It is now read-only.

bash: line 76: jq: command not found when running expose-keptn.sh, configure-istio.sh and multistage-delivery.sh #223

@TannerGilbert

Description

@TannerGilbert

Sinece #222 the istio-configuration/configure-istio.sh, quickstart/expose-keptn.sh and quickstart/multistage-delivery.sh use jq to parse JSON output of the kubectl version -ojson command.

This works well if the person executing the file already has jq installed but fails with the following error otherwise:

bash: line 76: jq: command not found

To make the script run the use has to install jq but there might be better solutions to solve this so the user doesn't need to take any extra steps. For example we could replace:

K8S_VERSION_MINOR=$(echo "$K8S_VERSION" | jq -r .serverVersion.minor)

with:

K8S_VERSION_MINOR=$(echo "$K8S_VERSION" | python -c "import sys, json; print(json.load(sys.stdin)['serverVersion']['minor'])")

which would now only require python to run (preinstalled on most systems).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions