Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create topology in specific namespace #260

Open
raballew opened this issue Nov 8, 2022 · 5 comments
Open

Create topology in specific namespace #260

raballew opened this issue Nov 8, 2022 · 5 comments

Comments

@raballew
Copy link
Contributor

raballew commented Nov 8, 2022

As described here I would like to use KNE and deploy a topology into a specific namespace. Unfortunately, it seems that KNE lacks some convenience features such taking into account the current context set in the kubeconfig files or allowing the definition of the target namespace similar to kubectl create -n ... and always deploys the topology in the namespace defined by the name parameter in the topology file.

So far, the only workaround I have found seems to be modifying in the topology file at runtime as shown below.

namespace=3-node-ceos-with-traffic
kubectl create namespace $namespace
echo "name: \"$namespace\"" >> topology.pb.txt
kne create topology.pb.txt --kubecfg $KUBECONFIG
@alexmasi
Copy link
Contributor

The KNE cli currently uses the name of the topology to keep track of the topology for deletion:

return m.kClient.CoreV1().Namespaces().Delete(ctx, m.topo.Name, metav1.DeleteOptions{PropagationPolicy: &prop})

Currently the CLI is stateless, although we do have an FR open to make a central KNE controller that would be inside of the cluster. This central controller would do all of the work that the CLI currently does in a stateful way. Then the CLI would just push all of the work on the controller. This would allow support for this FR.

If you have a solution to this problem using a flag to override the topology name, while also keeping the kne delete <topo file> functionality then I would review a PR

@raballew
Copy link
Contributor Author

I will have a look as soon as I can find some time.

Is there anyone working on the feature request already? Is this FR about implement ing a controller or an operator managing its own CRs? I could not find an issue referring to this on GitHub but I also would like to contribute to this FR.

@alexmasi
Copy link
Contributor

@guoshiuan for info about the stateful KNE controller, probably best to open an issue here on GitHub if you will accept external contribution on this

@guoshiuan
Copy link
Collaborator

Sorry for late response. The design is still in progress. For your reference, here is the one-page for the current status and future plan: https://docs.google.com/document/d/1HjlCAKbYSgl0KgGRQYZu5PJioOrmTTcK40vgICBVx8s/edit?usp=sharing&resourcekey=0-4w894QWjS6ZR9OVbRH1uZg.

@raballew
Copy link
Contributor Author

It seems that the document is private. I have requested access and would be happy to contribute to the feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants