Comments (4)
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.
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.
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.
@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)
- [Enhancement] Output test case full path in final report HOT 2
- Docs: add missing documentation for test step HOT 2
- Docs: add missing documentation for test assert HOT 3
- Docs: add missing documentation for test collector HOT 3
- [Feature] Show aggregated list of failures at conclusion of test
- events.k8s.io/v1beta1 removal in Kubernetes 1.25 HOT 6
- [Bug?] kuttl is not validating the TestStep file
- [Bug] Changing log verbosity level has no effect on the `test` command
- Add deletion timeout support
- Support proxy-url within kubeconfig file
- GH Action Release Process
- GH Action Upgrade test K8S Version HOT 1
- GH Actions - Remove circle CI
- GH Action: Do we need the Kind Logs?
- GH Action trigger for release PRs
- Integration without *testing.T
- [Bug] Parallel in TestSuite is ignored if the harness is used directly
- [Bug] TestAssert cannot be used for tests with a TestStep file
- Provide an Easy Assert for log output of a job and document
- Running TestStep to Delete an Object Default Behavior Deletes More than Intended Resource
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kuttl.