Comments (6)
@sh0rez,
Thanks for clarification, that's exactly what I thought your use case was.
I already made some progress in that direction, and now there is a docker image that I'll use in this new preset (https://github.com/orlangure/k3s-dind available at https://hub.docker.com/repository/docker/orlangure/k3s). it features a single node k3s cluster running in a container.
There will be a Config
function on the new preset that returns *rest.Config
of kubernetes go client, or ConfigBytes
that returns a raw kubeconfig file content to use by the clients that don't want to use *rest.Config
.
I am now testing the implementation and will soon start working on all the wrappers to make this preset available over HTTP as well and not only from Go, so it'll take a bit more time.
In the mean time, would you like to check out #67? It would be nice to get some early feedback before I finish working on it and publish a new release.
from gnomock.
Hi @sh0rez, great idea!
What would be your use case if there was such preset?
Would a single node cluster be enough with API access only?
Which options would be useful?
At this point I'm not even sure it would be possible to build such preset, but we definitely should gather requirement before getting to work 😼
from gnomock.
Hey @orlangure!
As a use-case, I am primarily looking at automatically testing tools like Grafana Tanka, which does application definition for Kubernetes. It uses a special language (Jsonnet) to define k8s objects and calls kubectl
to apply afterwards.
I'd like to do some basic testing in CI, but many operations require a Kubernetes cluster, which is rather hard to get. It would be incredibly helpful if my tests would just spin one up using docker, run my tests against it and tear it all down again.
A single-node cluster with basic api-access would be all I need.
Does this sound like something worth trying?
from gnomock.
I prefer charts + Dockerfile to deploy any a preset as a pod in k8s. A k8s cluster is out of the scope of this test framework.
from gnomock.
@dreamofboy,
We are not talking about deploying stuff into Kubernetes clusters, we want to have a lightweight cluster for tests, mostly for people that develop automation tools around Kubernetes. Say if you have a custom tool that triggers alerts based on pod statuses, you can test this tool using k3s
preset.
from gnomock.
@sh0rez, I merged the new preset, and will publish a new release in the next few days. If you wish, you can do some early stage testing against master
branch.
If you have any questions or encounter bugs, feel free to reach out.
from gnomock.
Related Issues (20)
- Feature: Configurable Docker Registry URL HOT 3
- It is safe NOT to call `gnomock.Stop()`? HOT 1
- Bug: gnomock-cleaner not work well in M1(arm64) HOT 4
- Bug: gnomockd in github action 'services:' & 'container:' requires preallocated exposed port range HOT 7
- Add a CI job that uses github service containers feature
- New preset: jaeger, tracing backend
- Bug: Healthcheck failed on running k3s preset example HOT 3
- Request: Custom the image of preset HOT 3
- Request: allow use of already previous test session Docker containers HOT 7
- New Option: Entrypoint HOT 1
- Bug: Nearly impossible to debug failing containers HOT 12
- Bug: Remote certificate is expired - need to skip TLS verification HOT 1
- Bug: verifying module: checksum mismatch in dependecy HOT 3
- Bug: postgres WithDatabase() causes failure on WithContainerReuse() HOT 1
- Request: Include Timestream to localstack.Service HOT 1
- Bug: `WithUseLocalImagesFirst()` doesn't work with local only images HOT 2
- Bug: Healthcheck not working for docker in docker. HOT 7
- Request: Update go-elasticsearch to 8.7.0
- Bug: Container is broken HOT 6
- Request: Enable easily running containers in cluster mode HOT 2
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 gnomock.