Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Secret Template applies secrets successfully but stage fails #154

Open
awesomohsin opened this issue Mar 10, 2022 · 0 comments
Open

Secret Template applies secrets successfully but stage fails #154

awesomohsin opened this issue Mar 10, 2022 · 0 comments

Comments

@awesomohsin
Copy link

awesomohsin commented Mar 10, 2022

Hi Im using the secret_template option in the drone-gke plugin but running into a weird situation where the secrets are applied successfully on my kubernetes cluster but the stage returns an error saying.

Error (kubectl output redacted): Error: exit status 1

Here are screenshots after running once and twice
Screenshot 2022-03-09 at 6 30 53 PM

Screenshot 2022-03-09 at 6 17 58 PM

Heres the plugin configuration

  • name: deploy
    image: nytimes/drone-gke
    environment:
    TOKEN:
    from_secret: GOOGLE_CREDENTIALS
    SECRET_DOCKER_CFG:
    from_secret: KUBERNETES_PULL_SECRET
    ... all the other secrets stored in drone ..
    settings:
    cluster: clustername
    expand_env_vars: true
    namespace: ${DRONE_BRANCH}
    zone: us-west1-a
    template: kubernetes/deployment-template.yml
    secret_template: kubernetes/secret-template.yml

The secret template looks like this

apiVersion: v1
kind: Secret
metadata:
name: secret1
type: Opaque
data:
user_name: {{.SECRET_}}

apiVersion: v1
kind: Secret
metadata:
name: secret2
type: Opaque
data:
user_passt: {{.SECRET_}}

apiVersion: v1
kind: Secret
metadata:
name: secret3
type: Opaque
data:
user_id: {{.SECRET_}}

Any pointers as to what may be happening?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant