summaryrefslogtreecommitdiffstats
path: root/kud/deployment_infra/emco/examples/01-cluster.yaml
blob: 18d05f730e8fbb44882d0dc772435d1da3b5236c (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
# 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 $clusterName, $cluster := .Clusters }}
---
#creating cluster
version: emco/v2
resourceContext:
  anchor: cluster-providers/{{ $.ClusterProvider }}/clusters
metadata :
   name: {{ $clusterName }}
file:
  {{ $cluster.KubeConfig }}

---
#Add label cluster
version: emco/v2
resourceContext:
  anchor: cluster-providers/{{ $.ClusterProvider }}/clusters/{{ $clusterName }}/labels
label-name: {{ $.ClustersLabel }}
{{- end }}