Skip to content

Commit b8d7e2e

Browse files
committed
controlplane: cosmetics
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
1 parent 8c9bad8 commit b8d7e2e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pkg/controlplane/apiserver/config.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ type Extra struct {
9595
VersionedInformers clientgoinformers.SharedInformerFactory
9696
}
9797

98-
// BuildGenericConfig takes the master server options and produces the genericapiserver.Config associated with it
98+
// BuildGenericConfig takes the generic controlplane apiserver options and produces
99+
// the genericapiserver.Config associated with it. The genericapiserver.Config is
100+
// often shared between multiple delegated apiservers.
99101
func BuildGenericConfig(
100102
s controlplaneapiserver.CompletedOptions,
101103
schemes []*runtime.Scheme,
@@ -130,7 +132,7 @@ func BuildGenericConfig(
130132
kubeClientConfig := genericConfig.LoopbackClientConfig
131133
clientgoExternalClient, err := clientgoclientset.NewForConfig(kubeClientConfig)
132134
if err != nil {
133-
lastErr = fmt.Errorf("failed to create real external clientset: %v", err)
135+
lastErr = fmt.Errorf("failed to create real external clientset: %w", err)
134136
return
135137
}
136138
versionedInformers = clientgoinformers.NewSharedInformerFactory(clientgoExternalClient, 10*time.Minute)
@@ -203,7 +205,7 @@ func BuildGenericConfig(
203205
versionedInformers,
204206
)
205207
if err != nil {
206-
lastErr = fmt.Errorf("invalid authorization config: %v", err)
208+
lastErr = fmt.Errorf("invalid authorization config: %w", err)
207209
return
208210
}
209211
if s.Authorization != nil && !enablesRBAC {

0 commit comments

Comments
 (0)