Adding headless service

Change-Id: Ie4ccbe0633d66468b722af872376e19141514580
This commit is contained in:
Andrey Pavlov 2017-03-10 15:20:53 +04:00
parent d90a9cb2c8
commit 50459c99aa
4 changed files with 12 additions and 2 deletions

View File

@ -14,6 +14,7 @@ Application definition template
kind: DaemonSet
ports:
- internal-port:external-port
headless: true
hostNetwork: true
hostPID: true
antiAffinity: local
@ -120,6 +121,11 @@ service
- false
- boolean
- false
* - headless
- Create headless service.
- false
- boolean
- false
* - hostPID
- Use the hosts pid namespace.
- false

View File

@ -17,4 +17,4 @@ import pbr.version
version_info = pbr.version.VersionInfo("fuel_ccp")
__version__ = version_info.version_string()
dsl_version = "0.7.0"
dsl_version = "0.8.0"

View File

@ -248,7 +248,8 @@ def _process_ports(service):
service["name"], ingress_host, source_port))
service_template = templates.serialize_service(
service["name"], ports,
headless=service.get("kind") == "StatefulSet",
headless=service.get("kind") == "StatefulSet" or service.get(
"headless", False),
annotations=service.get('annotations', {}).get('service'))
yield service_template

View File

@ -257,6 +257,9 @@ SERVICE_SCHEMA = {
"kind": {
"enum": ["Deployment", "DaemonSet", "StatefulSet"]
},
"headless": {
"type": "boolean"
},
"hostNetwork": {
"type": "boolean"
},