Browse Source

Fixed issue #677 Secrets are not created on AKS non-default namespaces (#1408)

Co-authored-by: Anton Maiseyeu <a.maiseyeu@godeltech.com>
pull/1494/head
anton.maiseyeu 4 years ago
committed by GitHub
parent
commit
cb394a1ff6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      src/Microsoft.Tye.Core/DeployApplicationKubernetesManifestStep.cs
  2. 5
      src/Microsoft.Tye.Core/ValidateSecretStep.cs

5
src/Microsoft.Tye.Core/DeployApplicationKubernetesManifestStep.cs

@ -79,11 +79,14 @@ namespace Microsoft.Tye
};
var retries = 0;
var namespaceParameter = !string.IsNullOrEmpty(application.Namespace)
? $"--namespace \"{application.Namespace}\""
: "";
while (!done && retries < 60)
{
var ingressExitCode = await ProcessUtil.ExecuteAsync(
"kubectl",
$"get ingress {ingress.Name} -o jsonpath='{{..ip}}'",
$"get ingress {ingress.Name} {namespaceParameter} -o jsonpath='{{..ip}}'",
Environment.CurrentDirectory,
complete,
capture.StdErr);

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

@ -56,6 +56,11 @@ namespace Microsoft.Tye
var config = KubernetesClientConfiguration.BuildDefaultConfig();
if (!string.IsNullOrEmpty(application.Namespace))
{
config.Namespace = application.Namespace;
}
// If namespace is null, set it to default
config.Namespace ??= "default";

Loading…
Cancel
Save