Skip to content

Commit 5df3085

Browse files
committed
Only configure OpenShift 4.19+ custom logos on 4.19 and newer
1 parent 0693535 commit 5df3085

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

component/main.jsonnet

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ local params = inv.parameters.openshift4_console;
77

88
local versionGroup = 'operator.openshift.io/v1';
99

10+
local openshiftMinor = std.parseInt(params.openshift_version.Minor);
11+
1012
local validateConfig(obj, kind='logo') =
1113
assert
1214
std.set(std.objectFields(obj)) == std.set([ 'type', 'data' ]) :
@@ -36,7 +38,7 @@ local customLogos =
3638
}
3739
else {},
3840
};
39-
if std.length(std.prune(config)) > 0 then
41+
if openshiftMinor > 18 && std.length(std.prune(config)) > 0 then
4042
{
4143
cm_data: {
4244
[if std.length(config[theme]) > 0 && config[theme].type == 'svg' then config[theme].key]:
@@ -69,7 +71,7 @@ local customLogos =
6971
{};
7072

7173
local favicon =
72-
if std.length(params.custom_favicon) > 0 then
74+
if openshiftMinor > 18 && std.length(params.custom_favicon) > 0 then
7375
local config = validateConfig(params.custom_favicon, kind='favicon');
7476
config {
7577
key: 'favicon.%s' % super.type,
@@ -123,7 +125,7 @@ local consolePlugins =
123125
// set default plugins dynamically based on OCP minor version and append
124126
// user-configured plugins to the default.
125127
local defaults = [ 'monitoring-plugin' ] + (
126-
if std.parseInt(params.openshift_version.Minor) > 16 then
128+
if openshiftMinor > 16 then
127129
[ 'networking-console-plugin' ]
128130
else
129131
[]

0 commit comments

Comments
 (0)