Open abasitt opened 1 month ago
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!
Thank you, will give it a try. :)
@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 ?.
Abdul -- not exactly sure what you're asking, mind submitting the change as you have it and we can look at the code? Thanks!
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 }