Update version of Kubernetes Client (#429)

This commit is contained in:
Justin Kotalik 2020-05-05 13:01:07 -07:00 коммит произвёл GitHub
Родитель 60818e5db3
Коммит 1c7f770f07
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
6 изменённых файлов: 11 добавлений и 25 удалений

Просмотреть файл

@ -322,7 +322,7 @@ limitations under the License.
-------------------------------------------------------------------
KubernetesClient 1.6.11 - Apache-2.0
KubernetesClient 2.0.17 - Apache-2.0
(c) 2008 VeriSign, Inc.

Просмотреть файл

@ -8,6 +8,7 @@
<FileSignInfo Include="Bedrock.Framework.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="Elasticsearch.Net.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="FeatherHttp.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="Fractions.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="KubernetesClient.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="OpenTelemetry.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="OpenTelemetry.Api.dll" CertificateName="3PartySHA2" />

Просмотреть файл

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="KubernetesClient" Version="1.6.11" />
<PackageReference Include="KubernetesClient" Version="2.0.17" />
<!--
The Microsoft.Build.Locator package takes care of dynamically loading these assemblies
at runtime. We don't need/want to ship them, just to have them as references.

Просмотреть файл

@ -56,13 +56,8 @@ namespace Microsoft.Tye
output.WriteDebugLine($"Validating ingress class '{ingressClass}'.");
var config = KubernetesClientConfiguration.BuildDefaultConfig();
// Workaround for https://github.com/kubernetes-client/csharp/issues/372
var store = await KubernetesClientConfiguration.LoadKubeConfigAsync();
var context = store.Contexts.Where(c => c.Name == config.CurrentContext).FirstOrDefault();
// Use namespace of application, or current context, or 'default'
config.Namespace = application.Namespace;
config.Namespace ??= context?.ContextDetails?.Namespace ?? "default";
// If namespace is null, set it to default
config.Namespace ??= "default";
var kubernetes = new Kubernetes(config);
@ -110,7 +105,7 @@ namespace Microsoft.Tye
output.WriteAlwaysLine(
"Tye can deploy the ingress-nginx controller for you. This will be a basic deployment suitable for " +
"experimentation and development. Your production needs, or requirments may differ depending on your Kubernetes distribution. " +
"experimentation and development. Your production needs, or requirements may differ depending on your Kubernetes distribution. " +
"See: https://aka.ms/tye/ingress for documentation.");
if (!output.Confirm($"Deploy ingress-nginx"))
{

Просмотреть файл

@ -53,13 +53,8 @@ namespace Microsoft.Tye
var config = KubernetesClientConfiguration.BuildDefaultConfig();
// Workaround for https://github.com/kubernetes-client/csharp/issues/372
var store = await KubernetesClientConfiguration.LoadKubeConfigAsync();
var context = store.Contexts.Where(c => c.Name == config.CurrentContext).FirstOrDefault();
// Use namespace of application, or current context, or 'default'
config.Namespace = application.Namespace;
config.Namespace ??= context?.ContextDetails?.Namespace ?? "default";
// If namespace is null, set it to default
config.Namespace ??= "default";
var kubernetes = new Kubernetes(config);

Просмотреть файл

@ -37,16 +37,11 @@ namespace Microsoft.Tye
{
var config = KubernetesClientConfiguration.BuildDefaultConfig();
// Workaround for https://github.com/kubernetes-client/csharp/issues/372
var store = await KubernetesClientConfiguration.LoadKubeConfigAsync();
var context = store.Contexts.Where(c => c.Name == config.CurrentContext).FirstOrDefault();
// Use namespace of application, or current context, or 'default'
config.Namespace = application.Namespace;
config.Namespace ??= context?.ContextDetails?.Namespace ?? "default";
var kubernetes = new Kubernetes(config);
// If namespace is null, set it to default
config.Namespace ??= "default";
// Due to some limitations in the k8s SDK we currently have a hardcoded list of resource
// types that we handle deletes for. If we start adding extensibility for the *kinds* of
// k8s resources we create, or the ability to deploy additional files along with the