public async override Task RunAsync() { if (DryRun) { ColoredConsole.WriteLine(KubernetesHelper.GetKedaResources(Namespace)); if (!KedaOnly) { ColoredConsole.WriteLine(KubernetesHelper.GetOsirisResources(Namespace)); } } else { var sb = new StringBuilder(); sb.AppendLine(KubernetesHelper.GetKedaResources(Namespace)); if (!KedaOnly) { sb.AppendLine(KubernetesHelper.GetOsirisResources(Namespace)); } if (!await KubernetesHelper.NamespaceExists(Namespace)) { await KubernetesHelper.CreateNamespace(Namespace); } await KubectlHelper.KubectlApply(sb.ToString(), showOutput : true); } }
public async override Task RunAsync() { if (DryRun) { ColoredConsole.WriteLine(KubernetesHelper.GetKedaResources(Namespace)); } else { if (!await KubernetesHelper.NamespaceExists(Namespace)) { await KubernetesHelper.CreateNamespace(Namespace); } await KubectlHelper.KubectlApply(KubernetesHelper.GetKedaResources(Namespace), showOutput : true); } }