Browse Source

Update version of Kubernetes Client (#429)

pull/450/head
Justin Kotalik 6 years ago
committed by GitHub
parent
commit
1c7f770f07
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      NOTICE.txt
  2. 1
      eng/Signing.props
  3. 2
      src/Microsoft.Tye.Core/Microsoft.Tye.Core.csproj
  4. 11
      src/Microsoft.Tye.Core/ValidateIngressStep.cs
  5. 9
      src/Microsoft.Tye.Core/ValidateSecretStep.cs
  6. 11
      src/tye/UndeployHost.cs

2
NOTICE.txt

@ -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.

1
eng/Signing.props

@ -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" />

2
src/Microsoft.Tye.Core/Microsoft.Tye.Core.csproj

@ -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.

11
src/Microsoft.Tye.Core/ValidateIngressStep.cs

@ -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"))
{

9
src/Microsoft.Tye.Core/ValidateSecretStep.cs

@ -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);

11
src/tye/UndeployHost.cs

@ -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

Loading…
Cancel
Save