Scott Baker | 3fd18e5 | 2018-04-17 09:18:21 -0700 | [diff] [blame] | 1 | --- |
| 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 | |
| 16 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 17 | |
| 18 | description: Make a pod using Kubernetes Synchronizer |
| 19 | |
| 20 | imports: |
| 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/kubernetesserviceinstance.yaml |
| 28 | |
| 29 | topology_template: |
| 30 | node_templates: |
| 31 | service#kubernetes: |
| 32 | type: tosca.nodes.KubernetesService |
| 33 | properties: |
| 34 | name: kubernetes |
| 35 | must-exist: true |
| 36 | |
| 37 | mysite: |
| 38 | type: tosca.nodes.Site |
| 39 | properties: |
| 40 | name: placeholder-sitename |
| 41 | must-exist: true |
| 42 | |
| 43 | demo_trustdomain: |
| 44 | type: tosca.nodes.TrustDomain |
| 45 | properties: |
| 46 | name: "demo-trust" |
| 47 | requirements: |
| 48 | - owner: |
| 49 | node: service#kubernetes |
| 50 | relationship: tosca.relationships.BelongsToOne |
| 51 | |
| 52 | demo_principal: |
| 53 | type: tosca.nodes.Principal |
| 54 | properties: |
| 55 | name: "demo-account" |
| 56 | requirements: |
| 57 | - trust_domain: |
| 58 | node: demo_trustdomain |
| 59 | relationship: tosca.relationships.BelongsToOne |
| 60 | |
| 61 | image_pause: |
| 62 | type: tosca.nodes.Image |
| 63 | properties: |
| 64 | name: "k8s.gcr.io/pause-amd64" |
| 65 | tag: "3.0" |
| 66 | |
| 67 | mysite_demo1: |
| 68 | type: tosca.nodes.Slice |
| 69 | properties: |
| 70 | name: "mysite_demo1" |
| 71 | requirements: |
| 72 | - site: |
| 73 | node: mysite |
| 74 | relationship: tosca.relationships.BelongsToOne |
| 75 | - trust_domain: |
| 76 | node: demo_trustdomain |
| 77 | relationship: tosca.relationships.BelongsToOne |
| 78 | - principal: |
| 79 | node: demo_principal |
| 80 | relationship: tosca.relationships.BelongsToOne |
| 81 | |
| 82 | demo_pod: |
| 83 | type: tosca.nodes.KubernetesServiceInstance |
| 84 | properties: |
| 85 | name: "demo-pod" |
| 86 | xos_managed: True |
| 87 | requirements: |
| 88 | - slice: |
| 89 | node: mysite_demo1 |
| 90 | relationship: tosca.relationships.BelongsToOne |
| 91 | - owner: |
| 92 | node: service#kubernetes |
| 93 | relationship: tosca.relationships.BelongsToOne |
| 94 | - image: |
| 95 | node: image_pause |
| 96 | relationship: tosca.relationships.BelongsToOne |