Skip to content

Commit a7e82ea

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

File tree

4 files changed

+120
-3
lines changed

4 files changed

+120
-3
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.deepcopy.go

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

0 commit comments

Comments
 (0)