Libvirt: add dynamic deps on neutron agents as option.

This PS adds the ability for the Libvirt chart to depend on
neutron agents being up if desired.

Change-Id: I7cd2dca4416d1852261591a0064381ae2b087b9a
Depends-On: Idcade7eebed317852b70392431ed02a352241c9b
Signed-off-by: Pete Birley <pete@port.direct>
This commit is contained in:
Pete Birley 2018-04-26 11:52:39 -05:00
parent 5cfa1501a2
commit dd006e9569
7 changed files with 45 additions and 23 deletions

View File

@ -16,12 +16,14 @@ limitations under the License.
{{- if .Values.manifests.daemonset_libvirt }} {{- if .Values.manifests.daemonset_libvirt }}
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencyOpts := dict "envAll" $envAll "dependencyMixinParam" $envAll.Values.network.backend "dependencyKey" "libvirt" -}}
{{- $_ := include "helm-toolkit.utils.dependency_resolver" $dependencyOpts | toString | fromYaml }}
{{- $mounts_libvirt := .Values.pod.mounts.libvirt.libvirt }} {{- $mounts_libvirt := .Values.pod.mounts.libvirt.libvirt }}
{{- $mounts_libvirt_init := .Values.pod.mounts.libvirt.init_container }} {{- $mounts_libvirt_init := .Values.pod.mounts.libvirt.init_container }}
{{- $serviceAccountName := "libvirt" }} {{- $serviceAccountName := "libvirt" }}
{{ tuple $envAll "libvirt" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "pod_dependency" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
kind: DaemonSet kind: DaemonSet
@ -49,7 +51,7 @@ spec:
hostPID: true hostPID: true
dnsPolicy: ClusterFirstWithHostNet dnsPolicy: ClusterFirstWithHostNet
initContainers: initContainers:
{{ tuple $envAll "libvirt" $mounts_libvirt_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "pod_dependency" $mounts_libvirt_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
{{- if .Values.conf.ceph.enabled }} {{- if .Values.conf.ceph.enabled }}
{{- if empty .Values.conf.ceph.cinder.keyring }} {{- if empty .Values.conf.ceph.cinder.keyring }}
- name: ceph-admin-keyring-placement - name: ceph-admin-keyring-placement

View File

@ -37,6 +37,12 @@ images:
- dep_check - dep_check
- image_repo_sync - image_repo_sync
network:
# provide what type of network wiring will be used
# possible options: openvswitch, linuxbridge, sriov
backend:
- openvswitch
endpoints: endpoints:
cluster_domain_suffix: cluster.local cluster_domain_suffix: cluster.local
local_image_registry: local_image_registry:
@ -118,8 +124,31 @@ dependencies:
services: services:
- endpoint: node - endpoint: node
service: local_image_registry service: local_image_registry
targeted:
openvswitch:
libvirt:
pod:
- requireSameNode: true
labels:
application: neutron
component: neutron-ovs-agent
linuxbridge:
libvirt:
pod:
- requireSameNode: true
labels:
application: neutron
component: neutron-lb-agent
sriov:
libvirt:
pod:
- requireSameNode: true
labels:
application: neutron
component: neutron-sriov-agent
static: static:
libvirt: null libvirt:
services: null
image_repo_sync: image_repo_sync:
services: services:
- endpoint: internal - endpoint: internal

View File

@ -1465,17 +1465,6 @@ data:
- memcached - memcached
--- ---
schema: armada/ChartGroup/v1 schema: armada/ChartGroup/v1
metadata:
schema: metadata/Document/v1
name: openstack-infra-services
data:
description: "OpenStack Infra Services"
sequenced: True
chart_group:
- libvirt
- openvswitch
---
schema: armada/ChartGroup/v1
metadata: metadata:
schema: metadata/Document/v1 schema: metadata/Document/v1
name: openstack-keystone name: openstack-keystone
@ -1523,9 +1512,11 @@ metadata:
schema: metadata/Document/v1 schema: metadata/Document/v1
name: openstack-compute-kit name: openstack-compute-kit
data: data:
description: "Deploy nova and neutron" description: "Deploy nova and neutron, as well as supporting services"
sequenced: False sequenced: False
chart_group: chart_group:
- libvirt
- openvswitch
- nova-rabbitmq - nova-rabbitmq
- nova - nova
- neutron-rabbitmq - neutron-rabbitmq
@ -1574,7 +1565,6 @@ data:
- openstack-ceph-config - openstack-ceph-config
- deploy-mariadb - deploy-mariadb
- deploy-memcached - deploy-memcached
- openstack-infra-services
- openstack-keystone - openstack-keystone
- openstack-glance - openstack-glance
- openstack-radosgw - openstack-radosgw

View File

@ -30,6 +30,7 @@ make all
helm install ./libvirt \ helm install ./libvirt \
--namespace=libvirt \ --namespace=libvirt \
--name=libvirt \ --name=libvirt \
--set network.backend=null \
--set conf.ceph.enabled=false \ --set conf.ceph.enabled=false \
--set images.tags.libvirt=docker.io/openstackhelm/vbmc:centos --set images.tags.libvirt=docker.io/openstackhelm/vbmc:centos

View File

@ -25,8 +25,8 @@ helm upgrade --install libvirt ./libvirt \
${OSH_EXTRA_HELM_ARGS} \ ${OSH_EXTRA_HELM_ARGS} \
${OSH_EXTRA_HELM_ARGS_LIBVIRT} ${OSH_EXTRA_HELM_ARGS_LIBVIRT}
#NOTE: Wait for deploy #NOTE(portdirect): We dont wait for libvirt pods to come up, as they depend
./tools/deployment/common/wait-for-pods.sh openstack # on the neutron agents being up.
#NOTE: Validate Deployment info #NOTE: Validate Deployment info
helm status libvirt helm status libvirt

View File

@ -26,8 +26,8 @@ helm upgrade --install libvirt ./libvirt \
${OSH_EXTRA_HELM_ARGS} \ ${OSH_EXTRA_HELM_ARGS} \
${OSH_EXTRA_HELM_ARGS_LIBVIRT} ${OSH_EXTRA_HELM_ARGS_LIBVIRT}
#NOTE: Wait for deploy #NOTE(portdirect): We dont wait for libvirt pods to come up, as they depend
./tools/deployment/common/wait-for-pods.sh openstack # on the neutron agents being up.
#NOTE: Validate Deployment info #NOTE: Validate Deployment info
helm status libvirt helm status libvirt

View File

@ -15,14 +15,14 @@
# under the License. # under the License.
set -xe set -xe
#NOTE: Deploy command #NOTE: Deploy libvirt
helm upgrade --install libvirt ./libvirt \ helm upgrade --install libvirt ./libvirt \
--namespace=openstack \ --namespace=openstack \
${OSH_EXTRA_HELM_ARGS} \ ${OSH_EXTRA_HELM_ARGS} \
${OSH_EXTRA_HELM_ARGS_LIBVIRT} ${OSH_EXTRA_HELM_ARGS_LIBVIRT}
#NOTE: Wait for deploy #NOTE(portdirect): We dont wait for libvirt pods to come up, as they depend
./tools/deployment/common/wait-for-pods.sh openstack # on the neutron agents being up.
#NOTE: Validate Deployment info #NOTE: Validate Deployment info
helm status libvirt helm status libvirt