diff --git a/nova/templates/bin/_nova-vnc-proxy-init-assets.sh.tpl b/nova/templates/bin/_nova-vnc-proxy-init-assets.sh.tpl new file mode 100644 index 0000000000..5633c9360e --- /dev/null +++ b/nova/templates/bin/_nova-vnc-proxy-init-assets.sh.tpl @@ -0,0 +1,21 @@ +#!/bin/bash + +{{/* +Copyright 2017 The Openstack-Helm Authors. + +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 + +cp -vaR /usr/share/novnc/* /tmp/usr/share/novnc/ diff --git a/nova/templates/configmap-bin.yaml b/nova/templates/configmap-bin.yaml index 0a30bfb440..8bb5a1a074 100644 --- a/nova/templates/configmap-bin.yaml +++ b/nova/templates/configmap-bin.yaml @@ -62,6 +62,8 @@ data: {{ tuple "bin/_nova-novncproxy.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} nova-vnc-compute-init.sh: | {{ tuple "bin/_nova-vnc-compute-init.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} + nova-vnc-proxy-init-assets.sh: | +{{ tuple "bin/_nova-vnc-proxy-init-assets.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} nova-vnc-proxy-init.sh: | {{ tuple "bin/_nova-vnc-proxy-init.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} {{- end }} diff --git a/nova/templates/deployment-novncproxy.yaml b/nova/templates/deployment-novncproxy.yaml index de659d9e63..e5cf9a2e31 100644 --- a/nova/templates/deployment-novncproxy.yaml +++ b/nova/templates/deployment-novncproxy.yaml @@ -61,6 +61,19 @@ spec: readOnly: true - name: pod-shared mountPath: /tmp/pod-shared + - name: nova-novncproxy-init-assets + image: {{ .Values.images.novncproxy_assets }} + imagePullPolicy: {{ .Values.images.pull_policy }} +{{ tuple $envAll $envAll.Values.pod.resources.novncproxy | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} + command: + - /tmp/nova-vnc-proxy-init-assets.sh + volumeMounts: + - name: nova-bin + mountPath: /tmp/nova-vnc-proxy-init-assets.sh + subPath: nova-vnc-proxy-init-assets.sh + readOnly: true + - name: pod-usr-share-novnc + mountPath: /tmp/usr/share/novnc containers: - name: nova-novncproxy image: {{ .Values.images.novncproxy }} @@ -77,6 +90,9 @@ spec: mountPath: /etc/nova/nova.conf subPath: nova.conf readOnly: true + - name: pod-usr-share-novnc + mountPath: /usr/share/novnc + readOnly: true - name: pod-shared mountPath: /tmp/pod-shared {{- if $mounts_nova_novncproxy.volumeMounts }}{{ toYaml $mounts_nova_novncproxy.volumeMounts | indent 12 }}{{ end }} @@ -89,6 +105,8 @@ spec: configMap: name: nova-etc defaultMode: 0444 + - name: pod-usr-share-novnc + emptyDir: {} - name: pod-shared emptyDir: {} {{- if $mounts_nova_novncproxy.volumes }}{{ toYaml $mounts_nova_novncproxy.volumes | indent 8 }}{{ end }} diff --git a/nova/values.yaml b/nova/values.yaml index 032b07c8c3..aa44bb76aa 100644 --- a/nova/values.yaml +++ b/nova/values.yaml @@ -60,6 +60,7 @@ images: conductor: docker.io/kolla/ubuntu-source-nova-conductor:3.0.3 scheduler: docker.io/kolla/ubuntu-source-nova-scheduler:3.0.3 novncproxy: docker.io/kolla/ubuntu-source-nova-novncproxy:3.0.3 + novncproxy_assets: docker.io/kolla/ubuntu-source-nova-novncproxy:3.0.3 consoleauth: docker.io/kolla/ubuntu-source-nova-consoleauth:3.0.3 compute: docker.io/kolla/ubuntu-source-nova-compute:3.0.3 libvirt: docker.io/kolla/ubuntu-source-nova-libvirt:3.0.3