Skip to content

Commit

Permalink
manifests: allow primary nic to be customized
Browse files Browse the repository at this point in the history
Don't hardcode eth1 in the manifests, allow it to be
substituted into the manifests.

Signed-off-by: Daniel P. Berrange <[email protected]>
  • Loading branch information
berrange committed Jul 13, 2017
1 parent 983679b commit 72e8411
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions hack/build-manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ rm -f "manifests/*.yaml"
# Render kubernetes manifests
for arg in $args; do
sed -e "s/{{ master_ip }}/$master_ip/g" \
-e "s/{{ primary_nic }}/$primary_nic/g" \
-e "s/{{ docker_tag }}/$docker_tag/g" \
-e "s/{{ docker_prefix }}/$docker_prefix/g" \
$arg > ${arg%%.in}
Expand Down
1 change: 1 addition & 0 deletions hack/config-default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ manifest_templates="`ls manifests/*.in`"
master_ip=192.168.200.2
master_port=8184
network_provider=weave
primary_nic=${primary_nic:-eth1}
4 changes: 2 additions & 2 deletions hack/config.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
unset binaries docker_images docker_prefix docker_tag manifest_templates \
master_ip master_port network_provider
master_ip master_port network_provider primary_nic

source hack/config-default.sh

Expand All @@ -8,4 +8,4 @@ source hack/config-default.sh
test -f "hack/config-local.sh" && source hack/config-local.sh

export binaries docker_images docker_prefix docker_tag manifest_templates \
master_ip master_port network_provider
master_ip master_port network_provider primary_nic
2 changes: 1 addition & 1 deletion manifests/libvirt.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
runAsUser: 0
env:
- name: LIBVIRTD_DEFAULT_NETWORK_DEVICE
value: eth1
value: {{ primary_nic }}
volumeMounts:
- mountPath: /host-dev
name: host-dev
Expand Down
2 changes: 1 addition & 1 deletion manifests/virt-manifest.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ spec:
runAsUser: 0
env:
- name: LIBVIRTD_DEFAULT_NETWORK_DEVICE
value: eth1
value: {{ primary_nic }}
volumeMounts:
- name: libvirt-runtime
mountPath: /var/run/libvirt
Expand Down

0 comments on commit 72e8411

Please sign in to comment.