Skip to content

Bugs in cf-deploy-kubernets #24

@ramakuka-octarine

Description

@ramakuka-octarine

There seem to be a few bugs in the script
I think you guys are missing a comment sign (#) on line 51 (https://github.com/codefresh-io/cf-deploy-kubernetes/blob/master/cf-deploy-kubernetes.sh#L51)

    if [[ -z "${KUBECONTEXT}" ]]; then
        KUBECONTEXT=$(kubectl config current-context)
         If KUBECONFIG is set we obligate to set KUBECONTEXT to valid context name
        if [[ -n "${KUBECONFIG}" ]]; then
          echo -e "--- ERROR - KUBECONTEXT Environment variable is not set, please set it to one of integrated contexts: "
          kubectl config get-contexts

I currently get an error

./cf-deploy-kubernetes: line 51: If: command not found

I also see some errors with kubectl convert (https://github.com/codefresh-io/cf-deploy-kubernetes/blob/master/cf-deploy-kubernetes.sh#L118)

Error: unknown flag: --no-headers

When removing the flag from the script I am getting

error: unable to match a printer suitable for the output format "custom-columns=KIND:{.kind},NAME:{.metadata.name}", allowed formats are: go-template,go-template-file,json,jsonpath,jsonpath-file,name,template,templatefile,yaml

my k8s client version is

Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.0", GitCommit:"641856db18352033a0d96dbc99153fa3b27298e5", GitTreeState:"clean", BuildDate:"2019-03-25T15:53:57Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.5", GitCommit:"0e9fcb426b100a2aea5ed5c25b3d8cfbb01a8acf", GitTreeState:"clean", BuildDate:"2019-08-05T09:13:08Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}```

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