zlabjp / kubernetes-resource

[DEPLICATED] This repository is no longer actively maintained.
MIT License
91 stars 42 forks source link

ERROR: You must specify "server" and "token", if not specify "kubeconfig" #55

Closed jensendw closed 5 years ago

jensendw commented 6 years ago

What happened: When using docker tag 1.12 or latest, I see the following code in common.sh

# cat common.sh | grep echoerr
      echoerr "kubeconfig file '$kubeconfig_file' does not exist"
      echoerr 'You must specify "server" and "token", if not specify "kubeconfig".'
        echoerr 'You must specify aws_eks_cluster_name when using aws_iam_authenticator.'

This results in the following output when using the use_aws_iam_authenticator: true with server set

ERROR: You must specify "server" and "token", if not specify "kubeconfig"

What you expected to happen: When using aws_iam_authenticator you typically don't use a token.... I would expect it to run without this error having only specified server.

How to reproduce it (as minimally and precisely as possible):

resource:
- name: kubernetes-eks
  type: kubernetes
  source:
    server: https://fjkdsajkldasjla.yl4.us-west-2.eks.amazonaws.com
    use_aws_iam_authenticator: true
    aws_eks_cluster_name: abc123

The pipeline will tell you:

ERROR: You must specify "server" and "token", if not specify "kubeconfig".

Anything else we need to know?: It looks to me like you reverted this check in the latest release https://github.com/zlabjp/kubernetes-resource/releases/tag/v1.4.1

It almost looks as if you didn't rebuild the docker containers for tag 1.12 and latest after you did this.

I would have created a PR but the code in master doesn't reflect whats in 1.12 or latest in docker.

Environment:

superbrothers commented 5 years ago

Fixed by #56.