Skip to content

Commit

Permalink
add: headlamp application (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
guikcd committed Oct 4, 2023
1 parent b6bfc44 commit e141622
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions cmd/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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())
Expand Down
2 changes: 2 additions & 0 deletions cmd/install/uninstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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())
Expand Down
63 changes: 63 additions & 0 deletions pkg/application/headlamp/headlamp.go
Original file line number Diff line number Diff line change
@@ -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
`

0 comments on commit e141622

Please sign in to comment.