diff --git a/docs/whitelabeling.md b/docs/whitelabeling.md index b2beb40..215d88d 100644 --- a/docs/whitelabeling.md +++ b/docs/whitelabeling.md @@ -4,18 +4,24 @@ To setup white-labeling, you can define next variables in `waldur/values.yaml` f * `shortPageTitle` - custom prefix for page title * `modePageTitle` - custom page title +* `loginLogo` - base64 encoded custom `.png` image string * `loginLogoPath` - path to custom `.png` image file for login page (should be in `waldur/` chart directory) +* `sidebarLogo` - base64 encoded custom `.png` image string * `sidebarLogoPath` - path to custom `.png` image file for sidebar header (should be in `waldur/` chart directory) +* `sidebarLogoDark` - base64 encoded custom `.png` image string * `sidebarLogoDarkPath` - path to custom `.png` image file for sidebar header in dark mode (should be in `waldur/` chart directory) +* `poweredByLogo` - base64 encoded custom `.png` image string * `poweredByLogoPath` - path to custom `.png` image file for "powered by" part of login page (should be in `waldur/` chart directory) -* `faviconPath` - path to custom favicon `.png` image file +* `favicon` - base64 encoded custom `.ico` image string +* `faviconPath` - path to custom favicon `.ico` image file * `tosHtmlPath` - path to custom terms of service file (`tos.html`) * `privacyHtmlPath` - path to custom privacy statement file (`privacy.html`) * `brandColor` - Hex color definition is used in HomePort landing page for login button. +* `heroImage` - base64 encoded custom `.jpg` image string * `heroImagePath` - Relative path to image rendered at hero section of HomePort landing page. * `heroLinkLabel` - Label for link in hero section of HomePort landing page. It can be lead to support site or blog post. * `heroLinkUrl` - Link URL in hero section of HomePort landing page. diff --git a/waldur/templates/config-icons.yaml b/waldur/templates/config-icons.yaml index 1ee5536..c2814a1 100644 --- a/waldur/templates/config-icons.yaml +++ b/waldur/templates/config-icons.yaml @@ -8,37 +8,55 @@ binaryData: {{ $fpath := "" }} {{ if .Values.waldur.whitelabeling.loginLogoPath }} - {{ $fpath = .Values.waldur.whitelabeling.loginLogoPath }} + {{ $fpath = .Values.waldur.whitelabeling.loginLogoPath }} login_logo.png: | {{ .Files.Get $fpath | b64enc | indent 4 }} + {{ else if .Values.waldur.whitelabeling.loginLogo }} + login_logo.png: | +{{ .Values.waldur.whitelabeling.loginLogo | indent 4 }} {{ end }} {{ if .Values.waldur.whitelabeling.sidebarLogoPath }} - {{ $fpath = .Values.waldur.whitelabeling.sidebarLogoPath }} + {{ $fpath = .Values.waldur.whitelabeling.sidebarLogoPath }} sidebar_logo.png: | {{ .Files.Get $fpath | b64enc | indent 4 }} + {{ else if .Values.waldur.whitelabeling.sidebarLogo }} + sidebar_logo.png: | +{{ .Values.waldur.whitelabeling.sidebarLogo | indent 4 }} {{ end }} {{ if .Values.waldur.whitelabeling.sidebarLogoDarkPath }} - {{ $fpath = .Values.waldur.whitelabeling.sidebarLogoDarkPath }} + {{ $fpath = .Values.waldur.whitelabeling.sidebarLogoDarkPath }} sidebar_logo_dark.png: | {{ .Files.Get $fpath | b64enc | indent 4 }} + {{ else if .Values.waldur.whitelabeling.sidebarLogoDark }} + sidebar_logo_dark.png: | +{{ .Values.waldur.whitelabeling.sidebarLogoDark | indent 4 }} {{ end }} {{ if .Values.waldur.whitelabeling.poweredByLogoPath }} - {{ $fpath = .Values.waldur.whitelabeling.poweredByLogoPath }} + {{ $fpath = .Values.waldur.whitelabeling.poweredByLogoPath }} poweredby_logo.png: | {{ .Files.Get $fpath | b64enc | indent 4 }} + {{ else if .Values.waldur.whitelabeling.poweredByLogo }} + poweredby_logo.png: | +{{ .Values.waldur.whitelabeling.poweredByLogo | indent 4 }} {{ end }} {{ if .Values.waldur.whitelabeling.faviconPath }} - {{ $fpath = .Values.waldur.whitelabeling.faviconPath }} + {{ $fpath = .Values.waldur.whitelabeling.faviconPath }} favicon.ico: | {{ .Files.Get $fpath | b64enc | indent 4 }} + {{ else if .Values.waldur.whitelabeling.favicon }} + favicon.ico: | +{{ .Values.waldur.whitelabeling.favicon | indent 4 }} {{ end }} {{ if .Values.waldur.whitelabeling.heroImagePath }} - {{ $fpath = .Values.waldur.whitelabeling.heroImagePath }} + {{ $fpath = .Values.waldur.whitelabeling.heroImagePath }} hero_image.jpg: | {{ .Files.Get $fpath | b64enc | indent 4 }} + {{ else if .Values.waldur.whitelabeling.heroImage }} + hero_image.jpg: | +{{ .Values.waldur.whitelabeling.heroImage | indent 4 }} {{ end }} diff --git a/waldur/templates/config-whitelabeling.yaml b/waldur/templates/config-whitelabeling.yaml index 3966e77..b14c449 100644 --- a/waldur/templates/config-whitelabeling.yaml +++ b/waldur/templates/config-whitelabeling.yaml @@ -28,26 +28,26 @@ data: default_idp: {{ .Values.waldur.defaultIdp | quote }} {{ end }} - {{ if .Values.waldur.whitelabeling.poweredByLogoPath }} + {{ if or .Values.waldur.whitelabeling.poweredByLogo .Values.waldur.whitelabeling.poweredByLogoPath }} powered_by_logo: "/etc/waldur/icons/poweredby_logo.png" {{ end }} - {{ if .Values.waldur.whitelabeling.heroImagePath }} + {{ if or .Values.waldur.whitelabeling.heroImage .Values.waldur.whitelabeling.heroImagePath }} hero_image: "/etc/waldur/icons/hero_image.jpg" {{ end }} - {{ if .Values.waldur.whitelabeling.sidebarLogoPath }} + {{ if or .Values.waldur.whitelabeling.sidebarLogo .Values.waldur.whitelabeling.sidebarLogoPath }} sidebar_logo: "/etc/waldur/icons/sidebar_logo.png" {{ end }} - {{ if .Values.waldur.whitelabeling.sidebarLogoDarkPath }} + {{ if or .Values.waldur.whitelabeling.sidebarLogoDark .Values.waldur.whitelabeling.sidebarLogoDarkPath }} sidebar_logo_dark: "/etc/waldur/icons/sidebar_logo_dark.png" {{ end }} - {{ if .Values.waldur.whitelabeling.loginLogoPath }} + {{ if or .Values.waldur.whitelabeling.loginLogo .Values.waldur.whitelabeling.loginLogoPath }} login_logo: "/etc/waldur/icons/login_logo.png" {{ end }} - {{ if .Values.waldur.whitelabeling.faviconPath }} + {{ if or .Values.waldur.whitelabeling.favicon .Values.waldur.whitelabeling.faviconPath }} favicon: "/etc/waldur/icons/favicon.ico" {{ end }} diff --git a/waldur/test/values.yaml b/waldur/test/values.yaml index 62a1761..19401a5 100755 --- a/waldur/test/values.yaml +++ b/waldur/test/values.yaml @@ -331,15 +331,21 @@ waldur: whitelabeling: shortPageTitle: "Waldur Helm Test" modePageTitle: "Waldur Helm Test" + loginLogo: "" loginLogoPath: "test/images/waldur-login-logo.png" + sidebarLogo: "" sidebarLogoPath: "test/images/waldur-sidebar-logo.png" + sidebarLogoDark: "" sidebarLogoDarkPath: "test/images/waldur-sidebar-logo.png" sidebarStyle: "dark" disableDarkTheme: false + poweredByLogo: "" poweredByLogoPath: "test/images/waldur-powered-by-logo.png" + favicon: "" faviconPath: "test/images/waldur-favicon.png" tosHtmlPath: "test/files/tos.html" brandColor: "" + heroImage: "" heroImagePath: "" # keep the default one, because the image is too large (~541 KB) heroLinkLabel: "" heroLinkUrl: "" diff --git a/waldur/values.yaml b/waldur/values.yaml index 63e0695..3a978f0 100755 --- a/waldur/values.yaml +++ b/waldur/values.yaml @@ -343,15 +343,21 @@ waldur: shortPageTitle: "" modePageTitle: "" loginLogoPath: "" + loginLogo: "" sidebarLogoPath: "" + sidebarLogo: "" sidebarLogoDarkPath: "" + sidebarLogoDark: "" sidebarStyle: "dark" disableDarkTheme: false poweredByLogoPath: "" + poweredByLogo: "" faviconPath: "" + favicon: "" tosHtmlPath: "" brandColor: "" heroImagePath: "" + heroImage: "" heroLinkLabel: "" heroLinkUrl: "" privacyHtmlPath: ""