ListDeploymentsInAllNamespacesAsync( string context) { using var client = _clientFactory.Create(context); var deployments = await client.ListDeploymentForAllNamespacesAsync() .ConfigureAwait(false); return(deployments.Items.Select( pod => new Deployment( @namespace: pod.Metadata.NamespaceProperty, name: pod.Metadata.Name))); }
private void Init() { if (_initialized) { return; } _client = _kubernetesClientFactory.Create(); _initialized = true; }