Skip to content

Commit 46c5610

Browse files
committed
CRD changes for graphical console
This change introduces the CRD changes for the feature flag and new images required for graphical consoles. This is required to add without any backing implementation so that openstack-operator can pull in the CRD changes and establish the CSV entries for overriding the images. The feature flag will remain false until RHOSO-19 and this will never work with default antelope images. Jira: OSPRH-20211
1 parent 9695d21 commit 46c5610

File tree

8 files changed

+108
-6
lines changed

8 files changed

+108
-6
lines changed

api/bases/ironic.openstack.org_ironicconductors.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ spec:
5555
conductorGroup:
5656
description: ConductorGroup - Ironic Conductor conductor group.
5757
type: string
58+
consoleImage:
59+
description: ConsoleImage - Ironic Graphical Console Container Image
60+
type: string
5861
containerImage:
5962
description: ContainerImage - Ironic Conductor Container Image
6063
type: string
@@ -115,6 +118,11 @@ spec:
115118
- start
116119
type: object
117120
type: array
121+
graphicalConsoles:
122+
default: false
123+
description: 'Whether to enable graphical consoles. NOTE: Setting
124+
this to true is not supported.'
125+
type: boolean
118126
ironicPythonAgentImage:
119127
description: IronicPythonAgentImage - Image containing the ironic-python-agent
120128
kernel and ramdisk
@@ -142,6 +150,9 @@ spec:
142150
NodeSelector to target subset of worker nodes running this service. Setting here overrides
143151
any global NodeSelector settings within the Ironic CR
144152
type: object
153+
novncproxy:
154+
description: NoVNCProxy - Ironic NoVNCProxy Container Image
155+
type: string
145156
passwordSelectors:
146157
default:
147158
service: IronicPassword

api/bases/ironic.openstack.org_ironics.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ spec:
7878
ConfigOverwrite - interface to overwrite default config files like e.g. policy.json.
7979
But can also be used to add additional files. Those get added to the service config dir in /etc/<service> .
8080
type: object
81+
graphicalConsoles:
82+
default: false
83+
description: 'Whether to enable graphical consoles. NOTE: Setting
84+
this to true is not supported.'
85+
type: boolean
8186
images:
8287
default: {}
8388
description: Images - Container images for all ironic services
@@ -90,6 +95,10 @@ spec:
9095
description: Conductor - Ironic Conductor Container Image (will
9196
be set to environmental default if empty)
9297
type: string
98+
graphicalConsole:
99+
description: GraphicalConsole - Ironic Graphical Console Container
100+
Image (will be set to environmental default if empty)
101+
type: string
93102
inspector:
94103
description: Inspector - Ironic Inspector Container Image (will
95104
be set to environmental default if empty)
@@ -102,6 +111,10 @@ spec:
102111
description: NeutronAgent - ML2 baremtal - Ironic Neutron Agent
103112
Image (will be set to environmental default if empty)
104113
type: string
114+
novncproxy:
115+
description: NoVNCProxy - Ironic NoVNCProxy Container Image (will
116+
be set to environmental default if empty)
117+
type: string
105118
pxe:
106119
description: Pxe- Ironic DHCP/TFTP/HTTP Container Image URL (will
107120
be set to environmental default if empty)

api/v1beta1/ironic_types.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ const (
4747
IronicNeutronAgentContainerImage = "quay.io/podified-antelope-centos9/openstack-ironic-neutron-agent:current-podified"
4848
// IronicPythonAgentContainerImage is the fall-back container image for IronicPythonAgent
4949
IronicPythonAgentContainerImage = "quay.io/podified-antelope-centos9/ironic-python-agent:current-podified"
50+
// IronicNoVNCProxyContainerImage is the fall-back container image for NoVNCProxy
51+
IronicNoVNCProxyContainerImage = "quay.io/podified-antelope-centos9/ironic-novncproxy:current-podified"
52+
// IronicGraphicalConsoleContainer image is the fall-back container image for GraphicalConsole
53+
IronicGraphicalConsoleContainerImage = "quay.io/podified-antelope-centos9/ironic-graphical-console:current-podified"
5054
)
5155

5256
// IronicSpec defines the desired state of Ironic
@@ -161,6 +165,11 @@ type IronicSpecCore struct {
161165
// +kubebuilder:validation:Minimum=10
162166
// APITimeout for HAProxy, Apache
163167
APITimeout int `json:"apiTimeout"`
168+
169+
// +kubebuilder:validation:Optional
170+
// +kubebuilder:default=false
171+
// Whether to enable graphical consoles. NOTE: Setting this to true is not supported.
172+
GraphicalConsoles bool `json:"graphicalConsoles"`
164173
}
165174

166175
// IronicImages to specify container images required by all ironic services
@@ -188,6 +197,14 @@ type IronicImages struct {
188197
// +kubebuilder:validation:Optional
189198
// IronicPythonAgent - Image containing the ironic-python-agent kernel and ramdisk
190199
IronicPythonAgent string `json:"ironicPythonAgent"`
200+
201+
// +kubebuilder:validation:Optional
202+
// NoVNCProxy - Ironic NoVNCProxy Container Image (will be set to environmental default if empty)
203+
NoVNCProxy string `json:"novncproxy,omitempty"`
204+
205+
// +kubebuilder:validation:Optional
206+
// GraphicalConsole - Ironic Graphical Console Container Image (will be set to environmental default if empty)
207+
GraphicalConsole string `json:"graphicalConsole,omitempty"`
191208
}
192209

193210
// DHCPRange to define address range for DHCP requests
@@ -320,6 +337,8 @@ func SetupDefaults() {
320337
Pxe: util.GetEnvVar("RELATED_IMAGE_IRONIC_PXE_IMAGE_URL_DEFAULT", IronicPXEContainerImage),
321338
NeutronAgent: util.GetEnvVar("RELATED_IMAGE_IRONIC_NEUTRON_AGENT_IMAGE_URL_DEFAULT", IronicNeutronAgentContainerImage),
322339
IronicPythonAgent: util.GetEnvVar("RELATED_IMAGE_IRONIC_PYTHON_AGENT_IMAGE_URL_DEFAULT", IronicPythonAgentContainerImage),
340+
NoVNCProxy: util.GetEnvVar("RELATED_IMAGE_IRONIC_NOVNC_PROXY_IMAGE_URL_DEFAULT", IronicPythonAgentContainerImage),
341+
GraphicalConsole: util.GetEnvVar("RELATED_IMAGE_IRONIC_GRAPHICAL_CONSOLE_IMAGE_URL_DEFAULT", IronicPythonAgentContainerImage),
323342
}
324343

325344
SetupIronicImageDefaults(imageDefaults)

api/v1beta1/ironic_webhook.go

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,14 @@ type netIPStartEnd struct {
5757

5858
// IronicDefaults - TODO remove when openstack-operator has moved to IronicImages
5959
type IronicDefaults struct {
60-
APIContainerImageURL string
61-
ConductorContainerImageURL string
62-
InspectorContainerImageURL string
63-
PXEContainerImageURL string
64-
INAContainerImageURL string
65-
IPAContainerImageURL string
60+
APIContainerImageURL string
61+
ConductorContainerImageURL string
62+
InspectorContainerImageURL string
63+
PXEContainerImageURL string
64+
INAContainerImageURL string
65+
IPAContainerImageURL string
66+
NoVNCProxyContainerImageURL string
67+
GraphicalConsoleContainerImageURL string
6668
}
6769

6870
// SetupIronicDefaults - TODO remove when openstack-operator has moved to SetupIronicImageDefaults
@@ -74,6 +76,8 @@ func SetupIronicDefaults(defaults IronicDefaults) {
7476
Pxe: defaults.PXEContainerImageURL,
7577
NeutronAgent: defaults.INAContainerImageURL,
7678
IronicPythonAgent: defaults.IPAContainerImageURL,
79+
NoVNCProxy: defaults.NoVNCProxyContainerImageURL,
80+
GraphicalConsole: defaults.GraphicalConsoleContainerImageURL,
7781
})
7882
}
7983

api/v1beta1/ironicconductor_types.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,19 @@ type IronicConductorSpec struct {
120120
// +operator-sdk:csv:customresourcedefinitions:type=spec
121121
// TLS - Parameters related to the TLS
122122
TLS tls.Ca `json:"tls,omitempty"`
123+
124+
// +kubebuilder:validation:Optional
125+
// +kubebuilder:default=false
126+
// Whether to enable graphical consoles. NOTE: Setting this to true is not supported.
127+
GraphicalConsoles bool `json:"graphicalConsoles"`
128+
129+
// +kubebuilder:validation:Optional
130+
// NoVNCProxy - Ironic NoVNCProxy Container Image
131+
NoVNCProxy string `json:"novncproxy,omitempty"`
132+
133+
// +kubebuilder:validation:Optional
134+
// ConsoleImage - Ironic Graphical Console Container Image
135+
ConsoleImage string `json:"consoleImage"`
123136
}
124137

125138
// IronicConductorStatus defines the observed state of IronicConductor

config/crd/bases/ironic.openstack.org_ironicconductors.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ spec:
5555
conductorGroup:
5656
description: ConductorGroup - Ironic Conductor conductor group.
5757
type: string
58+
consoleImage:
59+
description: ConsoleImage - Ironic Graphical Console Container Image
60+
type: string
5861
containerImage:
5962
description: ContainerImage - Ironic Conductor Container Image
6063
type: string
@@ -115,6 +118,11 @@ spec:
115118
- start
116119
type: object
117120
type: array
121+
graphicalConsoles:
122+
default: false
123+
description: 'Whether to enable graphical consoles. NOTE: Setting
124+
this to true is not supported.'
125+
type: boolean
118126
ironicPythonAgentImage:
119127
description: IronicPythonAgentImage - Image containing the ironic-python-agent
120128
kernel and ramdisk
@@ -142,6 +150,9 @@ spec:
142150
NodeSelector to target subset of worker nodes running this service. Setting here overrides
143151
any global NodeSelector settings within the Ironic CR
144152
type: object
153+
novncproxy:
154+
description: NoVNCProxy - Ironic NoVNCProxy Container Image
155+
type: string
145156
passwordSelectors:
146157
default:
147158
service: IronicPassword

config/crd/bases/ironic.openstack.org_ironics.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ spec:
7878
ConfigOverwrite - interface to overwrite default config files like e.g. policy.json.
7979
But can also be used to add additional files. Those get added to the service config dir in /etc/<service> .
8080
type: object
81+
graphicalConsoles:
82+
default: false
83+
description: 'Whether to enable graphical consoles. NOTE: Setting
84+
this to true is not supported.'
85+
type: boolean
8186
images:
8287
default: {}
8388
description: Images - Container images for all ironic services
@@ -90,6 +95,10 @@ spec:
9095
description: Conductor - Ironic Conductor Container Image (will
9196
be set to environmental default if empty)
9297
type: string
98+
graphicalConsole:
99+
description: GraphicalConsole - Ironic Graphical Console Container
100+
Image (will be set to environmental default if empty)
101+
type: string
93102
inspector:
94103
description: Inspector - Ironic Inspector Container Image (will
95104
be set to environmental default if empty)
@@ -102,6 +111,10 @@ spec:
102111
description: NeutronAgent - ML2 baremtal - Ironic Neutron Agent
103112
Image (will be set to environmental default if empty)
104113
type: string
114+
novncproxy:
115+
description: NoVNCProxy - Ironic NoVNCProxy Container Image (will
116+
be set to environmental default if empty)
117+
type: string
105118
pxe:
106119
description: Pxe- Ironic DHCP/TFTP/HTTP Container Image URL (will
107120
be set to environmental default if empty)

config/rbac/role_ironic.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: Role
4+
metadata:
5+
name: ironic-graphical-console-role
6+
rules:
7+
- apiGroups:
8+
- ""
9+
resources:
10+
- pods
11+
verbs:
12+
- create
13+
- delete
14+
- get
15+
- list
16+
- patch
17+
- update
18+
- watch

0 commit comments

Comments
 (0)