Skip to content

Commit

Permalink
Support for custom host mount for contrail-node-init
Browse files Browse the repository at this point in the history
Init container 'contrail-node-init' currently mounts /usr/bin folder.
However, some systems such as Fedora Atomic do not allow writing on this directory.

This change provides support for setting a custom hostMount path.
This way, users can provide a different path that is writable in other systems, like Atomic.

Change-Id: If123ffa4a88fdad19356c421a4572b2751c05b51
Closes-Bug: #1781605
(cherry picked from commit be3ce16)
  • Loading branch information
Ignacio Dominguez Martinez-Casanueva authored and Andrey-mp committed Aug 2, 2018
1 parent e98d4a6 commit 35dd187
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 10 deletions.
2 changes: 1 addition & 1 deletion contrail-analytics/templates/daemonset-analytics.yaml
Expand Up @@ -177,7 +177,7 @@ spec:
path: /var/crashes
- name: host-usr-bin
hostPath:
path: /usr/bin
path: {{ .Values.volumeMounts.host_usr_bin.hostPath }}
- name: ssl-dir
hostPath:
path: /etc/contrail/ssl
Expand Down
5 changes: 5 additions & 0 deletions contrail-analytics/values.yaml
Expand Up @@ -97,6 +97,11 @@ service:
ingress:
analytics_api_host: "contrail-analytics-api"

# VolumeMounts related inputs are defined here
volumeMounts:
host_usr_bin:
hostPath: '/usr/bin'

manifests:
configmap_analytics_env: true
configmap_analytics_keystone: true
Expand Down
2 changes: 1 addition & 1 deletion contrail-controller/templates/daemonset-config.yaml
Expand Up @@ -155,7 +155,7 @@ spec:
path: /var/crashes
- name: host-usr-bin
hostPath:
path: /usr/bin
path: {{ .Values.volumeMounts.host_usr_bin.hostPath }}
- name: ssl-dir
hostPath:
path: /etc/contrail/ssl
Expand Down
2 changes: 1 addition & 1 deletion contrail-controller/templates/daemonset-control-only.yaml
Expand Up @@ -75,7 +75,7 @@ spec:
path: /var/crashes
- name: host-usr-bin
hostPath:
path: /usr/bin
path: {{ .Values.volumeMounts.host_usr_bin.hostPath }}
- name: ssl-dir
hostPath:
path: /etc/contrail/ssl
Expand Down
2 changes: 1 addition & 1 deletion contrail-controller/templates/daemonset-control.yaml
Expand Up @@ -140,7 +140,7 @@ spec:
path: /var/crashes
- name: host-usr-bin
hostPath:
path: /usr/bin
path: {{ .Values.volumeMounts.host_usr_bin.hostPath }}
- name: ssl-dir
hostPath:
path: /etc/contrail/ssl
Expand Down
2 changes: 1 addition & 1 deletion contrail-controller/templates/daemonset-webui.yaml
Expand Up @@ -103,7 +103,7 @@ spec:
path: /var/crashes/contrail/webui
- name: host-usr-bin
hostPath:
path: /usr/bin
path: {{ .Values.volumeMounts.host_usr_bin.hostPath }}
- name: ssl-dir
hostPath:
path: /etc/contrail/ssl
Expand Down
5 changes: 5 additions & 0 deletions contrail-controller/values.yaml
Expand Up @@ -208,6 +208,11 @@ ingress:
config_api_host: "contrail-config-api"
webui_host: "contrail-webui"

# VolumeMounts related inputs are defined here
volumeMounts:
host_usr_bin:
hostPath: '/usr/bin'

manifests:
configmap_controller_env: true
configmap_controller_keystone: true
Expand Down
Expand Up @@ -88,7 +88,7 @@ spec:
path: /var/crashes
- name: host-usr-bin
hostPath:
path: /usr/bin
path: {{ .Values.volumeMounts.host_usr_bin.hostPath }}
- name: ssl-dir
hostPath:
path: /etc/contrail/ssl
Expand Down
Expand Up @@ -88,7 +88,7 @@ spec:
path: /var/crashes
- name: host-usr-bin
hostPath:
path: /usr/bin
path: {{ .Values.volumeMounts.host_usr_bin.hostPath }}
- name: ssl-dir
hostPath:
path: /etc/contrail/ssl
Expand Down
5 changes: 5 additions & 0 deletions contrail-thirdparty/values.yaml
Expand Up @@ -128,6 +128,11 @@ pod:
min_ready_seconds: 0
max_unavailable: 1

# VolumeMounts related inputs are defined here
volumeMounts:
host_usr_bin:
hostPath: '/usr/bin'

manifests:
configmap_analytics_zookeeper: true
configmap_config_zookeeper: true
Expand Down
Expand Up @@ -199,7 +199,7 @@ spec:
path: /bin
- name: host-usr-bin
hostPath:
path: /usr/bin
path: {{ .Values.volumeMounts.host_usr_bin.hostPath }}
- name: host-dev
hostPath:
path: /dev
Expand Down
Expand Up @@ -185,7 +185,7 @@ spec:
path: /var/run/libvirt
- name: host-usr-bin
hostPath:
path: /usr/bin
path: {{ .Values.volumeMounts.host_usr_bin.hostPath }}
- name: host-dev-log
hostPath:
path: /dev/log
Expand Down
Expand Up @@ -255,7 +255,7 @@ spec:
path: /var/run/libvirt
- name: host-usr-bin
hostPath:
path: /usr/bin
path: {{ .Values.volumeMounts.host_usr_bin.hostPath }}
- name: host-dev-log
hostPath:
path: /dev/log
Expand Down
5 changes: 5 additions & 0 deletions contrail-vrouter/values.yaml
Expand Up @@ -119,6 +119,11 @@ pod:
min_ready_seconds: 0
max_unavailable: 1

# VolumeMounts related inputs are defined here
volumeMounts:
host_usr_bin:
hostPath: '/usr/bin'

manifests:
configmap_vrouter_kernel: true
configmap_vrouter_keystone: true
Expand Down

0 comments on commit 35dd187

Please sign in to comment.