Skip to content

Commit

Permalink
remove option to enable/disable k8s dashboard
Browse files Browse the repository at this point in the history
Setting this to different values in two different devenv will just lead to
clobbering.
  • Loading branch information
jashan-lco committed Feb 12, 2025
1 parent dcef77f commit b00a5b1
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions local-cluster/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,16 @@ let
in {
options.devenv-k8s.local-cluster = {
enable = lib.mkEnableOption "Setup the local development K8s cluster";
dashboard = {
disable = lib.mkEnableOption "Disable K8s dashboard";
};
};
config = lib.mkIf cfg.enable {

enterShell = ''
export KUBECONFIG=~/.kube/config-devenv-k8s
local-cluster-up || exit 1
${if !cfg.dashboard.disable then ''
echo ""
echo "K8s dashboard running at https://k8s.local.lco.earth"
echo ""
'' else ""}
echo
echo "K8s dashboard is running at https://k8s.local.lco.earth"
echo
'';

tasks = {
Expand All @@ -27,12 +22,12 @@ in {
before = [ "devenv:enterShell" ];
};

"devenv-k8s:local-cluster:updateLocalLcoEarthCert" = lib.mkIf (!cfg.dashboard.disable) {
"devenv-k8s:local-cluster:updateLocalLcoEarthCert" = {
exec = "local-cluster-update-local-lco-earth-cert";
before = [ "devenv-k8s:local-cluster:setupNginxIngress" ];
};

"devenv-k8s:local-cluster:setupK8sDashboard" = lib.mkIf (!cfg.dashboard.disable) {
"devenv-k8s:local-cluster:setupK8sDashboard" = {
exec = "local-cluster-k8s-dashboard-up";
before = [ "devenv-k8s:local-cluster:setupNginxIngress" ];
};
Expand Down

0 comments on commit b00a5b1

Please sign in to comment.