The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

pipe google-gke-kubectl-run; support kustomize (apply -k)

abraham.bah
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 15, 2020

Hi,

I'm trying to use the google gke kubectl pipe to deploy to a kubernetes cluster ( https://bitbucket.org/atlassian/google-gke-kubectl-run/src/master/). How can I use pipe to apply using a kustomization directory, like:

kubectl apply -k kustomize/stage

 

If i set KUBECTL_COMMAND to apply, then the pipeline fails as the RESOURCE_PATH variable is mandatory.. Setting this to a dummy variable will result in a corrupt command:

kubectl apply -f dummy.yml -k kustomize/stage

which fails as kubectl apply doesn't accept both -f and -k flags to be set

 

Regards,

Abe

 

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Halyna Berezovska
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 17, 2020

@abraham.bah thanks for reporting!

We will consider this as possible update for the next releases of kubectl pipe.

Cheers, Galyna.

abraham.bah
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 17, 2020

Thanks :)

For now, I've managed to work around the problem by putting the arguments in KUBECTL_COMMAND and the actual command in KUBECTL_ARGS:

KUBECTL_ARGS  =  'apply'

KUBECTL_COMMAND  = '-k=kustomize/stage'

Like Tommo likes this
Halyna Berezovska
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 17, 2020

@abraham.bah cool, smart solution :)

TAGS
AUG Leaders

Atlassian Community Events