mirror of
https://github.com/open-cluster-management-io/ocm.git
synced 2026-02-14 18:09:57 +00:00
Only check bootstrapKubeConfig when signer is kubeClient (#944)
Some checks are pending
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
Post / coverage (push) Waiting to run
Post / images (amd64) (push) Waiting to run
Post / images (arm64) (push) Waiting to run
Post / image manifest (push) Blocked by required conditions
Post / trigger clusteradm e2e (push) Blocked by required conditions
Some checks are pending
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
Post / coverage (push) Waiting to run
Post / images (amd64) (push) Waiting to run
Post / images (arm64) (push) Waiting to run
Post / image manifest (push) Blocked by required conditions
Post / trigger clusteradm e2e (push) Blocked by required conditions
Signed-off-by: Jian Qiu <jqiu@redhat.com>
This commit is contained in:
@@ -372,14 +372,16 @@ var _ register.RegisterDriver = &CSRDriver{}
|
||||
var _ register.AddonDriver = &CSRDriver{}
|
||||
|
||||
func NewCSRDriver(opt *Option, secretOpts register.SecretOption) (*CSRDriver, error) {
|
||||
if len(secretOpts.BootStrapKubeConfigFile) == 0 {
|
||||
return nil, errors.New("bootstrap-kubeconfig is required")
|
||||
}
|
||||
|
||||
signer := certificates.KubeAPIServerClientSignerName
|
||||
if secretOpts.Signer != "" {
|
||||
signer = secretOpts.Signer
|
||||
}
|
||||
|
||||
// bootstrapKubeConfigFile is required when the signer is kubeclient
|
||||
if signer == certificates.KubeAPIServerClientSignerName && len(secretOpts.BootStrapKubeConfigFile) == 0 {
|
||||
return nil, errors.New("bootstrap-kubeconfig is required")
|
||||
}
|
||||
|
||||
driver := &CSRDriver{
|
||||
opt: opt,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user