ipedrazas / drone-helm

Helm (Kubernetes) plugin for drone.io
MIT License
120 stars 90 forks source link

Drone 1.0.0 syntax example #88

Closed sercanacar closed 5 years ago

sercanacar commented 5 years ago

Hi,

Trying to use helm plugin with new drone 1.X syntax, but failing miserably:

  - name: deploy
  image: quay.io/ipedrazas/drone-helm
  skip_tls_verify: true
  chart: ./helm/api
  update_dependencies: false
  values_files: "helm/production-values.yaml"
  release: api
  namespace: production
  when:
    branch: [drone-integration]

Error: API Server is needed to deploy.

Any ideas how to incorporate api_server and token? Ideally using Vault, which I have setup and enabled in drone

Regards

ipedrazas commented 5 years ago

https://github.com/ipedrazas/drone-helm/issues/81

This issue explains how to do it. Basically, there's a secret that contains the API server and the token needed.

deploy_helm:
    image: quay.io/ipedrazas/drone-helm
    chart: ./kubernetes/neo
    release: neo
    values: image.tag=${DRONE_BRANCH}-${DRONE_COMMIT_SHA:0:7},version=${DRONE_BRANCH}-${DRONE_COMMIT_SHA:0:7}
    secrets:
      - api_server
      - kubernetes_token
    when:
      branch: master
      event: push