@@ -42,41 +42,42 @@ const (
42
42
//
43
43
// b.Host().Brand("").Config()
44
44
type ConsoleServerCLIConfigBuilder struct {
45
- host string
46
- logoutRedirectURL string
47
- brand operatorv1.Brand
48
- docURL string
49
- apiServerURL string
50
- controlPlaneToplogy configv1.TopologyMode
51
- statusPageID string
52
- customProductName string
53
- devCatalogCustomization operatorv1.DeveloperConsoleCatalogCustomization
54
- projectAccess operatorv1.ProjectAccess
55
- quickStarts operatorv1.QuickStarts
56
- addPage operatorv1.AddPage
57
- perspectives []operatorv1.Perspective
58
- customLogoFile string
59
- CAFile string
60
- monitoring map [string ]string
61
- customHostnameRedirectPort int
62
- inactivityTimeoutSeconds int
63
- pluginsList map [string ]string
64
- i18nNamespaceList []string
65
- proxyServices []ProxyService
66
- telemetry map [string ]string
67
- releaseVersion string
68
- nodeArchitectures []string
69
- nodeOperatingSystems []string
70
- copiedCSVsDisabled bool
71
- oauthClientID string
72
- oidcExtraScopes []string
73
- oidcIssuerURL string
74
- oidcOCLoginCommand string
75
- authType string
76
- sessionEncryptionFile string
77
- sessionAuthenticationFile string
78
- capabilities []operatorv1.Capability
79
- contentSecurityPolicyList map [v1.DirectiveType ][]string
45
+ host string
46
+ logoutRedirectURL string
47
+ brand operatorv1.Brand
48
+ docURL string
49
+ apiServerURL string
50
+ controlPlaneToplogy configv1.TopologyMode
51
+ statusPageID string
52
+ customProductName string
53
+ devCatalogCustomization operatorv1.DeveloperConsoleCatalogCustomization
54
+ projectAccess operatorv1.ProjectAccess
55
+ quickStarts operatorv1.QuickStarts
56
+ addPage operatorv1.AddPage
57
+ perspectives []operatorv1.Perspective
58
+ customLogoFile string
59
+ CAFile string
60
+ monitoring map [string ]string
61
+ customHostnameRedirectPort int
62
+ inactivityTimeoutSeconds int
63
+ pluginsList map [string ]string
64
+ i18nNamespaceList []string
65
+ proxyServices []ProxyService
66
+ telemetry map [string ]string
67
+ releaseVersion string
68
+ nodeArchitectures []string
69
+ nodeOperatingSystems []string
70
+ copiedCSVsDisabled bool
71
+ oauthClientID string
72
+ oidcExtraScopes []string
73
+ oidcIssuerURL string
74
+ oidcOCLoginCommand string
75
+ authType string
76
+ sessionEncryptionFile string
77
+ sessionAuthenticationFile string
78
+ capabilities []operatorv1.Capability
79
+ contentSecurityPolicyEnabled bool
80
+ contentSecurityPolicyList map [v1.DirectiveType ][]string
80
81
}
81
82
82
83
func (b * ConsoleServerCLIConfigBuilder ) Host (host string ) * ConsoleServerCLIConfigBuilder {
@@ -211,6 +212,11 @@ func (b *ConsoleServerCLIConfigBuilder) ContentSecurityPolicies(cspList map[v1.D
211
212
return b
212
213
}
213
214
215
+ func (b * ConsoleServerCLIConfigBuilder ) ContentSecurityPolicyEnabled (enabled bool ) * ConsoleServerCLIConfigBuilder {
216
+ b .contentSecurityPolicyEnabled = enabled
217
+ return b
218
+ }
219
+
214
220
func (b * ConsoleServerCLIConfigBuilder ) I18nNamespaces (i18nNamespaces []string ) * ConsoleServerCLIConfigBuilder {
215
221
b .i18nNamespaceList = i18nNamespaces
216
222
return b
@@ -248,20 +254,21 @@ func (b *ConsoleServerCLIConfigBuilder) CopiedCSVsDisabled(copiedCSVsDisabled bo
248
254
249
255
func (b * ConsoleServerCLIConfigBuilder ) Config () Config {
250
256
return Config {
251
- Kind : "ConsoleConfig" ,
252
- APIVersion : "console.openshift.io/v1" ,
253
- Auth : b .auth (),
254
- Session : b .session (),
255
- ClusterInfo : b .clusterInfo (),
256
- Customization : b .customization (),
257
- ServingInfo : b .servingInfo (),
258
- Providers : b .providers (),
259
- MonitoringInfo : b .monitoringInfo (),
260
- Plugins : b .plugins (),
261
- I18nNamespaces : b .i18nNamespaces (),
262
- Proxy : b .proxy (),
263
- ContentSecurityPolicy : b .contentSecurityPolicy (),
264
- Telemetry : b .telemetry ,
257
+ Kind : "ConsoleConfig" ,
258
+ APIVersion : "console.openshift.io/v1" ,
259
+ Auth : b .auth (),
260
+ Session : b .session (),
261
+ ClusterInfo : b .clusterInfo (),
262
+ Customization : b .customization (),
263
+ ServingInfo : b .servingInfo (),
264
+ Providers : b .providers (),
265
+ MonitoringInfo : b .monitoringInfo (),
266
+ Plugins : b .plugins (),
267
+ I18nNamespaces : b .i18nNamespaces (),
268
+ Proxy : b .proxy (),
269
+ ContentSecurityPolicy : b .contentSecurityPolicy (),
270
+ ContentSecurityPolicyEnabled : b .getContentSecurityPolicyEnabled (),
271
+ Telemetry : b .telemetry ,
265
272
}
266
273
}
267
274
@@ -529,6 +536,10 @@ func (b *ConsoleServerCLIConfigBuilder) contentSecurityPolicy() map[v1.Directive
529
536
return b .contentSecurityPolicyList
530
537
}
531
538
539
+ func (b * ConsoleServerCLIConfigBuilder ) getContentSecurityPolicyEnabled () bool {
540
+ return b .contentSecurityPolicyEnabled
541
+ }
542
+
532
543
func (b * ConsoleServerCLIConfigBuilder ) proxy () Proxy {
533
544
return Proxy {
534
545
Services : b .proxyServices ,
0 commit comments