aboutsummaryrefslogtreecommitdiffstats
path: root/kud/deployment_infra/emco/examples/02-project.yaml
blob: 98ecfdb4c35ede6ae6f6e6d8ffe0718ffb9fcd57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2020 Intel Corporation

---
#create project
version: emco/v2
resourceContext:
  anchor: projects
metadata :
   name: {{ .ProjectName }}

---
#create default logical cloud with admin permissions
version: emco/v2
resourceContext:
  anchor: projects/{{ .ProjectName }}/logical-clouds
metadata:
  name: {{ .LogicalCloud }}
spec:
  level: "0"

{{- range $index, $cluster := .Clusters }}
---
#add cluster reference to logical cloud
version: emco/v2
resourceContext:
  anchor: projects/{{ $.ProjectName }}/logical-clouds/{{ $.LogicalCloud }}/cluster-references
metadata:
  name: {{ $cluster.Name }}
spec:
  cluster-provider: {{ $.ClusterProvider }}
  cluster-name: {{ $cluster.Name }}
  loadbalancer-ip: "0.0.0.0"
{{- end }}

---
#instantiate logical cloud
version: emco/v2
resourceContext:
  anchor: projects/{{ .ProjectName }}/logical-clouds/{{ .LogicalCloud }}/instantiate