feat(ironic): enable locked-down bare metal graphical consoles (#4232)

Signed-off-by: Rico Lin <rlin@vexxhost.com>
Signed-off-by: Mohammed Naser <435815+mnaser@users.noreply.github.com>
Co-authored-by: Mohammed Naser <435815+mnaser@users.noreply.github.com>
Co-authored-by: Mohammed Naser <mnaser@vexxhost.com>
This commit is contained in:
authored and GitHub committed 2026-10-30 09:34:17 -04:00
1 parent 28a442e06f
commit 1c13b2ef87
27 files changed
+1855 -13

No files matched your search

@@ -0,0 +1,19 @@
#!/bin/bash
{{/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
set -ex
exec ironic-novncproxy --config-file /etc/ironic/ironic.conf
@@ -52,6 +52,8 @@ data:
{{ tuple "bin/_ironic-conductor.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
ironic-conductor-init.sh: |
{{ tuple "bin/_ironic-conductor-init.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
ironic-novncproxy.sh: |
{{ tuple "bin/_ironic-novncproxy.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- if .Values.conductor.pxe.enabled }}
{{ include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conductor.pxe.script "key" "ironic-conductor-pxe.sh") | indent 2 }}
{{ include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conductor.pxe.init_script "key" "ironic-conductor-pxe-init.sh") | indent 2 }}
@@ -208,6 +208,10 @@ limitations under the License.
{{- $_ := set .Values.conf.ironic.api "port" (tuple "baremetal" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup") -}}
{{- end -}}
{{- if and .Values.conf.ironic.vnc.enabled (empty .Values.conf.ironic.vnc.public_url) -}}
{{- $_ := tuple "baremetal_vnc_proxy" "public" "novncproxy" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | set .Values.conf.ironic.vnc "public_url" -}}
{{- end -}}
{{- if and (empty .Values.conf.logging.handler_fluent) (has "fluent" .Values.conf.logging.handlers.keys) -}}
{{- $fluentd_host := tuple "fluentd" "internal" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }}
{{- $fluentd_port := tuple "fluentd" "internal" "service" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
@@ -230,6 +234,9 @@ data:
ironic.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.ironic | b64enc }}
logging.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.logging | b64enc }}
policy.yaml: {{ toYaml .Values.conf.policy | b64enc }}
{{- if and .Values.conf.ironic.vnc.enabled (eq .Values.conf.ironic.vnc.container_provider "kubernetes") }}
ironic-console-pod.yaml: {{ tuple "etc/_ironic-console-pod.yaml.tpl" . | include "helm-toolkit.utils.template" | b64enc }}
{{- end }}
{{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conf.tftp_map_file "key" "tftp-map-file" "format" "Secret" ) | indent 2 }}
{{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conf.nginx "key" "nginx.conf" "format" "Secret" ) | indent 2 }}
{{- end }}
@@ -0,0 +1,114 @@
{{/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- define "ironicNovncproxyProbeTemplate" }}
tcpSocket:
port: {{ tuple "baremetal_vnc_proxy" "internal" "novncproxy" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
{{- end }}
{{- if and .Values.manifests.deployment_novncproxy .Values.conf.ironic.vnc.enabled }}
{{- $envAll := . }}
{{- $mounts_ironic_novncproxy := .Values.pod.mounts.ironic_novncproxy.ironic_novncproxy }}
{{- $mounts_ironic_novncproxy_init := .Values.pod.mounts.ironic_novncproxy.init_container }}
{{- $serviceAccountName := "ironic-novncproxy" }}
{{ tuple $envAll "novncproxy" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: ironic-novncproxy
annotations:
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
labels:
{{ tuple $envAll "ironic" "novncproxy" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
spec:
replicas: {{ .Values.pod.replicas.novncproxy }}
selector:
matchLabels:
{{ tuple $envAll "ironic" "novncproxy" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
template:
metadata:
labels:
{{ tuple $envAll "ironic" "novncproxy" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations:
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }}
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
{{ tuple "ironic_novncproxy" . | include "helm-toolkit.snippets.custom_pod_annotations" | indent 8 }}
spec:
{{ tuple "ironic_novncproxy" . | include "helm-toolkit.snippets.kubernetes_pod_priority_class" | indent 6 }}
{{ tuple "ironic_novncproxy" . | include "helm-toolkit.snippets.kubernetes_pod_runtime_class" | indent 6 }}
serviceAccountName: {{ $serviceAccountName }}
affinity:
{{ tuple $envAll "ironic" "novncproxy" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector:
{{ .Values.labels.novncproxy.node_selector_key }}: {{ .Values.labels.novncproxy.node_selector_value }}
{{ if $envAll.Values.pod.tolerations.ironic.enabled }}
{{ tuple $envAll "ironic" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 10 }}
{{ end }}
{{- if .Values.pod.useHostNetwork.novncproxy }}
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
{{- end }}
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.novncproxy.timeout | default "30" }}
initContainers:
{{ tuple $envAll "novncproxy" $mounts_ironic_novncproxy_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers:
- name: ironic-novncproxy
{{ tuple $envAll "ironic_novncproxy" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.novncproxy | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command:
- /tmp/ironic-novncproxy.sh
ports:
- containerPort: {{ tuple "baremetal_vnc_proxy" "internal" "novncproxy" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
{{ dict "envAll" $envAll "component" "novncproxy" "container" "default" "type" "liveness" "probeTemplate" (include "ironicNovncproxyProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
{{ dict "envAll" $envAll "component" "novncproxy" "container" "default" "type" "readiness" "probeTemplate" (include "ironicNovncproxyProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: ironic-bin
mountPath: /tmp/ironic-novncproxy.sh
subPath: ironic-novncproxy.sh
readOnly: true
- name: ironic-etc
mountPath: /etc/ironic/ironic.conf
subPath: ironic.conf
readOnly: true
{{- if .Values.conf.ironic.DEFAULT.log_config_append }}
- name: ironic-etc
mountPath: {{ .Values.conf.ironic.DEFAULT.log_config_append }}
subPath: {{ base .Values.conf.ironic.DEFAULT.log_config_append }}
readOnly: true
{{- end }}
- name: ironic-etc
mountPath: /etc/ironic/policy.yaml
subPath: policy.yaml
readOnly: true
{{ if $mounts_ironic_novncproxy.volumeMounts }}{{ toYaml $mounts_ironic_novncproxy.volumeMounts | indent 12 }}{{ end }}
volumes:
- name: pod-tmp
emptyDir: {}
- name: ironic-bin
configMap:
name: ironic-bin
defaultMode: 0555
- name: ironic-etc
secret:
secretName: ironic-etc
defaultMode: 0444
{{ if $mounts_ironic_novncproxy.volumes }}{{ toYaml $mounts_ironic_novncproxy.volumes | indent 8 }}{{ end }}
{{- end }}
@@ -0,0 +1,127 @@
{{/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- $consoleNamespace := .Values.console.namespace | default (printf "%s-ironic-vnc" .Release.Namespace) }}
apiVersion: v1
kind: Secret
metadata:
name: "ironic-console-{{ "{{ uuid }}" }}"
namespace: {{ $consoleNamespace }}
labels:
app: ironic
component: ironic-console
conductor: "{{ "{{ conductor }}" }}"
app.kubernetes.io/instance: {{ .Release.Name | quote }}
app.kubernetes.io/managed-by: ironic
stringData:
app-info: |-
{{ "{{ app_info }}" }}
---
apiVersion: v1
kind: Pod
metadata:
name: "ironic-console-{{ "{{ uuid }}" }}"
namespace: {{ $consoleNamespace }}
labels:
app: ironic
component: ironic-console
conductor: "{{ "{{ conductor }}" }}"
app.kubernetes.io/instance: {{ .Release.Name | quote }}
app.kubernetes.io/managed-by: ironic
{{- with .Values.console.pod.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
automountServiceAccountToken: false
enableServiceLinks: {{ .Values.console.pod.enableServiceLinks }}
{{- with .Values.console.pod.imagePullSecrets }}
imagePullSecrets:
{{ toYaml . | indent 4 }}
{{- end }}
nodeSelector:
{{ .Values.labels.console.node_selector_key }}: {{ .Values.labels.console.node_selector_value | quote }}
{{- with .Values.console.pod.nodeSelector }}
{{ toYaml . | indent 4 }}
{{- end }}
{{- with .Values.console.pod.affinity }}
affinity:
{{ toYaml . | indent 4 }}
{{- end }}
{{- with .Values.console.pod.tolerations }}
tolerations:
{{ toYaml . | indent 4 }}
{{- end }}
{{- with .Values.console.pod.topologySpreadConstraints }}
topologySpreadConstraints:
{{ toYaml . | indent 4 }}
{{- end }}
{{- with .Values.console.pod.priorityClassName }}
priorityClassName: {{ . | quote }}
{{- end }}
{{- with .Values.console.pod.runtimeClassName }}
runtimeClassName: {{ . | quote }}
{{- end }}
{{- with .Values.console.pod.securityContext }}
securityContext:
{{ toYaml . | indent 4 }}
{{- end }}
containers:
- name: console
image: "{{ "{{ image }}" }}"
imagePullPolicy: {{ .Values.images.pull_policy | quote }}
{{- with .Values.console.container.ports }}
ports:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.console.container.startupProbe }}
startupProbe:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.console.container.readinessProbe }}
readinessProbe:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.console.container.livenessProbe }}
livenessProbe:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.console.container.securityContext }}
securityContext:
{{ toYaml . | indent 8 }}
{{- end }}
resources:
{{ toYaml .Values.console.container.resources | indent 8 }}
{{- with .Values.console.container.volumeMounts }}
volumeMounts:
{{ toYaml . | indent 8 }}
{{- end }}
env:
- name: APP
value: "{{ "{{ app }}" }}"
- name: READ_ONLY
value: "{{ "{{ read_only }}" }}"
- name: APP_INFO
valueFrom:
secretKeyRef:
name: "ironic-console-{{ "{{ uuid }}" }}"
key: app-info
{{- with .Values.console.container.env }}
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.console.volumes }}
volumes:
{{ toYaml . | indent 4 }}
{{- end }}
@@ -0,0 +1,25 @@
{{/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if and .Values.manifests.namespace_console .Values.conf.ironic.vnc.enabled (eq .Values.conf.ironic.vnc.container_provider "kubernetes") }}
{{- $consoleNamespace := .Values.console.namespace | default (printf "%s-ironic-vnc" .Release.Namespace) }}
---
apiVersion: v1
kind: Namespace
metadata:
name: {{ $consoleNamespace }}
labels:
pod-security.kubernetes.io/enforce: restricted
pod-security.kubernetes.io/enforce-version: latest
{{- end }}
@@ -0,0 +1,56 @@
{{/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if and .Values.manifests.network_policy_console .Values.conf.ironic.vnc.enabled (eq .Values.conf.ironic.vnc.container_provider "kubernetes") }}
{{- $consoleNamespace := .Values.console.namespace | default (printf "%s-ironic-vnc" .Release.Namespace) }}
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: ironic-console-rfb
namespace: {{ $consoleNamespace }}
spec:
podSelector:
matchLabels:
app: ironic
component: ironic-console
policyTypes:
- Ingress
{{- if .Values.console.egress }}
- Egress
{{- end }}
ingress:
- from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: {{ .Release.Namespace }}
podSelector:
matchLabels:
application: ironic
component: novncproxy
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: {{ .Release.Namespace }}
podSelector:
matchLabels:
application: nova
component: novnc-proxy
ports:
- protocol: TCP
port: 5900
{{- with .Values.console.egress }}
egress:
{{ toYaml . | indent 4 }}
{{- end }}
{{- end }}
@@ -0,0 +1,30 @@
{{/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if and .Values.manifests.role_console_pods .Values.conf.ironic.vnc.enabled (eq .Values.conf.ironic.vnc.container_provider "kubernetes") }}
{{- $consoleNamespace := .Values.console.namespace | default (printf "%s-ironic-vnc" .Release.Namespace) }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: ironic-console-pods
namespace: {{ $consoleNamespace }}
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["create", "delete", "deletecollection", "get", "list", "patch"]
- apiGroups: [""]
resources: ["secrets"]
verbs: ["create", "delete", "deletecollection", "get", "list", "patch"]
{{- end }}
@@ -0,0 +1,31 @@
{{/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if and .Values.manifests.rolebinding_console_pods .Values.conf.ironic.vnc.enabled (eq .Values.conf.ironic.vnc.container_provider "kubernetes") }}
{{- $consoleNamespace := .Values.console.namespace | default (printf "%s-ironic-vnc" .Release.Namespace) }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: ironic-console-pods
namespace: {{ $consoleNamespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: ironic-console-pods
subjects:
- kind: ServiceAccount
name: ironic-conductor
namespace: {{ .Release.Namespace }}
{{- end }}
@@ -0,0 +1,34 @@
{{/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if and .Values.manifests.service_novncproxy .Values.conf.ironic.vnc.enabled }}
{{- $envAll := . }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ tuple "baremetal_vnc_proxy" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
spec:
ports:
- name: m-novncproxy
port: {{ tuple "baremetal_vnc_proxy" "internal" "novncproxy" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
{{- if .Values.network.novncproxy.node_port.enabled }}
nodePort: {{ .Values.network.novncproxy.node_port.port }}
{{- end }}
selector:
{{ tuple $envAll "ironic" "novncproxy" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{- if .Values.network.novncproxy.node_port.enabled }}
type: NodePort
{{- end }}
{{- end }}
@@ -197,6 +197,12 @@ spec:
mountPath: /etc/ironic/policy.yaml
subPath: policy.yaml
readOnly: true
{{- if and .Values.conf.ironic.vnc.enabled (eq .Values.conf.ironic.vnc.container_provider "kubernetes") }}
- name: ironic-etc
mountPath: /etc/ironic/ironic-console-pod.yaml
subPath: ironic-console-pod.yaml
readOnly: true
{{- end }}
- name: host-var-lib-ironic
mountPath: /var/lib/ironic
- name: host-run
+167
View File
@@ -27,6 +27,12 @@ labels:
conductor:
node_selector_key: openstack-control-plane
node_selector_value: enabled
novncproxy:
node_selector_key: openstack-control-plane
node_selector_value: enabled
console:
node_selector_key: openstack-control-plane
node_selector_value: enabled
job:
node_selector_key: openstack-control-plane
node_selector_value: enabled
@@ -50,6 +56,7 @@ images:
ironic_pxe: docker.io/openstackhelm/ironic:2024.1-ubuntu_jammy
ironic_pxe_init: docker.io/openstackhelm/ironic:2024.1-ubuntu_jammy
ironic_pxe_http: docker.io/nginx:1.13.3
ironic_novncproxy: docker.io/openstackhelm/ironic:2024.1-ubuntu_jammy
dep_check: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal
image_repo_sync: docker.io/docker:17.07.0
pull_policy: "IfNotPresent"
@@ -144,6 +151,16 @@ conf:
send_service_user_token: true
swift:
auth_url: null
vnc:
enabled: false
host_ip: 0.0.0.0
port: 6090
public_url: null
novnc_web: /usr/share/novnc
container_provider: kubernetes
console_image: null
kubernetes_container_template: /etc/ironic/ironic-console-pod.yaml
kubernetes_pod_timeout: 120
oslo_policy:
policy_file: /etc/ironic/policy.yaml
logging:
@@ -302,6 +319,89 @@ network:
node_port:
enabled: false
port: 30511
novncproxy:
ingress:
public: true
classes:
namespace: "nginx"
cluster: "nginx-cluster"
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
node_port:
enabled: false
port: 30690
console:
# Namespace for the console Pods and their credential Secrets. Defaults to
# the release namespace with an "-ironic-vnc" suffix. The chart creates it
# with the restricted Pod Security Standard enforced.
namespace: null
pod:
annotations: {}
enableServiceLinks: false
imagePullSecrets: []
nodeSelector: {}
affinity: {}
tolerations: []
topologySpreadConstraints: []
priorityClassName: null
runtimeClassName: null
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
container:
ports:
- name: rfb
containerPort: 5900
startupProbe:
tcpSocket:
port: rfb
periodSeconds: 2
failureThreshold: 60
readinessProbe:
tcpSocket:
port: rfb
periodSeconds: 2
failureThreshold: 3
livenessProbe: {}
securityContext:
allowPrivilegeEscalation: false
privileged: false
capabilities:
drop:
- ALL
resources:
requests:
cpu: 250m
memory: 256Mi
limits:
cpu: 500m
memory: 1024Mi
env: []
volumeMounts: []
volumes: []
# Outbound traffic allowed from console Pods by the console NetworkPolicy.
# They only need DNS and the BMC web interface, which keeps them away from
# the Kubernetes API, databases, message queues and internal APIs.
egress:
- to:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: kube-system
podSelector:
matchLabels:
k8s-app: kube-dns
ports:
- protocol: UDP
port: 53
- protocol: TCP
port: 53
- ports:
- protocol: TCP
port: 80
- protocol: TCP
port: 443
bootstrap:
image:
@@ -378,6 +478,19 @@ dependencies:
service: baremetal
- endpoint: internal
service: oslo_messaging
novncproxy:
jobs:
- ironic-db-sync
- ironic-ks-user
- ironic-ks-endpoints
- ironic-rabbit-init
services:
- endpoint: internal
service: oslo_db
- endpoint: internal
service: identity
- endpoint: internal
service: oslo_messaging
db_drop:
services:
- endpoint: internal
@@ -623,6 +736,21 @@ endpoints:
port:
api:
default: 8088
baremetal_vnc_proxy:
name: ironic
hosts:
default: ironic-novncproxy
public: ironic-novncproxy
host_fqdn_override:
default: null
path:
default: null
scheme:
default: http
port:
novncproxy:
default: 6090
public: 80
fluentd:
namespace: null
name: fluentd
@@ -658,6 +786,21 @@ pod:
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
probes:
novncproxy:
default:
liveness:
enabled: true
params:
initialDelaySeconds: 30
periodSeconds: 60
timeoutSeconds: 15
readiness:
enabled: true
params:
initialDelaySeconds: 30
periodSeconds: 60
timeoutSeconds: 15
mounts:
ironic_api:
init_container: null
@@ -678,9 +821,15 @@ pod:
ironic_db_sync:
volumeMounts:
volumes:
ironic_novncproxy:
init_container: null
ironic_novncproxy:
volumeMounts:
volumes:
replicas:
api: 1
conductor: 1
novncproxy: 1
lifecycle:
upgrades:
deployments:
@@ -692,9 +841,13 @@ pod:
disruption_budget:
api:
min_available: 0
novncproxy:
min_available: 0
termination_grace_period:
api:
timeout: 30
novncproxy:
timeout: 30
resources:
enabled: false
api:
@@ -711,6 +864,13 @@ pod:
limits:
memory: "1024Mi"
cpu: "2000m"
novncproxy:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
jobs:
bootstrap:
requests:
@@ -784,6 +944,7 @@ pod:
cpu: "2000m"
useHostNetwork:
conductor: true
novncproxy: false
useHostIPC:
conductor: true
@@ -810,6 +971,8 @@ manifests:
job_manage_cleaning_network: true
job_rabbit_init: true
pdb_api: true
namespace_console: true
network_policy_console: true
network_policy: false
secret_db: true
secret_keystone: true
@@ -818,4 +981,8 @@ manifests:
service_api: true
service_ingress_api: true
statefulset_conductor: true
deployment_novncproxy: true
service_novncproxy: true
role_console_pods: true
rolebinding_console_pods: true
...
@@ -0,0 +1,805 @@
diff --git a/ironic/templates/bin/_ironic-novncproxy.sh.tpl b/ironic/templates/bin/_ironic-novncproxy.sh.tpl
new file mode 100644
index 0000000..8030b04
--- /dev/null
+++ b/ironic/templates/bin/_ironic-novncproxy.sh.tpl
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+{{/*
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/}}
+
+set -ex
+
+exec ironic-novncproxy --config-file /etc/ironic/ironic.conf
diff --git a/ironic/templates/configmap-bin.yaml b/ironic/templates/configmap-bin.yaml
index 9666803..f6eae91 100644
--- a/ironic/templates/configmap-bin.yaml
+++ b/ironic/templates/configmap-bin.yaml
@@ -52,6 +52,8 @@ data:
{{ tuple "bin/_ironic-conductor.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
ironic-conductor-init.sh: |
{{ tuple "bin/_ironic-conductor-init.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
+ ironic-novncproxy.sh: |
+{{ tuple "bin/_ironic-novncproxy.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- if .Values.conductor.pxe.enabled }}
{{ include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conductor.pxe.script "key" "ironic-conductor-pxe.sh") | indent 2 }}
{{ include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conductor.pxe.init_script "key" "ironic-conductor-pxe-init.sh") | indent 2 }}
diff --git a/ironic/templates/configmap-etc.yaml b/ironic/templates/configmap-etc.yaml
index 8b25336..e0978fd 100644
--- a/ironic/templates/configmap-etc.yaml
+++ b/ironic/templates/configmap-etc.yaml
@@ -208,6 +208,10 @@ limitations under the License.
{{- $_ := set .Values.conf.ironic.api "port" (tuple "baremetal" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup") -}}
{{- end -}}
+{{- if and .Values.conf.ironic.vnc.enabled (empty .Values.conf.ironic.vnc.public_url) -}}
+{{- $_ := tuple "baremetal_vnc_proxy" "public" "novncproxy" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | set .Values.conf.ironic.vnc "public_url" -}}
+{{- end -}}
+
{{- if and (empty .Values.conf.logging.handler_fluent) (has "fluent" .Values.conf.logging.handlers.keys) -}}
{{- $fluentd_host := tuple "fluentd" "internal" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }}
{{- $fluentd_port := tuple "fluentd" "internal" "service" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
@@ -230,6 +234,9 @@ data:
ironic.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.ironic | b64enc }}
logging.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.logging | b64enc }}
policy.yaml: {{ toYaml .Values.conf.policy | b64enc }}
+{{- if and .Values.conf.ironic.vnc.enabled (eq .Values.conf.ironic.vnc.container_provider "kubernetes") }}
+ ironic-console-pod.yaml: {{ tuple "etc/_ironic-console-pod.yaml.tpl" . | include "helm-toolkit.utils.template" | b64enc }}
+{{- end }}
{{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conf.tftp_map_file "key" "tftp-map-file" "format" "Secret" ) | indent 2 }}
{{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conf.nginx "key" "nginx.conf" "format" "Secret" ) | indent 2 }}
{{- end }}
diff --git a/ironic/templates/deployment-novncproxy.yaml b/ironic/templates/deployment-novncproxy.yaml
new file mode 100644
index 0000000..0435cf4
--- /dev/null
+++ b/ironic/templates/deployment-novncproxy.yaml
@@ -0,0 +1,114 @@
+{{/*
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/}}
+
+{{- define "ironicNovncproxyProbeTemplate" }}
+tcpSocket:
+ port: {{ tuple "baremetal_vnc_proxy" "internal" "novncproxy" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
+{{- end }}
+
+{{- if and .Values.manifests.deployment_novncproxy .Values.conf.ironic.vnc.enabled }}
+{{- $envAll := . }}
+
+{{- $mounts_ironic_novncproxy := .Values.pod.mounts.ironic_novncproxy.ironic_novncproxy }}
+{{- $mounts_ironic_novncproxy_init := .Values.pod.mounts.ironic_novncproxy.init_container }}
+
+{{- $serviceAccountName := "ironic-novncproxy" }}
+{{ tuple $envAll "novncproxy" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: ironic-novncproxy
+ annotations:
+ {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
+ labels:
+{{ tuple $envAll "ironic" "novncproxy" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
+spec:
+ replicas: {{ .Values.pod.replicas.novncproxy }}
+ selector:
+ matchLabels:
+{{ tuple $envAll "ironic" "novncproxy" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}
+{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
+ template:
+ metadata:
+ labels:
+{{ tuple $envAll "ironic" "novncproxy" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
+ annotations:
+{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }}
+ configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
+ configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
+{{ tuple "ironic_novncproxy" . | include "helm-toolkit.snippets.custom_pod_annotations" | indent 8 }}
+ spec:
+{{ tuple "ironic_novncproxy" . | include "helm-toolkit.snippets.kubernetes_pod_priority_class" | indent 6 }}
+{{ tuple "ironic_novncproxy" . | include "helm-toolkit.snippets.kubernetes_pod_runtime_class" | indent 6 }}
+ serviceAccountName: {{ $serviceAccountName }}
+ affinity:
+{{ tuple $envAll "ironic" "novncproxy" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
+ nodeSelector:
+ {{ .Values.labels.novncproxy.node_selector_key }}: {{ .Values.labels.novncproxy.node_selector_value }}
+{{ if $envAll.Values.pod.tolerations.ironic.enabled }}
+{{ tuple $envAll "ironic" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 10 }}
+{{ end }}
+{{- if .Values.pod.useHostNetwork.novncproxy }}
+ hostNetwork: true
+ dnsPolicy: ClusterFirstWithHostNet
+{{- end }}
+ terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.novncproxy.timeout | default "30" }}
+ initContainers:
+{{ tuple $envAll "novncproxy" $mounts_ironic_novncproxy_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
+ containers:
+ - name: ironic-novncproxy
+{{ tuple $envAll "ironic_novncproxy" | include "helm-toolkit.snippets.image" | indent 10 }}
+{{ tuple $envAll $envAll.Values.pod.resources.novncproxy | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
+ command:
+ - /tmp/ironic-novncproxy.sh
+ ports:
+ - containerPort: {{ tuple "baremetal_vnc_proxy" "internal" "novncproxy" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
+{{ dict "envAll" $envAll "component" "novncproxy" "container" "default" "type" "liveness" "probeTemplate" (include "ironicNovncproxyProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
+{{ dict "envAll" $envAll "component" "novncproxy" "container" "default" "type" "readiness" "probeTemplate" (include "ironicNovncproxyProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
+ volumeMounts:
+ - name: pod-tmp
+ mountPath: /tmp
+ - name: ironic-bin
+ mountPath: /tmp/ironic-novncproxy.sh
+ subPath: ironic-novncproxy.sh
+ readOnly: true
+ - name: ironic-etc
+ mountPath: /etc/ironic/ironic.conf
+ subPath: ironic.conf
+ readOnly: true
+ {{- if .Values.conf.ironic.DEFAULT.log_config_append }}
+ - name: ironic-etc
+ mountPath: {{ .Values.conf.ironic.DEFAULT.log_config_append }}
+ subPath: {{ base .Values.conf.ironic.DEFAULT.log_config_append }}
+ readOnly: true
+ {{- end }}
+ - name: ironic-etc
+ mountPath: /etc/ironic/policy.yaml
+ subPath: policy.yaml
+ readOnly: true
+{{ if $mounts_ironic_novncproxy.volumeMounts }}{{ toYaml $mounts_ironic_novncproxy.volumeMounts | indent 12 }}{{ end }}
+ volumes:
+ - name: pod-tmp
+ emptyDir: {}
+ - name: ironic-bin
+ configMap:
+ name: ironic-bin
+ defaultMode: 0555
+ - name: ironic-etc
+ secret:
+ secretName: ironic-etc
+ defaultMode: 0444
+{{ if $mounts_ironic_novncproxy.volumes }}{{ toYaml $mounts_ironic_novncproxy.volumes | indent 8 }}{{ end }}
+{{- end }}
diff --git a/ironic/templates/etc/_ironic-console-pod.yaml.tpl b/ironic/templates/etc/_ironic-console-pod.yaml.tpl
new file mode 100644
index 0000000..26e9156
--- /dev/null
+++ b/ironic/templates/etc/_ironic-console-pod.yaml.tpl
@@ -0,0 +1,127 @@
+{{/*
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/}}
+
+{{- $consoleNamespace := .Values.console.namespace | default (printf "%s-ironic-vnc" .Release.Namespace) }}
+
+apiVersion: v1
+kind: Secret
+metadata:
+ name: "ironic-console-{{ "{{ uuid }}" }}"
+ namespace: {{ $consoleNamespace }}
+ labels:
+ app: ironic
+ component: ironic-console
+ conductor: "{{ "{{ conductor }}" }}"
+ app.kubernetes.io/instance: {{ .Release.Name | quote }}
+ app.kubernetes.io/managed-by: ironic
+stringData:
+ app-info: |-
+ {{ "{{ app_info }}" }}
+---
+apiVersion: v1
+kind: Pod
+metadata:
+ name: "ironic-console-{{ "{{ uuid }}" }}"
+ namespace: {{ $consoleNamespace }}
+ labels:
+ app: ironic
+ component: ironic-console
+ conductor: "{{ "{{ conductor }}" }}"
+ app.kubernetes.io/instance: {{ .Release.Name | quote }}
+ app.kubernetes.io/managed-by: ironic
+{{- with .Values.console.pod.annotations }}
+ annotations:
+{{ toYaml . | indent 4 }}
+{{- end }}
+spec:
+ automountServiceAccountToken: false
+ enableServiceLinks: {{ .Values.console.pod.enableServiceLinks }}
+{{- with .Values.console.pod.imagePullSecrets }}
+ imagePullSecrets:
+{{ toYaml . | indent 4 }}
+{{- end }}
+ nodeSelector:
+ {{ .Values.labels.console.node_selector_key }}: {{ .Values.labels.console.node_selector_value | quote }}
+{{- with .Values.console.pod.nodeSelector }}
+{{ toYaml . | indent 4 }}
+{{- end }}
+{{- with .Values.console.pod.affinity }}
+ affinity:
+{{ toYaml . | indent 4 }}
+{{- end }}
+{{- with .Values.console.pod.tolerations }}
+ tolerations:
+{{ toYaml . | indent 4 }}
+{{- end }}
+{{- with .Values.console.pod.topologySpreadConstraints }}
+ topologySpreadConstraints:
+{{ toYaml . | indent 4 }}
+{{- end }}
+{{- with .Values.console.pod.priorityClassName }}
+ priorityClassName: {{ . | quote }}
+{{- end }}
+{{- with .Values.console.pod.runtimeClassName }}
+ runtimeClassName: {{ . | quote }}
+{{- end }}
+{{- with .Values.console.pod.securityContext }}
+ securityContext:
+{{ toYaml . | indent 4 }}
+{{- end }}
+ containers:
+ - name: console
+ image: "{{ "{{ image }}" }}"
+ imagePullPolicy: {{ .Values.images.pull_policy | quote }}
+{{- with .Values.console.container.ports }}
+ ports:
+{{ toYaml . | indent 8 }}
+{{- end }}
+{{- with .Values.console.container.startupProbe }}
+ startupProbe:
+{{ toYaml . | indent 8 }}
+{{- end }}
+{{- with .Values.console.container.readinessProbe }}
+ readinessProbe:
+{{ toYaml . | indent 8 }}
+{{- end }}
+{{- with .Values.console.container.livenessProbe }}
+ livenessProbe:
+{{ toYaml . | indent 8 }}
+{{- end }}
+{{- with .Values.console.container.securityContext }}
+ securityContext:
+{{ toYaml . | indent 8 }}
+{{- end }}
+ resources:
+{{ toYaml .Values.console.container.resources | indent 8 }}
+{{- with .Values.console.container.volumeMounts }}
+ volumeMounts:
+{{ toYaml . | indent 8 }}
+{{- end }}
+ env:
+ - name: APP
+ value: "{{ "{{ app }}" }}"
+ - name: READ_ONLY
+ value: "{{ "{{ read_only }}" }}"
+ - name: APP_INFO
+ valueFrom:
+ secretKeyRef:
+ name: "ironic-console-{{ "{{ uuid }}" }}"
+ key: app-info
+{{- with .Values.console.container.env }}
+{{ toYaml . | indent 8 }}
+{{- end }}
+{{- with .Values.console.volumes }}
+ volumes:
+{{ toYaml . | indent 4 }}
+{{- end }}
diff --git a/ironic/templates/namespace-console.yaml b/ironic/templates/namespace-console.yaml
new file mode 100644
index 0000000..9b364ba
--- /dev/null
+++ b/ironic/templates/namespace-console.yaml
@@ -0,0 +1,25 @@
+{{/*
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/}}
+
+{{- if and .Values.manifests.namespace_console .Values.conf.ironic.vnc.enabled (eq .Values.conf.ironic.vnc.container_provider "kubernetes") }}
+{{- $consoleNamespace := .Values.console.namespace | default (printf "%s-ironic-vnc" .Release.Namespace) }}
+---
+apiVersion: v1
+kind: Namespace
+metadata:
+ name: {{ $consoleNamespace }}
+ labels:
+ pod-security.kubernetes.io/enforce: restricted
+ pod-security.kubernetes.io/enforce-version: latest
+{{- end }}
diff --git a/ironic/templates/network-policy-console.yaml b/ironic/templates/network-policy-console.yaml
new file mode 100644
index 0000000..2e81634
--- /dev/null
+++ b/ironic/templates/network-policy-console.yaml
@@ -0,0 +1,56 @@
+{{/*
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/}}
+
+{{- if and .Values.manifests.network_policy_console .Values.conf.ironic.vnc.enabled (eq .Values.conf.ironic.vnc.container_provider "kubernetes") }}
+{{- $consoleNamespace := .Values.console.namespace | default (printf "%s-ironic-vnc" .Release.Namespace) }}
+---
+apiVersion: networking.k8s.io/v1
+kind: NetworkPolicy
+metadata:
+ name: ironic-console-rfb
+ namespace: {{ $consoleNamespace }}
+spec:
+ podSelector:
+ matchLabels:
+ app: ironic
+ component: ironic-console
+ policyTypes:
+ - Ingress
+{{- if .Values.console.egress }}
+ - Egress
+{{- end }}
+ ingress:
+ - from:
+ - namespaceSelector:
+ matchLabels:
+ kubernetes.io/metadata.name: {{ .Release.Namespace }}
+ podSelector:
+ matchLabels:
+ application: ironic
+ component: novncproxy
+ - namespaceSelector:
+ matchLabels:
+ kubernetes.io/metadata.name: {{ .Release.Namespace }}
+ podSelector:
+ matchLabels:
+ application: nova
+ component: novnc-proxy
+ ports:
+ - protocol: TCP
+ port: 5900
+{{- with .Values.console.egress }}
+ egress:
+{{ toYaml . | indent 4 }}
+{{- end }}
+{{- end }}
diff --git a/ironic/templates/role-console-pods.yaml b/ironic/templates/role-console-pods.yaml
new file mode 100644
index 0000000..220576b
--- /dev/null
+++ b/ironic/templates/role-console-pods.yaml
@@ -0,0 +1,30 @@
+{{/*
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/}}
+
+{{- if and .Values.manifests.role_console_pods .Values.conf.ironic.vnc.enabled (eq .Values.conf.ironic.vnc.container_provider "kubernetes") }}
+{{- $consoleNamespace := .Values.console.namespace | default (printf "%s-ironic-vnc" .Release.Namespace) }}
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: Role
+metadata:
+ name: ironic-console-pods
+ namespace: {{ $consoleNamespace }}
+rules:
+ - apiGroups: [""]
+ resources: ["pods"]
+ verbs: ["create", "delete", "deletecollection", "get", "list", "patch"]
+ - apiGroups: [""]
+ resources: ["secrets"]
+ verbs: ["create", "delete", "deletecollection", "get", "list", "patch"]
+{{- end }}
diff --git a/ironic/templates/rolebinding-console-pods.yaml b/ironic/templates/rolebinding-console-pods.yaml
new file mode 100644
index 0000000..9c66e74
--- /dev/null
+++ b/ironic/templates/rolebinding-console-pods.yaml
@@ -0,0 +1,31 @@
+{{/*
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/}}
+
+{{- if and .Values.manifests.rolebinding_console_pods .Values.conf.ironic.vnc.enabled (eq .Values.conf.ironic.vnc.container_provider "kubernetes") }}
+{{- $consoleNamespace := .Values.console.namespace | default (printf "%s-ironic-vnc" .Release.Namespace) }}
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: RoleBinding
+metadata:
+ name: ironic-console-pods
+ namespace: {{ $consoleNamespace }}
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: Role
+ name: ironic-console-pods
+subjects:
+ - kind: ServiceAccount
+ name: ironic-conductor
+ namespace: {{ .Release.Namespace }}
+{{- end }}
diff --git a/ironic/templates/service-novncproxy.yaml b/ironic/templates/service-novncproxy.yaml
new file mode 100644
index 0000000..e657b40
--- /dev/null
+++ b/ironic/templates/service-novncproxy.yaml
@@ -0,0 +1,34 @@
+{{/*
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/}}
+
+{{- if and .Values.manifests.service_novncproxy .Values.conf.ironic.vnc.enabled }}
+{{- $envAll := . }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ tuple "baremetal_vnc_proxy" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
+spec:
+ ports:
+ - name: m-novncproxy
+ port: {{ tuple "baremetal_vnc_proxy" "internal" "novncproxy" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
+ {{- if .Values.network.novncproxy.node_port.enabled }}
+ nodePort: {{ .Values.network.novncproxy.node_port.port }}
+ {{- end }}
+ selector:
+{{ tuple $envAll "ironic" "novncproxy" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
+ {{- if .Values.network.novncproxy.node_port.enabled }}
+ type: NodePort
+ {{- end }}
+{{- end }}
diff --git a/ironic/templates/statefulset-conductor.yaml b/ironic/templates/statefulset-conductor.yaml
index 920d4af..0710f32 100644
--- a/ironic/templates/statefulset-conductor.yaml
+++ b/ironic/templates/statefulset-conductor.yaml
@@ -197,6 +197,12 @@ spec:
mountPath: /etc/ironic/policy.yaml
subPath: policy.yaml
readOnly: true
+{{- if and .Values.conf.ironic.vnc.enabled (eq .Values.conf.ironic.vnc.container_provider "kubernetes") }}
+ - name: ironic-etc
+ mountPath: /etc/ironic/ironic-console-pod.yaml
+ subPath: ironic-console-pod.yaml
+ readOnly: true
+{{- end }}
- name: host-var-lib-ironic
mountPath: /var/lib/ironic
- name: host-run
diff --git a/ironic/values.yaml b/ironic/values.yaml
index 2228bfc..7e2dfbb 100644
--- a/ironic/values.yaml
+++ b/ironic/values.yaml
@@ -27,6 +27,12 @@ labels:
conductor:
node_selector_key: openstack-control-plane
node_selector_value: enabled
+ novncproxy:
+ node_selector_key: openstack-control-plane
+ node_selector_value: enabled
+ console:
+ node_selector_key: openstack-control-plane
+ node_selector_value: enabled
job:
node_selector_key: openstack-control-plane
node_selector_value: enabled
@@ -50,6 +56,7 @@ images:
ironic_pxe: docker.io/openstackhelm/ironic:2024.1-ubuntu_jammy
ironic_pxe_init: docker.io/openstackhelm/ironic:2024.1-ubuntu_jammy
ironic_pxe_http: docker.io/nginx:1.13.3
+ ironic_novncproxy: docker.io/openstackhelm/ironic:2024.1-ubuntu_jammy
dep_check: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal
image_repo_sync: docker.io/docker:17.07.0
pull_policy: "IfNotPresent"
@@ -144,6 +151,16 @@ conf:
send_service_user_token: true
swift:
auth_url: null
+ vnc:
+ enabled: false
+ host_ip: 0.0.0.0
+ port: 6090
+ public_url: null
+ novnc_web: /usr/share/novnc
+ container_provider: kubernetes
+ console_image: null
+ kubernetes_container_template: /etc/ironic/ironic-console-pod.yaml
+ kubernetes_pod_timeout: 120
oslo_policy:
policy_file: /etc/ironic/policy.yaml
logging:
@@ -302,6 +319,89 @@ network:
node_port:
enabled: false
port: 30511
+ novncproxy:
+ ingress:
+ public: true
+ classes:
+ namespace: "nginx"
+ cluster: "nginx-cluster"
+ annotations:
+ nginx.ingress.kubernetes.io/rewrite-target: /
+ node_port:
+ enabled: false
+ port: 30690
+
+console:
+ # Namespace for the console Pods and their credential Secrets. Defaults to
+ # the release namespace with an "-ironic-vnc" suffix. The chart creates it
+ # with the restricted Pod Security Standard enforced.
+ namespace: null
+ pod:
+ annotations: {}
+ enableServiceLinks: false
+ imagePullSecrets: []
+ nodeSelector: {}
+ affinity: {}
+ tolerations: []
+ topologySpreadConstraints: []
+ priorityClassName: null
+ runtimeClassName: null
+ securityContext:
+ runAsNonRoot: true
+ seccompProfile:
+ type: RuntimeDefault
+ container:
+ ports:
+ - name: rfb
+ containerPort: 5900
+ startupProbe:
+ tcpSocket:
+ port: rfb
+ periodSeconds: 2
+ failureThreshold: 60
+ readinessProbe:
+ tcpSocket:
+ port: rfb
+ periodSeconds: 2
+ failureThreshold: 3
+ livenessProbe: {}
+ securityContext:
+ allowPrivilegeEscalation: false
+ privileged: false
+ capabilities:
+ drop:
+ - ALL
+ resources:
+ requests:
+ cpu: 250m
+ memory: 256Mi
+ limits:
+ cpu: 500m
+ memory: 1024Mi
+ env: []
+ volumeMounts: []
+ volumes: []
+ # Outbound traffic allowed from console Pods by the console NetworkPolicy.
+ # They only need DNS and the BMC web interface, which keeps them away from
+ # the Kubernetes API, databases, message queues and internal APIs.
+ egress:
+ - to:
+ - namespaceSelector:
+ matchLabels:
+ kubernetes.io/metadata.name: kube-system
+ podSelector:
+ matchLabels:
+ k8s-app: kube-dns
+ ports:
+ - protocol: UDP
+ port: 53
+ - protocol: TCP
+ port: 53
+ - ports:
+ - protocol: TCP
+ port: 80
+ - protocol: TCP
+ port: 443
bootstrap:
image:
@@ -378,6 +478,19 @@ dependencies:
service: baremetal
- endpoint: internal
service: oslo_messaging
+ novncproxy:
+ jobs:
+ - ironic-db-sync
+ - ironic-ks-user
+ - ironic-ks-endpoints
+ - ironic-rabbit-init
+ services:
+ - endpoint: internal
+ service: oslo_db
+ - endpoint: internal
+ service: identity
+ - endpoint: internal
+ service: oslo_messaging
db_drop:
services:
- endpoint: internal
@@ -623,6 +736,21 @@ endpoints:
port:
api:
default: 8088
+ baremetal_vnc_proxy:
+ name: ironic
+ hosts:
+ default: ironic-novncproxy
+ public: ironic-novncproxy
+ host_fqdn_override:
+ default: null
+ path:
+ default: null
+ scheme:
+ default: http
+ port:
+ novncproxy:
+ default: 6090
+ public: 80
fluentd:
namespace: null
name: fluentd
@@ -658,6 +786,21 @@ pod:
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
+ probes:
+ novncproxy:
+ default:
+ liveness:
+ enabled: true
+ params:
+ initialDelaySeconds: 30
+ periodSeconds: 60
+ timeoutSeconds: 15
+ readiness:
+ enabled: true
+ params:
+ initialDelaySeconds: 30
+ periodSeconds: 60
+ timeoutSeconds: 15
mounts:
ironic_api:
init_container: null
@@ -678,9 +821,15 @@ pod:
ironic_db_sync:
volumeMounts:
volumes:
+ ironic_novncproxy:
+ init_container: null
+ ironic_novncproxy:
+ volumeMounts:
+ volumes:
replicas:
api: 1
conductor: 1
+ novncproxy: 1
lifecycle:
upgrades:
deployments:
@@ -692,9 +841,13 @@ pod:
disruption_budget:
api:
min_available: 0
+ novncproxy:
+ min_available: 0
termination_grace_period:
api:
timeout: 30
+ novncproxy:
+ timeout: 30
resources:
enabled: false
api:
@@ -711,6 +864,13 @@ pod:
limits:
memory: "1024Mi"
cpu: "2000m"
+ novncproxy:
+ requests:
+ memory: "128Mi"
+ cpu: "100m"
+ limits:
+ memory: "1024Mi"
+ cpu: "2000m"
jobs:
bootstrap:
requests:
@@ -784,6 +944,7 @@ pod:
cpu: "2000m"
useHostNetwork:
conductor: true
+ novncproxy: false
useHostIPC:
conductor: true
@@ -810,6 +971,8 @@ manifests:
job_manage_cleaning_network: true
job_rabbit_init: true
pdb_api: true
+ namespace_console: true
+ network_policy_console: true
network_policy: false
secret_db: true
secret_keystone: true
@@ -818,4 +981,8 @@ manifests:
service_api: true
service_ingress_api: true
statefulset_conductor: true
+ deployment_novncproxy: true
+ service_novncproxy: true
+ role_console_pods: true
+ rolebinding_console_pods: true
...
+101
View File
@@ -0,0 +1,101 @@
##################
Graphical consoles
##################
Bare metal nodes get the same browser-based graphical console as virtual
machines. It is enabled by default whenever Ironic is deployed and works with
Dell iDRAC, HPE iLO and Supermicro BMCs through Redfish.
Graphical consoles need Ironic and Nova from the OpenStack 2026.1 release or
later.
Open a console on a bare metal instance
=======================================
Users open consoles for their bare metal instances through Nova, the same way
they do for virtual machines:
.. code-block:: console
$ openstack console url show --novnc $SERVER
Open a console on a node
========================
New nodes that use the ``redfish`` hardware type get the
``redfish-graphical`` console interface automatically. Nodes enrolled earlier
keep their existing interface, so switch them once:
.. code-block:: console
$ openstack baremetal node set $NODE --console-interface redfish-graphical
Administrators can also open a node's console directly through Ironic:
.. code-block:: console
$ openstack baremetal node console enable $NODE
$ openstack baremetal node console show $NODE
The URL points at ``ironic-novncproxy``, which is only reachable inside the
cluster. Forward it to your machine and replace the host and port in the URL
with ``localhost:6090``:
.. code-block:: console
$ kubectl -n openstack port-forward svc/ironic-novncproxy 6090
Disable the console when you are done:
.. code-block:: console
$ openstack baremetal node console disable $NODE
Security
========
Each open console runs in its own Pod in the ``openstack-ironic-vnc``
namespace, which enforces the restricted Pod Security Standard. The Pods run
on control plane nodes as a non-root user without a service account token.
Only the Ironic and Nova console proxies can connect to them, and they can
only make outbound DNS and HTTP(S) connections, so the BMC web interface must
be reachable on port 80 or 443.
Restrict web traffic to BMC networks
----------------------------------
The default egress rules allow HTTP(S) to any destination. To prevent console
Pods from reaching unrelated web services, override ``console.egress`` with
the BMC management subnets. For example, replace ``192.0.2.0/24`` below with
your BMC network:
.. code-block:: yaml
ironic_helm_values:
console:
egress:
- to:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: kube-system
podSelector:
matchLabels:
k8s-app: kube-dns
ports:
- protocol: UDP
port: 53
- protocol: TCP
port: 53
- to:
- ipBlock:
cidr: 192.0.2.0/24
ports:
- protocol: TCP
port: 80
- protocol: TCP
port: 443
This list replaces the default rules, so retain DNS access when the BMC
addresses use hostnames. For a BMC emulator running in Kubernetes, select
its namespace and Pods instead of using an IP block, and allow the port
used by those Pods.
+33
View File
@@ -0,0 +1,33 @@
##########
Bare metal
##########
Atmosphere can deploy Ironic to provision bare metal nodes. It is not part of
the default OpenStack playbook, so add its role to your own playbook:
.. code-block:: yaml
- hosts: controllers[0]
become: true
roles:
- vexxhost.atmosphere.ironic
Set the hostname for the Ironic API in your inventory:
.. code-block:: yaml
openstack_helm_endpoints_ironic_api_host: baremetal.cloud.example.com
To let users create bare metal instances through Nova, enable
``nova-compute-ironic``, which is not deployed by default:
.. code-block:: yaml
nova_helm_values:
manifests:
statefulset_compute_ironic: true
.. toctree::
:maxdepth: 2
console
+1
View File
@@ -13,6 +13,7 @@ information to ensure stable and efficient operation of the system.
.. toctree::
:maxdepth: 2
baremetal/index
ceph
database-backups
emulated-tpm
@@ -0,0 +1,8 @@
---
features:
- |
Bare metal nodes now have a browser-based graphical console, enabled by
default whenever Ironic is deployed, for Dell iDRAC, HPE iLO and Supermicro
servers. Users open consoles for their bare metal instances through Nova,
and each console runs in a locked-down Pod on the control plane that can
only reach the BMC.
@@ -0,0 +1,5 @@
---
fixes:
- |
Use an Ironic image that includes ``kubectl`` and noVNC assets, which
are required by the Kubernetes graphical console provider.
@@ -0,0 +1,6 @@
---
fixes:
- |
Ironic deployment now preserves the chart's internal VNC proxy endpoint
defaults instead of failing during endpoint generation. Public console
access continues through Nova's existing VNC proxy.
+7 -5
View File
@@ -105,13 +105,15 @@ _atmosphere_images:
ingress_nginx_controller: "{{ atmosphere_image_prefix }}registry.k8s.io/ingress-nginx/controller:v1.12.1"
ingress_nginx_default_backend: "{{ atmosphere_image_prefix }}registry.k8s.io/defaultbackend-amd64:1.5"
ingress_nginx_kube_webhook_certgen: "{{ atmosphere_image_prefix }}registry.k8s.io/ingress-nginx/kube-webhook-certgen:v1.5.2"
ironic_api: "{{ atmosphere_image_prefix }}ghcr.io/vexxhost/ironic:main@sha256:93c330531baccb799562b6a61d5398203ef050fd0f8262b534df5a63242ef269"
ironic_conductor: "{{ atmosphere_image_prefix }}ghcr.io/vexxhost/ironic:main@sha256:93c330531baccb799562b6a61d5398203ef050fd0f8262b534df5a63242ef269"
ironic_db_sync: "{{ atmosphere_image_prefix }}ghcr.io/vexxhost/ironic:main@sha256:93c330531baccb799562b6a61d5398203ef050fd0f8262b534df5a63242ef269"
ironic_api: "{{ atmosphere_image_prefix }}ghcr.io/vexxhost/ironic:main@sha256:2df17f1ad4c9fab5ca05da0fd992032ac468e660b1fc467be894d1074d4a154b"
ironic_conductor: "{{ atmosphere_image_prefix }}ghcr.io/vexxhost/ironic:main@sha256:2df17f1ad4c9fab5ca05da0fd992032ac468e660b1fc467be894d1074d4a154b"
ironic_console: "{{ atmosphere_image_prefix }}ghcr.io/vexxhost/ironic-console:latest@sha256:95650c4f2553b75a2eac93cca79d80de1f04bfa1e25e0046b95e569527cbda1d"
ironic_db_sync: "{{ atmosphere_image_prefix }}ghcr.io/vexxhost/ironic:main@sha256:2df17f1ad4c9fab5ca05da0fd992032ac468e660b1fc467be894d1074d4a154b"
ironic_manage_cleaning_network: "{{ atmosphere_image_prefix }}ghcr.io/vexxhost/heat:main@sha256:68f571a345c8b9dfb194fc50fbafb84335d5231eaa4420b1826fb3eef3c915cd"
ironic_pxe_http: "{{ atmosphere_image_prefix }}docker.io/library/nginx:1.25"
ironic_pxe_init: "{{ atmosphere_image_prefix }}ghcr.io/vexxhost/ironic:main@sha256:93c330531baccb799562b6a61d5398203ef050fd0f8262b534df5a63242ef269"
ironic_pxe: "{{ atmosphere_image_prefix }}ghcr.io/vexxhost/ironic:main@sha256:93c330531baccb799562b6a61d5398203ef050fd0f8262b534df5a63242ef269"
ironic_pxe_init: "{{ atmosphere_image_prefix }}ghcr.io/vexxhost/ironic:main@sha256:2df17f1ad4c9fab5ca05da0fd992032ac468e660b1fc467be894d1074d4a154b"
ironic_pxe: "{{ atmosphere_image_prefix }}ghcr.io/vexxhost/ironic:main@sha256:2df17f1ad4c9fab5ca05da0fd992032ac468e660b1fc467be894d1074d4a154b"
ironic_novncproxy: "{{ atmosphere_image_prefix }}ghcr.io/vexxhost/ironic:main@sha256:2df17f1ad4c9fab5ca05da0fd992032ac468e660b1fc467be894d1074d4a154b"
ironic_retrive_cleaning_network: "{{ atmosphere_image_prefix }}ghcr.io/vexxhost/heat:main@sha256:68f571a345c8b9dfb194fc50fbafb84335d5231eaa4420b1826fb3eef3c915cd"
ironic_retrive_swift_config: "{{ atmosphere_image_prefix }}ghcr.io/vexxhost/heat:main@sha256:68f571a345c8b9dfb194fc50fbafb84335d5231eaa4420b1826fb3eef3c915cd"
keepalived: "{{ atmosphere_image_prefix }}ghcr.io/vexxhost/keepalived:latest@sha256:74b5d510c9efcc4e073b3b8a1c46727571565e739fe5f7f710095072258912f1"
@@ -0,0 +1,202 @@
suite: baremetal console
tests:
- it: should not deploy baremetal console by default
templates:
- templates/configmap-etc.yaml
- templates/deployment-novncproxy.yaml
- templates/service-novncproxy.yaml
- templates/role-console-pods.yaml
- templates/rolebinding-console-pods.yaml
- templates/network-policy-console.yaml
asserts:
- template: templates/configmap-etc.yaml
documentIndex: 0
notExists:
path: data["ironic-console-pod.yaml"]
- template: templates/deployment-novncproxy.yaml
hasDocuments:
count: 0
- template: templates/service-novncproxy.yaml
hasDocuments:
count: 0
- template: templates/role-console-pods.yaml
hasDocuments:
count: 0
- template: templates/rolebinding-console-pods.yaml
hasDocuments:
count: 0
- template: templates/network-policy-console.yaml
hasDocuments:
count: 0
- it: should deploy baremetal console proxy and dynamic Pod RBAC
release:
namespace: test-console
templates:
- templates/configmap-etc.yaml
- templates/deployment-novncproxy.yaml
- templates/service-novncproxy.yaml
- templates/role-console-pods.yaml
- templates/rolebinding-console-pods.yaml
- templates/network-policy-console.yaml
- templates/statefulset-conductor.yaml
set:
console:
namespace: test-console-runtime
conf:
ironic:
vnc:
enabled: true
public_url: http://ironic-novncproxy.test-console.svc:6090/vnc_lite.html
console_image: example.com/ironic-console:latest
asserts:
- template: templates/deployment-novncproxy.yaml
documentIndex: 3
equal:
path: metadata.name
value: ironic-novncproxy
- template: templates/deployment-novncproxy.yaml
documentIndex: 3
equal:
path: spec.selector.matchLabels.component
value: novncproxy
- template: templates/deployment-novncproxy.yaml
documentIndex: 3
lengthEqual:
path: spec.template.spec.initContainers
count: 1
- template: templates/deployment-novncproxy.yaml
documentIndex: 3
equal:
path: spec.template.spec.containers[0].ports[0].containerPort
value: 6090
- template: templates/deployment-novncproxy.yaml
documentIndex: 3
equal:
path: spec.template.spec.containers[0].volumeMounts[2].mountPath
value: /etc/ironic/ironic.conf
- template: templates/configmap-etc.yaml
documentIndex: 0
isNotEmpty:
path: data["ironic-console-pod.yaml"]
- template: templates/statefulset-conductor.yaml
documentIndex: 3
equal:
path: spec.template.spec.containers[0].volumeMounts[7].mountPath
value: /etc/ironic/ironic-console-pod.yaml
- template: templates/service-novncproxy.yaml
documentIndex: 0
equal:
path: metadata.name
value: ironic-novncproxy
- template: templates/service-novncproxy.yaml
documentIndex: 0
equal:
path: spec.selector.component
value: novncproxy
- template: templates/service-novncproxy.yaml
documentIndex: 0
equal:
path: spec.ports[0].port
value: 6090
- template: templates/role-console-pods.yaml
documentIndex: 0
equal:
path: metadata.name
value: ironic-console-pods
- template: templates/role-console-pods.yaml
documentIndex: 0
equal:
path: metadata.namespace
value: test-console-runtime
- template: templates/role-console-pods.yaml
documentIndex: 0
contains:
path: rules[0].verbs
content: deletecollection
- template: templates/role-console-pods.yaml
documentIndex: 0
contains:
path: rules[0].verbs
content: list
- template: templates/rolebinding-console-pods.yaml
documentIndex: 0
equal:
path: metadata.namespace
value: test-console-runtime
- template: templates/rolebinding-console-pods.yaml
documentIndex: 0
equal:
path: subjects[0].name
value: ironic-conductor
- template: templates/rolebinding-console-pods.yaml
documentIndex: 0
equal:
path: subjects[0].namespace
value: test-console
- template: templates/network-policy-console.yaml
documentIndex: 0
equal:
path: metadata.namespace
value: test-console-runtime
- template: templates/network-policy-console.yaml
documentIndex: 0
equal:
path: spec.ingress[0].ports[0].port
value: 5900
- template: templates/network-policy-console.yaml
documentIndex: 0
equal:
path: metadata.namespace
value: test-console-runtime
- template: templates/network-policy-console.yaml
documentIndex: 0
equal:
path: spec.ingress[0].from[0].podSelector.matchLabels.application
value: ironic
- template: templates/network-policy-console.yaml
documentIndex: 0
equal:
path: spec.ingress[0].from[0].podSelector.matchLabels.component
value: novncproxy
- template: templates/network-policy-console.yaml
documentIndex: 0
equal:
path: spec.ingress[0].from[1].podSelector.matchLabels.application
value: nova
- template: templates/network-policy-console.yaml
documentIndex: 0
equal:
path: spec.ingress[0].from[1].podSelector.matchLabels.component
value: novnc-proxy
- it: should create a restricted console namespace with egress limits
release:
namespace: openstack
templates:
- templates/namespace-console.yaml
- templates/network-policy-console.yaml
set:
conf:
ironic:
vnc:
enabled: true
asserts:
- template: templates/namespace-console.yaml
equal:
path: metadata.name
value: openstack-ironic-vnc
- template: templates/namespace-console.yaml
equal:
path: metadata.labels["pod-security.kubernetes.io/enforce"]
value: restricted
- template: templates/network-policy-console.yaml
contains:
path: spec.policyTypes
content: Egress
- template: templates/network-policy-console.yaml
contains:
path: spec.egress[1].ports
content:
protocol: TCP
port: 443
@@ -3,14 +3,26 @@ tests:
- it: should support not having a priority class
templates:
- templates/deployment-api.yaml
- templates/deployment-novncproxy.yaml
- templates/statefulset-conductor.yaml
- templates/job-db-sync.yaml
- templates/job-bootstrap.yaml
set:
conf:
ironic:
vnc:
enabled: true
asserts:
- template: templates/deployment-api.yaml
documentIndex: 3
notExists:
path: spec.template.spec.priorityClassName
- template: templates/deployment-novncproxy.yaml
documentSelector:
path: kind
value: Deployment
notExists:
path: spec.template.spec.priorityClassName
- template: templates/statefulset-conductor.yaml
documentIndex: 3
notExists:
@@ -27,13 +39,19 @@ tests:
- it: should support setting a priority class
templates:
- templates/deployment-api.yaml
- templates/deployment-novncproxy.yaml
- templates/statefulset-conductor.yaml
- templates/job-db-sync.yaml
- templates/job-bootstrap.yaml
set:
conf:
ironic:
vnc:
enabled: true
pod:
priorityClassName:
ironic_api: platform
ironic_novncproxy: platform
ironic_conductor: platform
db_sync: platform
bootstrap: platform
@@ -43,6 +61,13 @@ tests:
equal:
path: spec.template.spec.priorityClassName
value: platform
- template: templates/deployment-novncproxy.yaml
documentSelector:
path: kind
value: Deployment
equal:
path: spec.template.spec.priorityClassName
value: platform
- template: templates/statefulset-conductor.yaml
documentIndex: 3
equal:
+25
View File
@@ -3,14 +3,26 @@ tests:
- it: should support not having a runtime class
templates:
- templates/deployment-api.yaml
- templates/deployment-novncproxy.yaml
- templates/statefulset-conductor.yaml
- templates/job-db-sync.yaml
- templates/job-bootstrap.yaml
set:
conf:
ironic:
vnc:
enabled: true
asserts:
- template: templates/deployment-api.yaml
documentIndex: 3
notExists:
path: spec.template.spec.runtimeClassName
- template: templates/deployment-novncproxy.yaml
documentSelector:
path: kind
value: Deployment
notExists:
path: spec.template.spec.runtimeClassName
- template: templates/statefulset-conductor.yaml
documentIndex: 3
notExists:
@@ -27,13 +39,19 @@ tests:
- it: should support setting a runtime class
templates:
- templates/deployment-api.yaml
- templates/deployment-novncproxy.yaml
- templates/statefulset-conductor.yaml
- templates/job-db-sync.yaml
- templates/job-bootstrap.yaml
set:
conf:
ironic:
vnc:
enabled: true
pod:
runtimeClassName:
ironic_api: kata-clh
ironic_novncproxy: kata-clh
ironic_conductor: kata-clh
db_sync: kata-clh
bootstrap: kata-clh
@@ -43,6 +61,13 @@ tests:
equal:
path: spec.template.spec.runtimeClassName
value: kata-clh
- template: templates/deployment-novncproxy.yaml
documentSelector:
path: kind
value: Deployment
equal:
path: spec.template.spec.runtimeClassName
value: kata-clh
- template: templates/statefulset-conductor.yaml
documentIndex: 3
equal:
+5
View File
@@ -45,6 +45,7 @@ _ironic_helm_values:
ironic:
DEFAULT:
log_config_append: null
enabled_console_interfaces: redfish-graphical,no-console
enabled_network_interfaces: flat,neutron
default_network_interface: flat
rbac_service_role_elevated_access: true
@@ -69,6 +70,10 @@ _ironic_helm_values:
kernel_append_params: "ipa-insecure=true systemd.journald.forward_to_console=yes"
service_catalog:
valid_interfaces: public
vnc:
enabled: true
public_url: "http://ironic-novncproxy.{{ ironic_helm_release_namespace }}.svc:6090/vnc_lite.html"
console_image: "{{ atmosphere_images['ironic_console'] }}"
rabbitmq:
policies:
- vhost: "ironic"
+10 -8
View File
@@ -38,10 +38,11 @@ func TestHelmValues(t *testing.T) {
// for the actual template. Like:
// {{ tuple "heat_api" . | include "helm-toolkit.snippets.kubernetes_pod_priority_class" }}
vars.HelmValues.Pod.PriorityClass = map[string]string{
"bootstrap": "high-priority",
"db_sync": "high-priority",
"ironic_api": "high-priority",
"ironic_conductor": "high-priority",
"bootstrap": "high-priority",
"db_sync": "high-priority",
"ironic_api": "high-priority",
"ironic_conductor": "high-priority",
"ironic_novncproxy": "high-priority",
}
// (rlin): Before you add any new runtime class here.
// Make sure we do use snippets tool
@@ -49,10 +50,11 @@ func TestHelmValues(t *testing.T) {
// for the actual template. Like:
// {{ tuple "heat_api" . | include "helm-toolkit.snippets.kubernetes_pod_runtime_class" }}
vars.HelmValues.Pod.RuntimeClass = map[string]string{
"bootstrap": "kata-clh",
"db_sync": "kata-clh",
"ironic_api": "kata-clh",
"ironic_conductor": "kata-clh",
"bootstrap": "kata-clh",
"db_sync": "kata-clh",
"ironic_api": "kata-clh",
"ironic_conductor": "kata-clh",
"ironic_novncproxy": "kata-clh",
}
vals, err := openstack_helm.CoalescedHelmValues("../../charts/ironic", &vars.HelmValues)
require.NoError(t, err)
+2
View File
@@ -120,6 +120,8 @@ _nova_helm_values:
nova_ironic:
DEFAULT:
force_config_drive: true
ironic:
vnc_console_state_timeout: 120
nova_api_uwsgi:
uwsgi:
chunked-input-limit: "4096000"
@@ -13,6 +13,8 @@
# under the License.
_openstack_helm_endpoints_ignore:
# The Ironic noVNC proxy is an internal service using chart defaults.
- baremetal_vnc_proxy
- ceph_mon
- ceph_object_store
- cloudwatch