Skip to content

Commit 71dab70

Browse files
Merge pull request openstack-k8s-operators#624 from steveb/graphical-console-crd
CRD changes for graphical console
2 parents 8536a4e + 42aa5e0 commit 71dab70

File tree

7 files changed

+108
-6
lines changed

7 files changed

+108
-6
lines changed

api/bases/ironic.openstack.org_ironicconductors.yaml

Lines changed: 15 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,15 @@ spec:
115118
- start
116119
type: object
117120
type: array
121+
graphicalConsoles:
122+
default: Disabled
123+
description: 'Whether to enable graphical consoles. NOTE: Setting
124+
this to Enabled is not supported.'
125+
enum:
126+
- Enabled
127+
- Disabled
128+
- ""
129+
type: string
118130
ironicPythonAgentImage:
119131
description: IronicPythonAgentImage - Image containing the ironic-python-agent
120132
kernel and ramdisk
@@ -142,6 +154,9 @@ spec:
142154
NodeSelector to target subset of worker nodes running this service. Setting here overrides
143155
any global NodeSelector settings within the Ironic CR
144156
type: object
157+
novncproxyImage:
158+
description: NoVNCProxyImage - Ironic NoVNCProxy Container Image
159+
type: string
145160
passwordSelectors:
146161
default:
147162
service: IronicPassword

api/bases/ironic.openstack.org_ironics.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,15 @@ 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: Disabled
83+
description: 'Whether to enable graphical consoles. NOTE: Setting
84+
this to Enabled is not supported.'
85+
enum:
86+
- Enabled
87+
- Disabled
88+
- ""
89+
type: string
8190
images:
8291
default: {}
8392
description: Images - Container images for all ironic services
@@ -90,6 +99,10 @@ spec:
9099
description: Conductor - Ironic Conductor Container Image (will
91100
be set to environmental default if empty)
92101
type: string
102+
graphicalConsole:
103+
description: GraphicalConsole - Ironic Graphical Console Container
104+
Image (will be set to environmental default if empty)
105+
type: string
93106
inspector:
94107
description: Inspector - Ironic Inspector Container Image (will
95108
be set to environmental default if empty)
@@ -102,6 +115,10 @@ spec:
102115
description: NeutronAgent - ML2 baremtal - Ironic Neutron Agent
103116
Image (will be set to environmental default if empty)
104117
type: string
118+
novncproxy:
119+
description: NoVNCProxy - Ironic NoVNCProxy Container Image (will
120+
be set to environmental default if empty)
121+
type: string
105122
pxe:
106123
description: Pxe- Ironic DHCP/TFTP/HTTP Container Image URL (will
107124
be set to environmental default if empty)

api/v1beta1/ironic_types.go

Lines changed: 20 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,12 @@ 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=Disabled
171+
// +kubebuilder:validation:Enum:=Enabled;Disabled;""
172+
// Whether to enable graphical consoles. NOTE: Setting this to Enabled is not supported.
173+
GraphicalConsoles string `json:"graphicalConsoles"`
164174
}
165175

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

193211
// DHCPRange to define address range for DHCP requests
@@ -320,6 +338,8 @@ func SetupDefaults() {
320338
Pxe: util.GetEnvVar("RELATED_IMAGE_IRONIC_PXE_IMAGE_URL_DEFAULT", IronicPXEContainerImage),
321339
NeutronAgent: util.GetEnvVar("RELATED_IMAGE_IRONIC_NEUTRON_AGENT_IMAGE_URL_DEFAULT", IronicNeutronAgentContainerImage),
322340
IronicPythonAgent: util.GetEnvVar("RELATED_IMAGE_IRONIC_PYTHON_AGENT_IMAGE_URL_DEFAULT", IronicPythonAgentContainerImage),
341+
NoVNCProxy: util.GetEnvVar("RELATED_IMAGE_IRONIC_NOVNC_PROXY_IMAGE_URL_DEFAULT", IronicPythonAgentContainerImage),
342+
GraphicalConsole: util.GetEnvVar("RELATED_IMAGE_IRONIC_GRAPHICAL_CONSOLE_IMAGE_URL_DEFAULT", IronicPythonAgentContainerImage),
323343
}
324344

325345
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: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,20 @@ 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=Disabled
126+
// +kubebuilder:validation:Enum:=Enabled;Disabled;""
127+
// Whether to enable graphical consoles. NOTE: Setting this to Enabled is not supported.
128+
GraphicalConsoles string `json:"graphicalConsoles"`
129+
130+
// +kubebuilder:validation:Optional
131+
// NoVNCProxyImage - Ironic NoVNCProxy Container Image
132+
NoVNCProxyImage string `json:"novncproxyImage,omitempty"`
133+
134+
// +kubebuilder:validation:Optional
135+
// ConsoleImage - Ironic Graphical Console Container Image
136+
ConsoleImage string `json:"consoleImage"`
123137
}
124138

125139
// IronicConductorStatus defines the observed state of IronicConductor

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

Lines changed: 15 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,15 @@ spec:
115118
- start
116119
type: object
117120
type: array
121+
graphicalConsoles:
122+
default: Disabled
123+
description: 'Whether to enable graphical consoles. NOTE: Setting
124+
this to Enabled is not supported.'
125+
enum:
126+
- Enabled
127+
- Disabled
128+
- ""
129+
type: string
118130
ironicPythonAgentImage:
119131
description: IronicPythonAgentImage - Image containing the ironic-python-agent
120132
kernel and ramdisk
@@ -142,6 +154,9 @@ spec:
142154
NodeSelector to target subset of worker nodes running this service. Setting here overrides
143155
any global NodeSelector settings within the Ironic CR
144156
type: object
157+
novncproxyImage:
158+
description: NoVNCProxyImage - Ironic NoVNCProxy Container Image
159+
type: string
145160
passwordSelectors:
146161
default:
147162
service: IronicPassword

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,15 @@ 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: Disabled
83+
description: 'Whether to enable graphical consoles. NOTE: Setting
84+
this to Enabled is not supported.'
85+
enum:
86+
- Enabled
87+
- Disabled
88+
- ""
89+
type: string
8190
images:
8291
default: {}
8392
description: Images - Container images for all ironic services
@@ -90,6 +99,10 @@ spec:
9099
description: Conductor - Ironic Conductor Container Image (will
91100
be set to environmental default if empty)
92101
type: string
102+
graphicalConsole:
103+
description: GraphicalConsole - Ironic Graphical Console Container
104+
Image (will be set to environmental default if empty)
105+
type: string
93106
inspector:
94107
description: Inspector - Ironic Inspector Container Image (will
95108
be set to environmental default if empty)
@@ -102,6 +115,10 @@ spec:
102115
description: NeutronAgent - ML2 baremtal - Ironic Neutron Agent
103116
Image (will be set to environmental default if empty)
104117
type: string
118+
novncproxy:
119+
description: NoVNCProxy - Ironic NoVNCProxy Container Image (will
120+
be set to environmental default if empty)
121+
type: string
105122
pxe:
106123
description: Pxe- Ironic DHCP/TFTP/HTTP Container Image URL (will
107124
be set to environmental default if empty)

0 commit comments

Comments
 (0)