Code Monkey home page Code Monkey logo

Comments (4)

justinbarrick avatar justinbarrick commented on June 7, 2024

If you omit the namespace there it will append the namespace flag for you.

Alternatively you could use the commands setting which has a namespaced option (kubectl is legacy as it always sets the namespace flag): https://kudo.dev/docs/testing/reference.html#teststep

from kuttl.

jmccormick2001 avatar jmccormick2001 commented on June 7, 2024

thanks, do you happen to have an example of using the commands setting? I can't seem to get it to work, its creating its own namespace instead of using my predefined namespace.

from kuttl.

jbarrick-mesosphere avatar jbarrick-mesosphere commented on June 7, 2024

Oh, you would want to do:

apiVersion: kudo.dev/v1alpha1
kind: TestStep
delete:
- apiVersion: v1
  kind: ConfigMap
  name: my-static-test
  namespace: rq
commands:
- command: kubectl create configmap my-static-test --from-file=bundle=/tmp/bundle.zip --namespace=rq

It will still create a namespace, but it will respect the namespace you set when running that command and any namespaces defined on any resources.

from kuttl.

kensipe avatar kensipe commented on June 7, 2024

@jmccormick2001 Looks like the main issue here is namespace creation... which is a dup of #6 and fixed in #137 . There is also support for deletes in a namespace. I would also recommend for commands to use the $NAMESPACE expansion.
Closing for now... please reopen if we are missing something. thanks!

from kuttl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.