danielgormly / drone-plugin-kube

Drone CI plugin for creating & updating K8s Deployments, ConfigMaps
21 stars 15 forks source link

illegal base64 data at input byte 49 #10

Open nduvnjak opened 3 years ago

nduvnjak commented 3 years ago

here is the complete Drone pipeline step where the deployment crashes:

  - name: k8-dev-deploy
    image: danielgormly/drone-plugin-kube:0.0.1
    pull: if-not-exists
    settings:
      template: deployment.dev.yml
      ca:
        from_secret: k8s-dev-ca
      server: https://kuber00:6443
      namespace: cutuk
      token:
        from_secret: caladrius-k8s-dev-deploy-token-nd
      config:
        from_secret: docker_credentials
    when:
      event: 
        - push
      branch:
        exclude:
          - master

and this is the error:

kubano v0.0.1 https://github.com/danielgormly/********-plugin-kube 2021/04/09 20:25:04 illegal base64 data at input byte 49

I wish the error provides some more detail. What is the "data at input byte 49" referring to? The .drone.yaml step, the deployment yaml used, the secret stored in Drone project, or the secret created in Kubernetes cluster? Nevertheless I tried replacing each with some alternatives, but always getting the same error. The very similar deployment used to work, but now it doesn't and I really can't figure out what is different now.

thanks for looking

nduvnjak commented 3 years ago

it was the value in "k8s-dev-ca". (Drone secret for CA) still, I stand by the statement that error message should provide more detail. It was a very frustrating (for the whole team) to debug this. thanks

danielgormly commented 3 years ago

Hi, sorry about that. I haven't invested time in updating this in a while. One thing I noticed is is that you're using version 0.0.1 (as shown in the drone docs). The updated documentation, which has documentation for the current version is available in the readme here: https://github.com/danielgormly/drone-plugin-kube/blob/master/drone.md

0.2.0 is up on DockerHub, or feel free to make a pull request!

Also feel free to make a pull request to the drone plugin docs with that md document. They are very particular about the documentation style - I have tried to keep that doc inline with theirs.