Skip to content

Commit 23b1e51

Browse files
committed
Update documentation
1 parent 1e8e465 commit 23b1e51

File tree

1 file changed

+104
-1
lines changed

1 file changed

+104
-1
lines changed

docs/modules/ROOT/pages/references/parameters.adoc

Lines changed: 104 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,12 @@ This allows users to remove links which were configured higher up in the hierarc
121121
type:: dictionary
122122
default:: `{}`
123123

124+
[NOTE]
125+
====
126+
This parameter is deprecated on OpenShift 4.19 and newer.
127+
Use `custom_logos` and `custom_favicon` instead.
128+
====
129+
124130
Add a custom logo to the console.
125131
Takes a single key with the filename and the value is the base64 encoded logo.
126132
The logo can be a file in any common image format, including GIF, JPG, PNG, or SVG, and is constrained to a max-height of 60px
@@ -131,13 +137,110 @@ The filename needs to have a filename extension which matches the image format.
131137
For SVG logos the file must *not* be base64 encoded, but inserted directly as a string.
132138
====
133139

134-
By default, OCP won't serve a favicon if a custom logo is configured for the console.
140+
By default, OpenShift won't serve a favicon if a custom logo is configured for the console.
135141
This is an intentional design decision as documented in this https://bugzilla.redhat.com/show_bug.cgi?id=1844883#c1[bug report].
136142

137143
The component tries to ensure that a favicon is served even if a custom logo is configured.
138144
However, because the current workaround for the missing favicon requires an additional custom route for the console hostname, it can only be implemented for configurations which use a custom console hostname.
139145
Otherwise, the component is unable to correctly configure `spec.hostname` for the console.
140146

147+
== `custom_logos`
148+
149+
[horizontal]
150+
type:: dictionary
151+
default:: https://github.com/appuio/component-openshift4-console/blob/master/class/defaults.yml[See `class/defaults.yml`]
152+
153+
Configure custom logos for the console.
154+
This parameter only has an effect on OpenShift 4.19 and newer.
155+
For older versions of OpenShift, use parameter `custom_logo`.
156+
157+
OpenShift 4.19 introduces a new console look with a dark and light theme.
158+
The new custom logo mechanism allows configuring separate logos for each theme.
159+
The component supports keys `dark` and `light` to specify logos for the dark and light theme respectively.
160+
The component additionally supports specifying a single logo for all themes in key `'*'`.
161+
If there's no logo for a theme, the console will show the default logo for that theme.
162+
163+
Each logo can be a file in any common image format, including GIF, JPG, PNG, or SVG, and is constrained to a max-height of 60px.
164+
165+
The component looks for fields `type` and `data` in each entry of the parameter.
166+
Field `type` is expected to be a valid file extension in all lower case matching the image data provided in field `data`.
167+
Field data is the logo image data, in plain text for SVG and base64 encoded for all other formats.
168+
169+
The component will render all the logos in a single ConfigMap.
170+
The component will dynamically add logos to fields `data` (for SVG) and `binaryData` (for other formats) in the ConfigMap.
171+
172+
Additionally, the component will configure an entry in `spec.customization.logos` in the `console.operator.openshift.io` custom resource to actually configure the custom logos.
173+
174+
=== Examples
175+
176+
.Separate logo per theme
177+
[source,yaml]
178+
----
179+
custom_logos:
180+
dark:
181+
type: svg
182+
data: |
183+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
184+
<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60">
185+
<circle cx="30" cy="30" r="20" stroke="#fff" stroke-width="4" fill-opacity="0%"/>
186+
</svg>
187+
light:
188+
type: svg
189+
data: |
190+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
191+
<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60">
192+
<circle cx="30" cy="30" r="20" stroke="#000" stroke-width="4" fill-opacity="0%"/>
193+
</svg>
194+
----
195+
196+
.Same logo for all themes
197+
[source,yaml]
198+
----
199+
custom_logos:
200+
'*':
201+
type: svg
202+
data: |
203+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
204+
<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60">
205+
<circle cx="30" cy="30" r="20" stroke="#f00" stroke-width="4" fill-opacity="0%"/>
206+
</svg>
207+
----
208+
209+
.Different file types
210+
[source,yaml]
211+
----
212+
custom_logos:
213+
dark:
214+
type: svg
215+
data: | <1>
216+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
217+
<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60">
218+
<circle cx="30" cy="30" r="20" stroke="#fff" stroke-width="4" fill-opacity="0%"/>
219+
</svg>
220+
light:
221+
type: png
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hZDgsWBfAI8uRzVebTdD5FEvUFLhTq8+p8eVbqV6Py6ymL3ZouJPhdjNu7MVIAcdhWxt+yi4o/SYtVvQLtiQtfbst+HsP3ZtvLYtNm3O1pKgQzBVBTZvm4xejRuRoF/pwVaoRF8Izrc6r6rK5mGf0rMf16cKtVopm/9n65n/vor96eEm0pf0U6Sb5LuB7ZR/evgeeEv66eFsAqWYXIUKFSpUqFCh1ugvn+zZeVm8jdkAAAAASUVORK5CYII= <2>
223+
----
224+
<1> SVG needs to be configured as plain text
225+
<2> All other formats, such as PNG need to be configured base64 encoded
226+
227+
== `custom_favicon`
228+
229+
[horizontal]
230+
type:: dictionary
231+
default:: `{}`
232+
233+
Starting with OpenShift 4.19, users can configure custom favicons for the console.
234+
This parameter has no effect on OpenShift versions before 4.19.
235+
236+
OpenShift 4.19 supports specifying separate favicons for the dark and light themes, but the component currently only supports configuring a single favicon for both themes.
237+
238+
The component looks for fields `type` and `data` in the parameter.
239+
Field `type` is expected to be a valid file extension in all lower case matching the image data provided in field `data`.
240+
Field data is the favicon data, in plain text for SVG and base64 encoded for all other formats.
241+
242+
The component will write the favicon into a ConfigMap and configure an entry in `spec.customization.logos` in the `console.operator.openshift.io` custom resource to enable the custom favicon for the console.
243+
141244
== `secrets`
142245

143246
[horizontal]

0 commit comments

Comments
 (0)