summaryrefslogtreecommitdiffstats
path: root/kud/deployment_infra/emco/examples/01-cluster.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'kud/deployment_infra/emco/examples/01-cluster.yaml')
-rw-r--r--kud/deployment_infra/emco/examples/01-cluster.yaml29
1 files changed, 29 insertions, 0 deletions
diff --git a/kud/deployment_infra/emco/examples/01-cluster.yaml b/kud/deployment_infra/emco/examples/01-cluster.yaml
new file mode 100644
index 00000000..6f7ce4ba
--- /dev/null
+++ b/kud/deployment_infra/emco/examples/01-cluster.yaml
@@ -0,0 +1,29 @@
+# SPDX-License-Identifier: Apache-2.0
+# Copyright (c) 2020 Intel Corporation
+
+---
+#creating cluster provider
+version: emco/v2
+resourceContext:
+ anchor: cluster-providers
+metadata :
+ name: {{ .ClusterProvider }}
+
+{{- range $index, $cluster := .Clusters }}
+---
+#creating cluster
+version: emco/v2
+resourceContext:
+ anchor: cluster-providers/{{ $.ClusterProvider }}/clusters
+metadata :
+ name: {{ $cluster.Name }}
+file:
+ {{ $cluster.KubeConfig }}
+
+---
+#Add label cluster
+version: emco/v2
+resourceContext:
+ anchor: cluster-providers/{{ $.ClusterProvider }}/clusters/{{ $cluster.Name }}/labels
+label-name: {{ $.ClustersLabel }}
+{{- end }} \ No newline at end of file