Merge "Nova: remove requirement for NET_ADMIN capability for Nova Metadata"
This commit is contained in:
commit
7a87aded1d
17
nova/templates/bin/_fake-iptables.sh.tpl
Normal file
17
nova/templates/bin/_fake-iptables.sh.tpl
Normal 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
|
@ -47,3 +47,5 @@ data:
|
||||
{{ tuple "bin/_nova-consoleauth.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
nova-scheduler.sh: |
|
||||
{{ 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 }}
|
||||
|
@ -56,12 +56,6 @@ spec:
|
||||
memory: {{ .Values.resources.nova_api_metadata.limits.memory | quote }}
|
||||
cpu: {{ .Values.resources.nova_api_metadata.limits.cpu | quote }}
|
||||
{{- 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:
|
||||
- /tmp/nova-api-metadata.sh
|
||||
- start
|
||||
@ -81,6 +75,18 @@ spec:
|
||||
mountPath: /tmp/nova-api-metadata.sh
|
||||
subPath: nova-api-metadata.sh
|
||||
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
|
||||
mountPath: /etc/nova/nova.conf
|
||||
subPath: nova.conf
|
||||
|
Loading…
Reference in New Issue
Block a user