Skip to content

Commit e0cadf5

Browse files
rsmittytalos-bot
authored andcommitted
feat: add method to fetch a k8s client
This PR adds the ability to grab the k8s client from the manager. Needed to do things like list namespaces from Arges. Signed-off-by: Spencer Smith <spencer.smith@talos-systems.com>
1 parent b018ea2 commit e0cadf5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/capi/capi.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,11 @@ func (clusterAPI *Manager) GetClient(ctx context.Context) (client runtimeclient.
183183
return clusterAPI.runtimeClient, err
184184
}
185185

186+
// GetClientSet returns a kubernetes clientset to use.
187+
func (clusterAPI *Manager) GetClientSet() *kubernetes.Clientset {
188+
return clusterAPI.clientset
189+
}
190+
186191
// Install the Manager components and wait for them to be ready.
187192
func (clusterAPI *Manager) Install(ctx context.Context) error {
188193
kubeconfig, err := clusterAPI.GetKubeconfig(ctx)

0 commit comments

Comments
 (0)