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

Choose where to run init DaemonSets. #275

Closed
machine424 opened this issue Mar 11, 2019 · 3 comments
Closed

Choose where to run init DaemonSets. #275

machine424 opened this issue Mar 11, 2019 · 3 comments

Comments

@machine424
Copy link

machine424 commented Mar 11, 2019

I cannot deploy daemonsets in namespace kube-system, while running ksync initwe can specify the namespace using --namespace but I think it doesn't concern daemonsets.
Is there a way to do so or is it hardcoded ?

I think it's hardcoded in some places, for example for the service representing the daemonset (pkg/ksync/cluster/service.go):

func NewService() *Service {
	return &Service{
		Namespace: "kube-system",

and the daemonset inherits the same namespace as well (pkg/ksync/cluster/daemon_set.go):

func (s *Service) daemonSet() *v1beta1.DaemonSet {
	return &v1beta1.DaemonSet{
		ObjectMeta: metav1.ObjectMeta{
			Namespace: s.Namespace,

Is there a reason for that ?

@timfallmk
Copy link
Collaborator

@machine424 --namespace is actually a global flag for operating on specs, it's a little confusing that it appears there too. The daemonsets are hardcoded just for convenience since most users won't have to deal with them at all. If you want to change them now, you can deploy them and then patch. It's not ideal, I know, but there's actually an open issue for changing the way all of that works anyway. #266

@machine424
Copy link
Author

@timfallmk, thank you for your response. Yes, but it is said that --namespacewill override the default namespace which is default and since we know that DaemonSets are deployed in kube-system we are sure they're concerned. I can't deploy anything in kube-system, the only solution left, I think, is to change it in the code and recompile it. I'm not familiar with go, I'll try to make a proposition to remove the hardcoded value.

@timfallmk
Copy link
Collaborator

It wouldn't be difficult to make it changeable upon init. It would also be easy for you to recompile with the value you want here. I'll poke around a bit today and see if I can add that functionality.

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

2 participants