Hello @lonelyCZ, do you have some time to help my question?
pkg/karmadactl/register/register.go:375
// preflight checks the deployment environment of the member cluster
func (o *CommandRegisterOption) preflight() []error {
var errlist []error
// check if the given file already exist
errlist = appendError(errlist, checkFileIfExist(filepath.Join(KarmadaDir, KarmadaAgentBootstrapKubeConfigFileName)))
errlist = appendError(errlist, checkFileIfExist(filepath.Join(KarmadaDir, KarmadaAgentKubeConfigFileName)))
errlist = appendError(errlist, checkFileIfExist(CACertPath))
In above code, CACertPath is just a default const value /etc/karmada/pki/ca.crt, why if this local path exist should directly return error?
I mean, if I specified --ca-cert-path=/etc/karmada/pki/other-ca.crt, why if /etc/karmada/pki/ca.crt exist shall return error? May be is a small bug?
Please provide an in-depth description of the question you have:
What do you think about this question?:
Hello @lonelyCZ, do you have some time to help my question?
pkg/karmadactl/register/register.go:375
In above code,
CACertPath
is just a default const value/etc/karmada/pki/ca.crt
, why if this local path exist should directly return error?I mean, if I specified
--ca-cert-path=/etc/karmada/pki/other-ca.crt
, why if/etc/karmada/pki/ca.crt
exist shall return error? May be is a small bug?Much appreciate your help!
Environment: