You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I'm using atlassian/kubectl-run:3.3.1 and trying to deploy resources in a namespace that doesn't exist yet but is created in the same apply.
The namespace is defined like this:
apiVersion: v1
kind: Namespace
metadata:
name: namespace-name
Due to the pipe running dry-run by default I'm unable to apply both the namespace resources and the to be deployed resources in a single apply.
Is there a way around this (by disabling the dry-run by default) or am I stuck creating the namespaces and the resources in two separate applys?
Hi @Jurgen Heeffer . Thanks for your question. Please provide us your configuration details of how you use the pipe.
Maybe you use the pipe this way:
script: - pipe: atlassian/kubectl-run:3.3.1 variables: KUBE_CONFIG: $KUBE_CONFIG KUBECTL_COMMAND: 'apply' RESOURCE_PATH: 'nginx.yml' KUBECTL_ARGS: - '--dry-run'
then you should remove '--dry-run' from KUBECTL_ARGS.
Regards, Igor
I'm currently using it like this.
- pipe: atlassian/kubectl-run:3.3.1
variables:
KUBE_CONFIG: ${!kube_config}
KUBECTL_COMMAND: 'apply'
KUBECTL_APPLY_ARGS: '-k'
RESOURCE_PATH: '.deploy/overlays/${ENVIRONMENT}/'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
--dry-run is used in validate spec file by default, and i guess you receive
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Igor,
Ah yes that would be perfect.
Thank you for the response!
With regards,
Jurgen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Jurgen Heeffer . We released a new version 3.4.0 of the pipe:
script: - pipe: atlassian/kubectl-run:3.4.0 variables: KUBE_CONFIG: $KUBE_CONFIG KUBECTL_COMMAND: 'apply' RESOURCE_PATH: 'nginx.yml' DISABLE_VALIDATION: 'true'
Regards, Igor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.