Skip to content

Commit

Permalink
bugfix/fix-nil-pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
klinch0 committed Feb 25, 2025
1 parent d0d62e8 commit beaf0d5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 46 deletions.
15 changes: 5 additions & 10 deletions packages/core/platform/bundles/paas-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -246,19 +246,14 @@ releases:
{{- end }}
{{- end }}
dashboard:
image:
registry: ghcr.io/aenix-io/cozystack
repository: dashboard
tag: v0.25.0
digest: "sha256:81e7b625c667bce5fc339eb97c8e115eafb82f66df4501550b3677ac53f6e234"
{{- $wlConfigmap := lookup "v1" "ConfigMap" "cozy-dashboard" "white-label" }}
{{- $locale := dig "data" "locale" "" $wlConfigmap }}
{{- if $locale }}
{{- $cozystackBranding:= lookup "v1" "ConfigMap" "cozy-system" "cozystack-branding" }}
{{- $branding := dig "data" "branding" "" $cozystackBranding }}
{{- if $branding }}
customLocale:
"Kubeapps": {{ $locale }}
"Kubeapps": {{ $branding }}
{{- end }}
customStyle: |
{{- $logoImage := dig "data" "logo" "" $wlConfigmap }}
{{- $logoImage := dig "data" "logo" "" $cozystackBranding }}
{{- if $logoImage }}
.kubeapps-logo {
background-image: {{ $logoImage }}
Expand Down
15 changes: 5 additions & 10 deletions packages/core/platform/bundles/paas-hosted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,19 +169,14 @@ releases:
{{- end }}
{{- end }}
dashboard:
image:
registry: ghcr.io/aenix-io/cozystack
repository: dashboard
tag: v0.25.0
digest: "sha256:81e7b625c667bce5fc339eb97c8e115eafb82f66df4501550b3677ac53f6e234"
{{- $wlConfigmap := lookup "v1" "ConfigMap" "cozy-dashboard" "white-label" }}
{{- $locale := dig "data" "locale" "" $wlConfigmap }}
{{- if $locale }}
{{- $cozystackBranding:= lookup "v1" "ConfigMap" "cozy-system" "cozystack-branding" }}
{{- $branding := dig "data" "branding" "" $cozystackBranding }}
{{- if $branding }}
customLocale:
"Kubeapps": {{ $locale }}
"Kubeapps": {{ $branding }}
{{- end }}
customStyle: |
{{- $logoImage := dig "data" "logo" "" $wlConfigmap }}
{{- $logoImage := dig "data" "logo" "" $cozystackBranding }}
{{- if $logoImage }}
.kubeapps-logo {
background-image: {{ $logoImage }}
Expand Down
22 changes: 0 additions & 22 deletions packages/system/dashboard/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,6 @@ kubeapps:
flux:
enabled: true
dashboard:
customStyle: |
#serviceaccount-selector {
display: none;
}
.login-moreinfo {
display: none;
}
a[href="#/docs"] {
display: none;
}
.login-group .clr-form-control .clr-control-label {
display: none;
}
.appview-separator div.appview-first-row div.center {
display: none;
}
.appview-separator div.appview-first-row section[aria-labelledby="app-secrets"] {
display: none;
}
.appview-first-row section[aria-labelledby="access-urls-title"] {
width: 100%;
}
image:
registry: ghcr.io/aenix-io/cozystack
repository: dashboard
Expand Down
12 changes: 8 additions & 4 deletions packages/system/keycloak-configure/templates/configure-kk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
{{- $existingK8sSecret := lookup "v1" "Secret" .Release.Namespace "k8s-client" }}
{{- $existingKubeappsSecret := lookup "v1" "Secret" .Release.Namespace "kubeapps-client" }}
{{- $existingAuthConfig := lookup "v1" "Secret" "cozy-dashboard" "kubeapps-auth-config" }}
{{- $cozystackBranding:= lookup "v1" "ConfigMap" "cozy-system" "cozystack-branding" }}

{{ $k8sClient := "" }}
{{- if $existingK8sSecret }}
Expand All @@ -29,8 +30,10 @@
{{- $cookieSecret = randAlphaNum 16 }}
{{- end }}

{{- $wlConfigmap := lookup "v1" "ConfigMap" "cozy-dashboard" "white-label" }}
{{- $locale := index $wlConfigmap.data "locale" }}
{{ $branding := "" }}
{{- if $cozystackBranding }}
{{- $branding = index $cozystackBranding.data "branding" }}
{{- end }}

---

Expand Down Expand Up @@ -86,8 +89,9 @@ metadata:
spec:
realmName: cozy
clusterKeycloakRef: keycloak-cozy
{{- if $locale }}
displayNameHtml: {{ $locale }}
{{- if $branding }}
displayHtmlName: {{ $branding }}
displayName: {{ $branding }}
{{- end }}

---
Expand Down

0 comments on commit beaf0d5

Please sign in to comment.