diff --git a/README.md b/README.md index b12d67d..a10968f 100644 --- a/README.md +++ b/README.md @@ -143,6 +143,7 @@ The application catalog includes: * `controllers` — Flux Controllers * `sync` — Flux GitRepository to sync with * `harbor` — Cloud Native Registry +* `headlamp` - An easy-to-use and extensible Kubernetes web UI * `ingress` — Ingress Controllers * `contour` — Ingress Controller using Envoy proxy * `emissary` — Open Source API Gateway from Ambassador diff --git a/cmd/install/install.go b/cmd/install/install.go index 9225220..d4fdba9 100644 --- a/cmd/install/install.go +++ b/cmd/install/install.go @@ -15,6 +15,7 @@ import ( "github.com/awslabs/eksdemo/pkg/application/external_dns" "github.com/awslabs/eksdemo/pkg/application/falco" "github.com/awslabs/eksdemo/pkg/application/harbor" + "github.com/awslabs/eksdemo/pkg/application/headlamp" "github.com/awslabs/eksdemo/pkg/application/keycloak_amg" "github.com/awslabs/eksdemo/pkg/application/kube_state_metrics" "github.com/awslabs/eksdemo/pkg/application/metrics_server" @@ -63,6 +64,7 @@ func NewInstallCmd() *cobra.Command { cmd.AddCommand(NewInstallAliasCmds(fluxApps, "flux-")...) cmd.AddCommand(vpc_lattice_controller.NewApp().NewInstallCmd()) cmd.AddCommand(harbor.NewApp().NewInstallCmd()) + cmd.AddCommand(headlamp.NewApp().NewInstallCmd()) cmd.AddCommand(NewInstallIngressCmd()) cmd.AddCommand(NewInstallAliasCmds(ingressControllers, "ingress-")...) cmd.AddCommand(NewInstallIstioCmd()) diff --git a/cmd/install/uninstall.go b/cmd/install/uninstall.go index 4f8188f..6f527fb 100644 --- a/cmd/install/uninstall.go +++ b/cmd/install/uninstall.go @@ -15,6 +15,7 @@ import ( "github.com/awslabs/eksdemo/pkg/application/external_dns" "github.com/awslabs/eksdemo/pkg/application/falco" "github.com/awslabs/eksdemo/pkg/application/harbor" + "github.com/awslabs/eksdemo/pkg/application/headlamp" "github.com/awslabs/eksdemo/pkg/application/keycloak_amg" "github.com/awslabs/eksdemo/pkg/application/kube_state_metrics" "github.com/awslabs/eksdemo/pkg/application/metrics_server" @@ -63,6 +64,7 @@ func NewUninstallCmd() *cobra.Command { cmd.AddCommand(NewUninstallAliasCmds(fluxApps, "flux-")...) cmd.AddCommand(vpc_lattice_controller.NewApp().NewUninstallCmd()) cmd.AddCommand(harbor.NewApp().NewUninstallCmd()) + cmd.AddCommand(headlamp.NewApp().NewUninstallCmd()) cmd.AddCommand(NewUninstallIngressCmd()) cmd.AddCommand(NewUninstallAliasCmds(ingressControllers, "ingress-")...) cmd.AddCommand(NewUninstallIstioCmd()) diff --git a/pkg/application/headlamp/headlamp.go b/pkg/application/headlamp/headlamp.go new file mode 100644 index 0000000..9e16fb1 --- /dev/null +++ b/pkg/application/headlamp/headlamp.go @@ -0,0 +1,63 @@ +package headlamp + +import ( + "github.com/awslabs/eksdemo/pkg/application" + "github.com/awslabs/eksdemo/pkg/cmd" + "github.com/awslabs/eksdemo/pkg/installer" + "github.com/awslabs/eksdemo/pkg/template" +) + +// Docs: https://headlamp.dev/docs/latest/installation/in-cluster/ +// GitHub: https://github.com/headlamp-k8s/headlamp +// Helm: https://headlamp-k8s.github.io/headlamp/ +// Repo: ghcr.io/headlamp-k8s/headlamp +// Version: Latest is Chart/App 0.15.0/0.20.0 (as of 09/29/23) + +func NewApp() *application.Application { + app := &application.Application{ + Command: cmd.Command{ + Name: "headlamp", + Description: "An easy-to-use and extensible Kubernetes web UI", + }, + + Installer: &installer.HelmInstaller{ + ChartName: "headlamp", + ReleaseName: "headlamp", + RepositoryURL: "https://headlamp-k8s.github.io/headlamp/", + ValuesTemplate: &template.TextTemplate{ + Template: valuesTemplate, + }, + }, + + Options: &application.ApplicationOptions{ + DefaultVersion: &application.LatestPrevious{ + LatestChart: "0.15.0", + Latest: "0.15.0", + PreviousChart: "0.15.0", + Previous: "0.15.0", + }, + Namespace: "headlamp", + }, + } + + return app +} + +const valuesTemplate = `--- +replicaCount: 1 +image: + tag: "v0.20.0" + +config: + baseURL: "" + pluginsDir: "/headlamp/plugins" + +serviceAccount: + create: true + +clusterRoleBinding: + create: true + +persistentVolumeClaim: + enabled: false +`