Whitelist k8s and OpenShift services as containerized

This is needed in order to include the containers for Kubernetes and
OpenShift in the prepare command.

Change-Id: I31494ff8524b90343e6e8c67bd08a354837ecc45
This commit is contained in:
Martin André
2018-06-07 09:13:14 +02:00
parent 79b3bd235d
commit 345c4fe549
2 changed files with 17 additions and 6 deletions

View File

@@ -90,10 +90,13 @@ def build_service_filter(environment, roles_data):
# enabled services
return enabled_services
# Use the template path to determine if it represents a
# containerized service
containerized_services_path = ['/docker/services/',
'/services/kubernetes',
'/services/openshift']
for service, env_path in environment.get('resource_registry', {}).items():
# Use the template path to determine if it represents a
# containerized service
if '/docker/services/' in env_path:
if any(p in env_path for p in containerized_services_path):
containerized_services.add(service)
return containerized_services.intersection(enabled_services)