Skip to content

Commit 06bc57c

Browse files
authored
Merge pull request #78 from appuio/feat/support-4.17
Update default console plugins for OpenShift 4.17
2 parents 740628e + b51f401 commit 06bc57c

File tree

18 files changed

+35
-41
lines changed

18 files changed

+35
-41
lines changed

.cruft.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"name": "OpenShift4 Console",
88
"slug": "openshift4-console",
99
"parameter_key": "openshift4_console",
10-
"test_cases": "defaults custom-plugins custom-route custom-route-legacy custom-route-managed-tls custom-links custom-logo ocp-4.14 notifications upgrade-notification",
10+
"test_cases": "defaults custom-plugins custom-route custom-route-legacy custom-route-managed-tls custom-links custom-logo notifications upgrade-notification",
1111
"add_lib": "n",
1212
"add_pp": "n",
1313
"add_golden": "y",
@@ -24,7 +24,8 @@
2424
"github_owner": "appuio",
2525
"github_name": "component-openshift4-console",
2626
"github_url": "https://github.com/appuio/component-openshift4-console",
27-
"_template": "https://github.com/projectsyn/commodore-component-template.git"
27+
"_template": "https://github.com/projectsyn/commodore-component-template.git",
28+
"_commit": "98d16f99766e6c6d97322dbe42e058f0e2bf73d0"
2829
}
2930
},
3031
"directory": null

.github/workflows/test.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ jobs:
3939
- custom-route-managed-tls
4040
- custom-links
4141
- custom-logo
42-
- ocp-4.14
4342
- notifications
4443
- upgrade-notification
4544
defaults:
@@ -63,7 +62,6 @@ jobs:
6362
- custom-route-managed-tls
6463
- custom-links
6564
- custom-logo
66-
- ocp-4.14
6765
- notifications
6866
- upgrade-notification
6967
defaults:

Makefile.vars.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ KUBENT_IMAGE ?= ghcr.io/doitintl/kube-no-trouble:latest
5757
KUBENT_DOCKER ?= $(DOCKER_CMD) $(DOCKER_ARGS) $(root_volume) --entrypoint=/app/kubent $(KUBENT_IMAGE)
5858

5959
instance ?= defaults
60-
test_instances = tests/defaults.yml tests/custom-plugins.yml tests/custom-route.yml tests/custom-route-legacy.yml tests/custom-route-managed-tls.yml tests/custom-links.yml tests/custom-logo.yml tests/ocp-4.14.yml tests/notifications.yml tests/upgrade-notification.yml
60+
test_instances = tests/defaults.yml tests/custom-plugins.yml tests/custom-route.yml tests/custom-route-legacy.yml tests/custom-route-managed-tls.yml tests/custom-links.yml tests/custom-logo.yml tests/notifications.yml tests/upgrade-notification.yml

class/defaults.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ parameters:
1414
openshift.io/node-selector: ''
1515
openshift_version:
1616
Major: '4'
17-
Minor: '13'
17+
Minor: '17'
1818
route:
1919
console: {}
2020
downloads: {}

component/main.jsonnet

+5-4
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,12 @@ local tlsSecret =
4747
local consolePlugins =
4848
// set default plugins dynamically based on OCP minor version and append
4949
// user-configured plugins to the default.
50-
local defaults =
51-
if std.parseInt(params.openshift_version.Minor) > 13 then
52-
[ 'monitoring-plugin' ]
50+
local defaults = [ 'monitoring-plugin' ] + (
51+
if std.parseInt(params.openshift_version.Minor) > 16 then
52+
[ 'networking-console-plugin' ]
5353
else
54-
[];
54+
[]
55+
);
5556
// render final plugins list by appending any user-provided plugins that
5657
// aren't part of the default plugins to the list of plugins. We use
5758
// `std.set()` on the user-provided plugins so that users don't have to

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ default::
3535
[source,yaml]
3636
----
3737
Major: '4'
38-
Minor: '13'
38+
Minor: '17'
3939
----
4040

4141
The OpenShift major and minor version.
@@ -81,6 +81,7 @@ Add plugins to the console.
8181

8282
The component will inject a dynamic set of plugins into the configuration based on the reported OpenShift version in parameter `openshift_version`.
8383
For OpenShift 4.14 and newer, the component always adds plugin `monitoring-plugin`.
84+
For OpenShift 4.17 and newer, the component always adds plugin `networking-console-plugin`.
8485
Additionally, the component will remove duplicated entries from the list of configured plugins.
8586

8687
NOTE: The order of entries in the field isn't guaranteed to be stable.

tests/golden/custom-links/openshift4-console/openshift4-console/10_console.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ metadata:
77
name: cluster
88
spec:
99
managementState: Managed
10-
plugins: []
10+
plugins:
11+
- monitoring-plugin
12+
- networking-console-plugin

tests/golden/custom-logo/openshift4-console/openshift4-console/10_console.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,6 @@ spec:
1212
name: console-logo
1313
customProductName: Company Cloud
1414
managementState: Managed
15-
plugins: []
15+
plugins:
16+
- monitoring-plugin
17+
- networking-console-plugin

tests/golden/custom-plugins/openshift4-console/openshift4-console/10_console.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@ metadata:
88
spec:
99
managementState: Managed
1010
plugins:
11+
- monitoring-plugin
12+
- networking-console-plugin
1113
- example-plugin
1214
- foo-bar

tests/golden/custom-route-legacy/openshift4-console/openshift4-console/10_console.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ metadata:
77
name: cluster
88
spec:
99
managementState: Managed
10-
plugins: []
10+
plugins:
11+
- monitoring-plugin
12+
- networking-console-plugin

tests/golden/custom-route-managed-tls/openshift4-console/openshift4-console/10_console.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ metadata:
77
name: cluster
88
spec:
99
managementState: Managed
10-
plugins: []
10+
plugins:
11+
- monitoring-plugin
12+
- networking-console-plugin

tests/golden/custom-route/openshift4-console/openshift4-console/10_console.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ metadata:
77
name: cluster
88
spec:
99
managementState: Managed
10-
plugins: []
10+
plugins:
11+
- monitoring-plugin
12+
- networking-console-plugin

tests/golden/defaults/openshift4-console/openshift4-console/10_console.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ metadata:
77
name: cluster
88
spec:
99
managementState: Managed
10-
plugins: []
10+
plugins:
11+
- monitoring-plugin
12+
- networking-console-plugin

tests/golden/notifications/openshift4-console/openshift4-console/10_console.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ metadata:
77
name: cluster
88
spec:
99
managementState: Managed
10-
plugins: []
10+
plugins:
11+
- monitoring-plugin
12+
- networking-console-plugin

tests/golden/ocp-4.14/openshift4-console/apps/openshift4-console.yaml

Whitespace-only changes.

tests/golden/ocp-4.14/openshift4-console/openshift4-console/00_namespace.yaml

-8
This file was deleted.

tests/golden/ocp-4.14/openshift4-console/openshift4-console/10_console.yaml

-11
This file was deleted.

tests/ocp-4.14.yml

-4
This file was deleted.

0 commit comments

Comments
 (0)