Merge "Changing "daemonset" flag in service def to "kind" param"
This commit is contained in:
commit
6cff14568f
|
@ -11,9 +11,9 @@ Application definition template
|
|||
|
||||
service:
|
||||
name: service-name
|
||||
kind: DaemonSet
|
||||
ports:
|
||||
- internal-port:external-port
|
||||
daemonset: true
|
||||
host-net: true
|
||||
hostPID: true
|
||||
containers:
|
||||
|
@ -77,24 +77,26 @@ Parameters description
|
|||
|
||||
**service**
|
||||
|
||||
+---------------+-----------------------------------------------+----------+------------------+---------+
|
||||
+---------------+-----------------------------------------------+----------+------------------+------------+
|
||||
| Name | Description | Required | Schema | Default |
|
||||
+===============+===============================================+==========+==================+=========+
|
||||
+===============+===============================================+==========+==================+============+
|
||||
| name | Name of the service. | true | string | |
|
||||
+---------------+-----------------------------------------------+----------+------------------+---------+
|
||||
+---------------+-----------------------------------------------+----------+------------------+------------+
|
||||
| kind | Kind of k8s object to use for containers | false | one of: | Deployment |
|
||||
| | deployment | | ["Deployment", | |
|
||||
| | | | "Daemonset"] | |
|
||||
+---------------+-----------------------------------------------+----------+------------------+------------+
|
||||
| containers | List of containers under multi-container pod | true | container_ array | |
|
||||
+---------------+-----------------------------------------------+----------+------------------+---------+
|
||||
+---------------+-----------------------------------------------+----------+------------------+------------+
|
||||
| ports | k8s Service will be created if specified | false | internal-port: | |
|
||||
| | (with NodePort type for now) | | external-port | |
|
||||
| | Only internal or both internal:external ports | | array | |
|
||||
| | can be specified | | | |
|
||||
+---------------+-----------------------------------------------+----------+------------------+---------+
|
||||
| daemonset | Create DaemonSet instead of Deployment | false | boolean | false |
|
||||
+---------------+-----------------------------------------------+----------+------------------+---------+
|
||||
+---------------+-----------------------------------------------+----------+------------------+------------+
|
||||
| host-net | Use the host’s network namespace | false | boolean | false |
|
||||
+---------------+-----------------------------------------------+----------+------------------+---------+
|
||||
+---------------+-----------------------------------------------+----------+------------------+------------+
|
||||
| hostPID | Use the host’s pid namespace | false | boolean | false |
|
||||
+---------------+-----------------------------------------------+----------+------------------+---------+
|
||||
+---------------+-----------------------------------------------+----------+------------------+------------+
|
||||
|
||||
.. _container:
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ def parse_role(component, topology, configmaps):
|
|||
affinity = templates.serialize_affinity(service, topology)
|
||||
|
||||
replicas = CONF.replicas.get(service_name)
|
||||
if service.get("daemonset", False):
|
||||
if service.get("kind") == 'DaemonSet':
|
||||
if replicas is not None:
|
||||
LOG.error("Replicas was specified for %s, but it's implemented "
|
||||
"using Kubernetes DaemonSet that will deploy service on "
|
||||
|
|
|
@ -138,8 +138,8 @@ SERVICE_SCHEMA = {
|
|||
]
|
||||
}
|
||||
},
|
||||
"daemonset": {
|
||||
"type": "boolean"
|
||||
"kind": {
|
||||
"enum": ["Deployment", "DaemonSet"]
|
||||
},
|
||||
"host-net": {
|
||||
"type": "boolean"
|
||||
|
|
Loading…
Reference in New Issue