Skip to content

Commit

Permalink
Refactor KSailInitOptions and KSailClusterSpec classes
Browse files Browse the repository at this point in the history
  • Loading branch information
devantler committed Oct 19, 2024
1 parent e0ffbbe commit 7b18cc2
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
15 changes: 15 additions & 0 deletions KSail.Models/Commands/Init/KSailInitOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,23 @@ public class KSailInitOptions
/// </summary>
public bool PostBuildVariables { get; set; }

/// <summary>
/// The directory to place the generated output in.
/// </summary>
public string OutputDirectory { get; set; } = "./";

/// <summary>
/// The template to use for the generated output.
/// </summary>
public KSailInitTemplate Template { get; set; } = KSailInitTemplate.Simple;

/// <summary>
/// The different Kustomizations to generate. First depends on the second, and so on.
/// </summary>
public IEnumerable<string> KustomizeFlows { get; set; } = ["apps", "infrastructure", "infrastructure/controllers"];

/// <summary>
/// The different places that it should be able to hook into the Kustomization flows. For example per cluster or distribution.
/// </summary>
public IEnumerable<string> KustomizeHooks { get; set; } = ["clusters"];
}
1 change: 1 addition & 0 deletions KSail.Models/Commands/Stop/KSailStopOptions.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pragma warning disable CA1716
namespace KSail.Models.Commands.Stop;

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion KSail.Models/KSailCluster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class KSailCluster
/// <summary>
/// The metadata of the KSail Cluster object.
/// </summary>
public V1ObjectMeta Metadata { get; set; } = new() { Name = "default" };
public V1ObjectMeta Metadata { get; set; } = new() { Name = "ksail-default" };
/// <summary>
/// The spec of the KSail Cluster object.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion KSail.Models/KSailClusterSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class KSailClusterSpec
/// <summary>
/// The path to the kubeconfig file.
/// </summary>
public string Kubeconfig { get; set; } = "~/.kube/config";
public string Kubeconfig { get; set; } = $"{Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)}/.kube/config";

/// <summary>
/// The kube context.
Expand Down

0 comments on commit 7b18cc2

Please sign in to comment.