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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
9 additions and
1 deletions
-
src/Microsoft.Tye.Core/DeployApplicationKubernetesManifestStep.cs
-
src/Microsoft.Tye.Core/ValidateSecretStep.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); |
|
|
|
|
|
|
|
@ -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"; |
|
|
|
|
|
|
|
|