summaryrefslogtreecommitdiffstats
path: root/kud/deployment_infra/emco/examples/02-project.yaml
diff options
context:
space:
mode:
authorEric Multanen <eric.w.multanen@intel.com>2021-06-24 20:45:24 +0000
committerGerrit Code Review <gerrit@onap.org>2021-06-24 20:45:24 +0000
commitcec17f07ca594b45e9781438f0d9b9f9d60f2961 (patch)
tree86fad4b7b5b22311604b01fb585e5e35a1406ff3 /kud/deployment_infra/emco/examples/02-project.yaml
parent3c09e032b06c18426e59ec38d925e2b4ace24abc (diff)
parent741d0b2bf25ee68eab05c5a768f60515131bb852 (diff)
Merge "Refactor EMCO deploy of addons"
Diffstat (limited to 'kud/deployment_infra/emco/examples/02-project.yaml')
-rw-r--r--kud/deployment_infra/emco/examples/02-project.yaml40
1 files changed, 40 insertions, 0 deletions
diff --git a/kud/deployment_infra/emco/examples/02-project.yaml b/kud/deployment_infra/emco/examples/02-project.yaml
new file mode 100644
index 00000000..98ecfdb4
--- /dev/null
+++ b/kud/deployment_infra/emco/examples/02-project.yaml
@@ -0,0 +1,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