aboutsummaryrefslogtreecommitdiffstats
path: root/kud/deployment_infra/emco/examples/01-cluster.yaml
blob: 6f7ce4bae2c751b02123337159de2cd33397dbcd (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 $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 }}