Skip to content

Commit 08ce713

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

File tree

7 files changed

+237
-4
lines changed

7 files changed

+237
-4
lines changed

openapi/generated_openapi/zz_generated.openapi.go

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

openapi/openapi.json

+29-1
Original file line numberDiff line numberDiff line change
@@ -27048,10 +27048,18 @@
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+
"type": "array",
27058+
"items": {
27059+
"default": {},
27060+
"$ref": "#/definitions/com.github.openshift.api.operator.v1.CustomLogoFile"
27061+
}
27062+
},
2705527063
"customProductName": {
2705627064
"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.",
2705727065
"type": "string"
@@ -27255,6 +27263,26 @@
2725527263
}
2725627264
}
2725727265
},
27266+
"com.github.openshift.api.operator.v1.CustomLogoFile": {
27267+
"description": "CustomFiles defines a configuration based on theme types for the console UI logo.",
27268+
"type": "object",
27269+
"required": [
27270+
"type",
27271+
"path"
27272+
],
27273+
"properties": {
27274+
"path": {
27275+
"description": "path is the reference to a specific file within a ConfigMap in the openshift-config namespace. This field allows the console to locate and use the specified file containing a custom logo. The ConfigMap must be created with the appropriate keys and file extensions to ensure the console serves the file with the correct MIME type.",
27276+
"default": {},
27277+
"$ref": "#/definitions/com.github.openshift.api.config.v1.ConfigMapFileReference"
27278+
},
27279+
"type": {
27280+
"description": "Type specifies the theme type for the console UI. It determines whether the console should use the dark or light theme. This field is an enum with valid values \"Dark\" and \"Light\".",
27281+
"type": "string",
27282+
"default": ""
27283+
}
27284+
}
27285+
},
2725827286
"com.github.openshift.api.operator.v1.DNS": {
2725927287
"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).",
2726027288
"type": "object",

operator/v1/types_console.go

+38
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,45 @@ 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 CustomLogoFile struct {
159+
// Type specifies the theme type for the console UI.
160+
// It determines whether the console should use the dark or light theme.
161+
// This field is an enum with valid values "Dark" and "Light".
162+
// +kubebuilder:validation:Enum:="Dark";"Light"
163+
// +required
164+
Type ThemeType `json:"type"`
165+
// path is the reference to a specific file within a ConfigMap in the openshift-config namespace.
166+
// This field allows the console to locate and use the specified file containing a custom logo.
167+
// The ConfigMap must be created with the appropriate keys and file extensions to ensure the console serves the file with the correct MIME type.
168+
// +required
169+
Path configv1.ConfigMapFileReference `json:"path"`
170+
}
171+
146172
// ConsoleCustomization defines a list of optional configuration for the console UI.
147173
type ConsoleCustomization struct {
174+
// customLogoFiles replaces the default OpenShift logo in the masthead and about dialog. It is a reference to a
175+
// ConfigMap in the openshift-config namespace. This can be created with a command like
176+
// 'oc create configmap custom-logo --from-file=/path/to/file -n openshift-config'.
177+
// Image size must be less than 1 MB due to constraints on the ConfigMap size.
178+
// The ConfigMap keys should include file extensions for dark and light themes so that the console serves these files
179+
// with the correct MIME type.
180+
// Recommended logo specifications:
181+
// Dimensions: Max height of 68px and max width of 200px
182+
// SVG format preferred
183+
// +optional
184+
CustomLogoFiles []CustomLogoFile `json:"customLogoFiles,omitempty"`
148185
// capabilities defines an array of capabilities that can be interacted with in the console UI.
149186
// Each capability defines a visual state that can be interacted with the console to render in the UI.
150187
// Available capabilities are LightspeedButton and GettingStartedBanner.
@@ -180,6 +217,7 @@ type ConsoleCustomization struct {
180217
// Recommended logo specifications:
181218
// Dimensions: Max height of 68px and max width of 200px
182219
// SVG format preferred
220+
// Deprecated: Use customLogoFiles instead.
183221
// +optional
184222
CustomLogoFile configv1.ConfigMapFileReference `json:"customLogoFile,omitempty"`
185223
// 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

+44
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,49 @@ 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+
items:
163+
description: CustomFiles defines a configuration based on theme
164+
types for the console UI logo.
165+
properties:
166+
path:
167+
description: |-
168+
path is the reference to a specific file within a ConfigMap in the openshift-config namespace.
169+
This field allows the console to locate and use the specified file containing a custom logo.
170+
The ConfigMap must be created with the appropriate keys and file extensions to ensure the console serves the file with the correct MIME type.
171+
properties:
172+
key:
173+
description: key allows pointing to a specific key/value
174+
inside of the configmap. This is useful for logical
175+
file references.
176+
type: string
177+
name:
178+
type: string
179+
type: object
180+
type:
181+
description: |-
182+
Type specifies the theme type for the console UI.
183+
It determines whether the console should use the dark or light theme.
184+
This field is an enum with valid values "Dark" and "Light".
185+
enum:
186+
- Dark
187+
- Light
188+
type: string
189+
required:
190+
- path
191+
- type
192+
type: object
193+
type: array
150194
customProductName:
151195
description: |-
152196
customProductName is the name that will be displayed in page titles, logo alt text, and the about dialog

operator/v1/zz_generated.deepcopy.go

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

0 commit comments

Comments
 (0)