Example #1
0
        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)));
        }
Example #2
0
        private void Init()
        {
            if (_initialized)
            {
                return;
            }

            _client      = _kubernetesClientFactory.Create();
            _initialized = true;
        }