Skip to content

Commit f503034

Browse files
committed
ability-to-add-second-logo-pt6
1 parent 94fa59b commit f503034

File tree

7 files changed

+202
-4
lines changed

7 files changed

+202
-4
lines changed

openapi/generated_openapi/zz_generated.openapi.go

+41-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

openapi/openapi.json

+26-1
Original file line numberDiff line numberDiff line change
@@ -27048,10 +27048,15 @@
2704827048
"x-kubernetes-list-type": "map"
2704927049
},
2705027050
"customLogoFile": {
27051-
"description": "customLogoFile replaces the default OpenShift logo in the masthead and about dialog. It is a reference to a ConfigMap in the openshift-config namespace. This can be created with a command like 'oc create configmap custom-logo --from-file=/path/to/file -n openshift-config'. Image size must be less than 1 MB due to constraints on the ConfigMap size. The ConfigMap key should include a file extension so that the console serves the file with the correct MIME type. Recommended logo specifications: Dimensions: Max height of 68px and max width of 200px SVG format preferred",
27051+
"description": "customLogoFile replaces the default OpenShift logo in the masthead and about dialog. It is a reference to a ConfigMap in the openshift-config namespace. This can be created with a command like 'oc create configmap custom-logo --from-file=/path/to/file -n openshift-config'. Image size must be less than 1 MB due to constraints on the ConfigMap size. The ConfigMap key should include a file extension so that the console serves the file with the correct MIME type. Recommended logo specifications: Dimensions: Max height of 68px and max width of 200px SVG format preferred Deprecated: Use customLogoFiles instead.",
2705227052
"default": {},
2705327053
"$ref": "#/definitions/com.github.openshift.api.config.v1.ConfigMapFileReference"
2705427054
},
27055+
"customLogoFiles": {
27056+
"description": "customLogoFiles replaces the default OpenShift logo in the masthead and about dialog. It is a reference to a ConfigMap in the openshift-config namespace. This can be created with a command like 'oc create configmap custom-logo --from-file=/path/to/file -n openshift-config'. Image size must be less than 1 MB due to constraints on the ConfigMap size. The ConfigMap keys should include file extensions for dark and light themes so that the console serves these files with the correct MIME type. Recommended logo specifications: Dimensions: Max height of 68px and max width of 200px SVG format preferred",
27057+
"default": {},
27058+
"$ref": "#/definitions/com.github.openshift.api.operator.v1.CustomFiles"
27059+
},
2705527060
"customProductName": {
2705627061
"description": "customProductName is the name that will be displayed in page titles, logo alt text, and the about dialog instead of the normal OpenShift product name.",
2705727062
"type": "string"
@@ -27255,6 +27260,26 @@
2725527260
}
2725627261
}
2725727262
},
27263+
"com.github.openshift.api.operator.v1.CustomFiles": {
27264+
"description": "CustomFiles defines a configuration based on theme types for the console UI logo.",
27265+
"type": "object",
27266+
"required": [
27267+
"type",
27268+
"path"
27269+
],
27270+
"properties": {
27271+
"path": {
27272+
"description": "path is the reference to the ConfigMap in the openshift-config namespace.",
27273+
"default": {},
27274+
"$ref": "#/definitions/com.github.openshift.api.config.v1.ConfigMapFileReference"
27275+
},
27276+
"type": {
27277+
"description": "type of the theme for the console UI.",
27278+
"type": "string",
27279+
"default": ""
27280+
}
27281+
}
27282+
},
2725827283
"com.github.openshift.api.operator.v1.DNS": {
2725927284
"description": "DNS manages the CoreDNS component to provide a name resolution service for pods and services in the cluster.\n\nThis supports the DNS-based service discovery specification: https://github.com/kubernetes/dns/blob/master/docs/specification.md\n\nMore details: https://kubernetes.io/docs/tasks/administer-cluster/coredns\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).",
2726027285
"type": "object",

operator/v1/types_console.go

+35
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,42 @@ type Capability struct {
143143
Visibility CapabilityVisibility `json:"visibility"`
144144
}
145145

146+
// ThemeType defines the type of the theme for the console UI.
147+
type ThemeType string
148+
149+
// ThemeType values
150+
const (
151+
// DarkTheme represents the dark theme for the console UI.
152+
DarkTheme ThemeType = "Dark"
153+
// LightTheme represents the light theme for the console UI.
154+
LightTheme ThemeType = "Light"
155+
)
156+
157+
// CustomFiles defines a configuration based on theme types for the console UI logo.
158+
type CustomFiles struct {
159+
// type of the theme for the console UI.
160+
// +unionDiscriminator
161+
// +kubebuilder:validation:Enum:="Dark";"Light"
162+
// +required
163+
Type ThemeType `json:"type"`
164+
// path is the reference to the ConfigMap in the openshift-config namespace.
165+
// +required
166+
Path configv1.ConfigMapFileReference `json:"path"`
167+
}
168+
146169
// ConsoleCustomization defines a list of optional configuration for the console UI.
147170
type ConsoleCustomization struct {
171+
// customLogoFiles replaces the default OpenShift logo in the masthead and about dialog. It is a reference to a
172+
// ConfigMap in the openshift-config namespace. This can be created with a command like
173+
// 'oc create configmap custom-logo --from-file=/path/to/file -n openshift-config'.
174+
// Image size must be less than 1 MB due to constraints on the ConfigMap size.
175+
// The ConfigMap keys should include file extensions for dark and light themes so that the console serves these files
176+
// with the correct MIME type.
177+
// Recommended logo specifications:
178+
// Dimensions: Max height of 68px and max width of 200px
179+
// SVG format preferred
180+
// +optional
181+
CustomLogoFiles CustomFiles `json:"customLogoFiles,omitempty"`
148182
// capabilities defines an array of capabilities that can be interacted with in the console UI.
149183
// Each capability defines a visual state that can be interacted with the console to render in the UI.
150184
// Available capabilities are LightspeedButton and GettingStartedBanner.
@@ -180,6 +214,7 @@ type ConsoleCustomization struct {
180214
// Recommended logo specifications:
181215
// Dimensions: Max height of 68px and max width of 200px
182216
// SVG format preferred
217+
// Deprecated: Use customLogoFiles instead.
183218
// +optional
184219
CustomLogoFile configv1.ConfigMapFileReference `json:"customLogoFile,omitempty"`
185220
// developerCatalog allows to configure the shown developer catalog categories (filters) and types (sub-catalogs).

operator/v1/zz_generated.crd-manifests/0000_50_console_01_consoles.crd.yaml

+35
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ spec:
139139
Recommended logo specifications:
140140
Dimensions: Max height of 68px and max width of 200px
141141
SVG format preferred
142+
Deprecated: Use customLogoFiles instead.
142143
properties:
143144
key:
144145
description: key allows pointing to a specific key/value inside
@@ -147,6 +148,40 @@ spec:
147148
name:
148149
type: string
149150
type: object
151+
customLogoFiles:
152+
description: |-
153+
customLogoFiles replaces the default OpenShift logo in the masthead and about dialog. It is a reference to a
154+
ConfigMap in the openshift-config namespace. This can be created with a command like
155+
'oc create configmap custom-logo --from-file=/path/to/file -n openshift-config'.
156+
Image size must be less than 1 MB due to constraints on the ConfigMap size.
157+
The ConfigMap keys should include file extensions for dark and light themes so that the console serves these files
158+
with the correct MIME type.
159+
Recommended logo specifications:
160+
Dimensions: Max height of 68px and max width of 200px
161+
SVG format preferred
162+
properties:
163+
path:
164+
description: path is the reference to the ConfigMap in the
165+
openshift-config namespace.
166+
properties:
167+
key:
168+
description: key allows pointing to a specific key/value
169+
inside of the configmap. This is useful for logical
170+
file references.
171+
type: string
172+
name:
173+
type: string
174+
type: object
175+
type:
176+
description: type of the theme for the console UI.
177+
enum:
178+
- Dark
179+
- Light
180+
type: string
181+
required:
182+
- path
183+
- type
184+
type: object
150185
customProductName:
151186
description: |-
152187
customProductName is the name that will be displayed in page titles, logo alt text, and the about dialog

operator/v1/zz_generated.deepcopy.go

+18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

operator/v1/zz_generated.featuregated-crd-manifests/consoles.operator.openshift.io/AAA_ungated.yaml

+35
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ spec:
140140
Recommended logo specifications:
141141
Dimensions: Max height of 68px and max width of 200px
142142
SVG format preferred
143+
Deprecated: Use customLogoFiles instead.
143144
properties:
144145
key:
145146
description: key allows pointing to a specific key/value inside
@@ -148,6 +149,40 @@ spec:
148149
name:
149150
type: string
150151
type: object
152+
customLogoFiles:
153+
description: |-
154+
customLogoFiles replaces the default OpenShift logo in the masthead and about dialog. It is a reference to a
155+
ConfigMap in the openshift-config namespace. This can be created with a command like
156+
'oc create configmap custom-logo --from-file=/path/to/file -n openshift-config'.
157+
Image size must be less than 1 MB due to constraints on the ConfigMap size.
158+
The ConfigMap keys should include file extensions for dark and light themes so that the console serves these files
159+
with the correct MIME type.
160+
Recommended logo specifications:
161+
Dimensions: Max height of 68px and max width of 200px
162+
SVG format preferred
163+
properties:
164+
path:
165+
description: path is the reference to the ConfigMap in the
166+
openshift-config namespace.
167+
properties:
168+
key:
169+
description: key allows pointing to a specific key/value
170+
inside of the configmap. This is useful for logical
171+
file references.
172+
type: string
173+
name:
174+
type: string
175+
type: object
176+
type:
177+
description: type of the theme for the console UI.
178+
enum:
179+
- Dark
180+
- Light
181+
type: string
182+
required:
183+
- path
184+
- type
185+
type: object
151186
customProductName:
152187
description: |-
153188
customProductName is the name that will be displayed in page titles, logo alt text, and the about dialog

0 commit comments

Comments
 (0)