Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions backend/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ func flagset() *flag.FlagSet {
f.String("listen-addr", "", "Address to listen on; default is empty, which means listening to any address")
f.Uint("port", defaultPort, "Port to listen from")
f.String("proxy-urls", "", "Allow proxy requests to specified URLs")
f.Bool("enable-helm", false, "Enable Helm operations")

f.String("oidc-client-id", "", "ClientID for OIDC")
f.String("oidc-client-secret", "", "ClientSecret for OIDC")
Expand Down
7 changes: 7 additions & 0 deletions backend/pkg/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,13 @@ func TestParseFlags(t *testing.T) {
assert.Equal(t, filepath.Join(getTestDataPath(), "valid_ca.pem"), conf.OidcCAFile)
},
},
{
name: "enable_helm",
args: []string{"go run ./cmd", "--enable-helm"},
verify: func(t *testing.T, conf *config.Config) {
assert.Equal(t, true, conf.EnableHelm)
},
},
}

for _, tt := range tests {
Expand Down
1 change: 1 addition & 0 deletions charts/headlamp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ $ helm install my-headlamp headlamp/headlamp \
| config.inCluster | bool | `true` | Run Headlamp in-cluster |
| config.baseURL | string | `""` | Base URL path for Headlamp UI |
| config.pluginsDir | string | `"/headlamp/plugins"` | Directory to load Headlamp plugins from |
| config.enableHelm | bool | `false` | Enable Helm operations like install, upgrade and uninstall of Helm charts |
| config.extraArgs | array | `[]` | Additional arguments for Headlamp server |
| config.tlsCertPath | string | `""` | Certificate for serving TLS |
| config.tlsKeyPath | string | `""` | Key for serving TLS |
Expand Down
3 changes: 3 additions & 0 deletions charts/headlamp/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ spec:
{{- if .Values.config.inCluster }}
- "-in-cluster"
{{- end }}
{{- with .Values.config.enableHelm}}
- "-enable-helm"
{{- end }}
{{- if .Values.config.watchPlugins }}
- "-watch-plugins-changes"
{{- end }}
Expand Down
1 change: 1 addition & 0 deletions charts/headlamp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ config:
name: ""
# -- directory to look for plugins
pluginsDir: "/headlamp/plugins"
enableHelm: false
watchPlugins: false
# tlsCertPath: "/headlamp-cert/headlamp-ca.crt"
# tlsKeyPath: "/headlamp-cert/headlamp-tls.key"
Expand Down
Loading