Merge "Nova: remove requirement for NET_ADMIN capability for Nova Metadata"

This commit is contained in:
Jenkins 2017-06-12 17:05:36 +00:00 committed by Gerrit Code Review
commit 7a87aded1d
3 changed files with 31 additions and 6 deletions

View File

@ -0,0 +1,17 @@
#!/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.
exit 0

View File

@ -47,3 +47,5 @@ data:
{{ tuple "bin/_nova-consoleauth.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} {{ tuple "bin/_nova-consoleauth.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
nova-scheduler.sh: | nova-scheduler.sh: |
{{ tuple "bin/_nova-scheduler.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} {{ tuple "bin/_nova-scheduler.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
fake-iptables.sh: |
{{ tuple "bin/_fake-iptables.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}

View File

@ -56,12 +56,6 @@ spec:
memory: {{ .Values.resources.nova_api_metadata.limits.memory | quote }} memory: {{ .Values.resources.nova_api_metadata.limits.memory | quote }}
cpu: {{ .Values.resources.nova_api_metadata.limits.cpu | quote }} cpu: {{ .Values.resources.nova_api_metadata.limits.cpu | quote }}
{{- end }} {{- end }}
# NOTE(portdirect): NET_ADMIN is needed as the api-metadata service
# expects to run some iptables commands, even when neutron is used.
securityContext:
capabilities:
add:
- NET_ADMIN
command: command:
- /tmp/nova-api-metadata.sh - /tmp/nova-api-metadata.sh
- start - start
@ -81,6 +75,18 @@ spec:
mountPath: /tmp/nova-api-metadata.sh mountPath: /tmp/nova-api-metadata.sh
subPath: nova-api-metadata.sh subPath: nova-api-metadata.sh
readOnly: true readOnly: true
- name: nova-bin
mountPath: /sbin/iptables
subPath: fake-iptables.sh
readOnly: true
- name: nova-bin
mountPath: /sbin/iptables-restore
subPath: fake-iptables.sh
readOnly: true
- name: nova-bin
mountPath: /sbin/iptables-save
subPath: fake-iptables.sh
readOnly: true
- name: nova-etc - name: nova-etc
mountPath: /etc/nova/nova.conf mountPath: /etc/nova/nova.conf
subPath: nova.conf subPath: nova.conf