blob: 236deedd528695648685e36c073e698ef93d943b [file] [log] [blame]
Scott Baker1a2ee302018-08-27 16:16:19 -07001---
2# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16tosca_definitions_version: tosca_simple_yaml_1_0
17
18description: Make a pod using Kubernetes Synchronizer
19
20imports:
21 - custom_types/trustdomain.yaml
22 - custom_types/principal.yaml
23 - custom_types/image.yaml
24 - custom_types/site.yaml
25 - custom_types/slice.yaml
26 - custom_types/kubernetesservice.yaml
27 - custom_types/kubernetesresourceinstance.yaml
28
29topology_template:
30 node_templates:
31 service#kubernetes:
32 type: tosca.nodes.KubernetesService
33 properties:
34 name: kubernetes
35 must-exist: true
36
37 demo_resource:
38 type: tosca.nodes.KubernetesResourceInstance
39 properties:
40 name: "demo-pod"
41 resource_definition: |
42 apiVersion: v1
43 kind: Pod
44 metadata:
45 name: nginx
46 spec:
47 containers:
48 - name: nginx
49 image: nginx:1.7.9
50 ports:
51 - containerPort: 80
52 requirements:
53 - owner:
54 node: service#kubernetes
55 relationship: tosca.relationships.BelongsToOne
56