Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Pipe aws-eks-kubectl-run fails when namespace set as part of the config

Edited

Current configuration that i use for deployment

- pipe: atlassian/aws-eks-kubectl-run:2.4.0
variables:
CLUSTER_NAME: $CLUSTER_NAME
KUBECTL_COMMAND: 'apply'
KUBECTL_APPLY_ARGS: '-k'
RESOURCE_PATH: $DEPLOYMENT_PATH

The DEPLOYMENT_PATH points to an overlay kustomization configuration that includes namespace.yml file defining the namespace to be applied as part of this config.

namespace/<namespaceName> created (server dry run)
Error from server (NotFound): error when creating "<$DEPLOYMENT_PATH>": namespaces "<namespaceName>" not found
Error from server (NotFound): error when creating "<$DEPLOYMENT_PATH>": namespaces "<namespaceName>" not found
Error from server (NotFound): error when creating "<$DEPLOYMENT_PATH>": namespaces "<namespaceName>" not found
✖ spec file validation failed.

I need a way to apply the changes along with creation of namespace thru the pipe. 

 

P.S: I can replicate the issue in kubectl when i pass `--dry-run=server` flag.

3 answers

1 accepted

0 votes
Answer accepted
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 19, 2023

@Vish hi. We released a new version 2.5.0 of the aws-eks-kubectl-run pipe, which now supports disable validation and pre-execution script features.

  - pipe: atlassian/aws-eks-kubectl-run:2.5.0
    variables:
      CLUSTER_NAME: 'my-kube-cluster'
      KUBECTL_COMMAND: 'apply'
      RESOURCE_PATH: 'nginx.yml'
      DISABLE_VALIDATION: 'true'

 

  - echo 'script logic' > .my-script.sh
  - chmod 005 my-script.sh
  - pipe: atlassian/aws-eks-kubectl-run:2.5.0
    variables:
      CLUSTER_NAME: 'my-kube-cluster'
      KUBECTL_COMMAND: 'apply'
      RESOURCE_PATH: 'nginx.yml'
      PRE_EXECUTION_SCRIPT: '.my-script.sh'

 

Regards, Igor

That is awesome!. Thank you for this quick turn around.

Like Igor Stoyanov likes this
0 votes
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 06, 2023

@Vish hi. According to the question you provided there is the response for your case with using DISABLE_VALIDATION variable:

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

Hey @Igor Stoyanov , That's available `kubectl-run` pipe but don't see that in any documentation for `aws-eks-kubectl-run` latest version.

Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 09, 2023 • edited

@Vish hi. Thanks for your remark. We will try to implement the same idea in this pipe and notify you when new version will become available.

Regards, Igor

Like Vish likes this

Similar issue with different pipe is captured here.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events