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

thin_entrypoint should generate multus kubeconfig with manual option #1295

Open
abasitt opened this issue Jun 6, 2024 · 4 comments
Open

Comments

@abasitt
Copy link

abasitt commented Jun 6, 2024

Older version of multus e.g. 3.9.3 with older script of thin_entry.sh generates a multus.d directory and multus.kubeconfig file with a non-auto installation e.g. # "--multus-conf-file=/tmp/multus-conf/70-multus.conf"

The new version 4.0.2 with new thin_entrypoint doesn't generate multus.d and multus.kubeconfig if the installation type is non-auto. We still want multus to generate multus.kubeconfig even though if the configfile is used manually.

I believe adding below lines here would fix it.
caHash, saTokenHash, err = opt.createKubeConfig(nil, nil) if err != nil { fmt.Fprintf(os.Stderr, "failed to create multus kubeconfig: %v\n", err) return }

@dougbtv
Copy link
Member

dougbtv commented Jun 6, 2024

Any interest in trying a PR for it? I think this is reasonable to expect that functionality in 4.0.

Please add testing to ensure that the kubeconfig generates and what not. Thank you!

@abasitt
Copy link
Author

abasitt commented Jun 6, 2024

Thank you, will give it a try. :)

@abasitt
Copy link
Author

abasitt commented Jun 14, 2024

@dougbtv I modified the function and did the local testing to make sure it works correctly, but I am struggling to write the unit testing because of the constant here .
I wouldn't want to write a dummy file that can mess up with actual tokens in that location. Any suggestions ?.

@dougbtv
Copy link
Member

dougbtv commented Jun 20, 2024

Abdul -- not exactly sure what you're asking, mind submitting the change as you have it and we can look at the code? Thanks!

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