Skip to content

Commit

Permalink
feat: Allow to get default namespace from the API (#564)
Browse files Browse the repository at this point in the history
Signed-off-by: Sergiy Kulanov <[email protected]>
  • Loading branch information
SergK authored and MykolaMarusenko committed Jan 23, 2025
1 parent a93d41e commit 2cfd4a3
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM epamedp/headlamp:0.22.47
FROM epamedp/headlamp:0.22.48

COPY --chown=100:101 assets/ /headlamp/frontend
COPY --chown=100:101 dist/main.js /headlamp/plugins/edp/main.js
Expand Down
4 changes: 1 addition & 3 deletions deploy-templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ A Helm chart for KubeRocketCI Headlamp
|-----|------|---------|-------------|
| affinity | object | `{}` | Affinity settings for pod assignment |
| config.baseURL | string | `""` | base url path at which headlamp should run |
| config.defaultNamespace | string | `""` | Define default namespace for the portal. See https://docs.kuberocketci.io/docs/quick-start/platform-installation If not set, the namespace of the pod will be used. |
| config.oidc | object | `{"clientID":"","clientSecretKey":"","clientSecretName":"","enabled":false,"issuerUrl":"","scopes":""}` | For detailed instructions, refer to: https://docs.kuberocketci.io/docs/operator-guide/auth/configure-keycloak-oidc-eks, https://docs.kuberocketci.io/docs/operator-guide/auth/ui-portal-oidc |
| config.oidc.clientID | string | `""` | OIDC client ID |
| config.oidc.clientSecretKey | string | `""` | OIDC client secret key |
Expand Down Expand Up @@ -68,6 +69,3 @@ A Helm chart for KubeRocketCI Headlamp
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created |
| serviceAccount.name | string | `""` | The name of the service account to use.(If not set and create is true, a name is generated using the fullname template) |
| tolerations | list | `[]` | Toleration labels for pod assignment |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
17 changes: 17 additions & 0 deletions deploy-templates/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{ template "chart.header" . }}

{{ template "chart.deprecationWarning" . }}

{{ template "chart.badgesSection" . }}

{{ template "chart.description" . }}

{{ template "chart.homepageLine" . }}

{{ template "chart.maintainersSection" . }}

{{ template "chart.sourcesSection" . }}

{{ template "chart.requirementsSection" . }}

{{ template "chart.valuesSection" . }}
13 changes: 11 additions & 2 deletions deploy-templates/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{ if .Values.config.oidc.enabled }}
{{- if .Values.config.oidc.enabled }}
env:
{{- if .Values.extraVolumeMounts }}
- name: NODE_EXTRA_CA_CERTS
Expand All @@ -43,10 +43,19 @@ spec:
name: {{ .Values.config.oidc.clientSecretName }}
key: {{ .Values.config.oidc.clientSecretKey }}
{{ end }}
- name: DEFAULT_NAMESPACE
{{- if .Values.config.defaultNamespace }}
value: {{ .Values.config.defaultNamespace }}
{{- else }}
valueFrom:
fieldRef:
fieldPath: metadata.namespace
{{- end }}
args:
- "-in-cluster"
- "-plugins-dir=/headlamp/plugins"
{{ if .Values.config.oidc.enabled }}
- "-default-namespace=$(DEFAULT_NAMESPACE)"
{{- if .Values.config.oidc.enabled }}
{{- with .Values.config.oidc.clientID }}
- "-oidc-client-id={{ . }}"
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions deploy-templates/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ fullnameOverride: ""
config:
# -- base url path at which headlamp should run
baseURL: ""
# -- Define default namespace for the portal. See https://docs.kuberocketci.io/docs/quick-start/platform-installation
# If not set, the namespace of the pod will be used.
defaultNamespace: ""
# -- Ensure that the specified client is associated with cluster OIDC integration.
# -- For detailed instructions, refer to: https://docs.kuberocketci.io/docs/operator-guide/auth/configure-keycloak-oidc-eks, https://docs.kuberocketci.io/docs/operator-guide/auth/ui-portal-oidc
oidc:
Expand Down

0 comments on commit 2cfd4a3

Please sign in to comment.