Skip to content

Commit 61751f7

Browse files
authored
Merge pull request #4024 from oracle-cne/enable-helm-support
backend, charts: Enabled Helm support via --enable-helm flag
2 parents 96c2540 + 52d9aa7 commit 61751f7

File tree

5 files changed

+13
-0
lines changed

5 files changed

+13
-0
lines changed

backend/pkg/config/config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ func flagset() *flag.FlagSet {
335335
f.String("listen-addr", "", "Address to listen on; default is empty, which means listening to any address")
336336
f.Uint("port", defaultPort, "Port to listen from")
337337
f.String("proxy-urls", "", "Allow proxy requests to specified URLs")
338+
f.Bool("enable-helm", false, "Enable Helm operations")
338339

339340
f.String("oidc-client-id", "", "ClientID for OIDC")
340341
f.String("oidc-client-secret", "", "ClientSecret for OIDC")

backend/pkg/config/config_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,13 @@ func TestParseFlags(t *testing.T) {
178178
assert.Equal(t, filepath.Join(getTestDataPath(), "valid_ca.pem"), conf.OidcCAFile)
179179
},
180180
},
181+
{
182+
name: "enable_helm",
183+
args: []string{"go run ./cmd", "--enable-helm"},
184+
verify: func(t *testing.T, conf *config.Config) {
185+
assert.Equal(t, true, conf.EnableHelm)
186+
},
187+
},
181188
}
182189

183190
for _, tt := range tests {

charts/headlamp/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ $ helm install my-headlamp headlamp/headlamp \
7272
| config.inCluster | bool | `true` | Run Headlamp in-cluster |
7373
| config.baseURL | string | `""` | Base URL path for Headlamp UI |
7474
| config.pluginsDir | string | `"/headlamp/plugins"` | Directory to load Headlamp plugins from |
75+
| config.enableHelm | bool | `false` | Enable Helm operations like install, upgrade and uninstall of Helm charts |
7576
| config.extraArgs | array | `[]` | Additional arguments for Headlamp server |
7677
| config.tlsCertPath | string | `""` | Certificate for serving TLS |
7778
| config.tlsKeyPath | string | `""` | Key for serving TLS |

charts/headlamp/templates/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,9 @@ spec:
202202
{{- if .Values.config.inCluster }}
203203
- "-in-cluster"
204204
{{- end }}
205+
{{- with .Values.config.enableHelm}}
206+
- "-enable-helm"
207+
{{- end }}
205208
{{- if .Values.config.watchPlugins }}
206209
- "-watch-plugins-changes"
207210
{{- end }}

charts/headlamp/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ config:
9696
name: ""
9797
# -- directory to look for plugins
9898
pluginsDir: "/headlamp/plugins"
99+
enableHelm: false
99100
watchPlugins: false
100101
# tlsCertPath: "/headlamp-cert/headlamp-ca.crt"
101102
# tlsKeyPath: "/headlamp-cert/headlamp-tls.key"

0 commit comments

Comments
 (0)