9742d3f34361944a68e6ba2506c566e02f947c2c
[osm/devops.git] /
1 #######################################################################################
2 # Copyright ETSI Contributors and Others.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #    http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 # implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #######################################################################################
17
18 # Creates required remote namespaces
19 apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
20 kind: Kustomization
21 metadata:
22   name: ${CLUSTER_KUSTOMIZATION_NAME}
23   namespace: managed-resources
24   labels:
25     cluster: ${CLUSTER_KUSTOMIZATION_NAME}
26 spec:
27   interval: 1m
28   timeout: 5m
29   prune: true
30   # force: true
31   sourceRef:
32     kind: GitRepository
33     name: sw-catalogs
34     namespace: flux-system
35   path: ./cloud-resources/flux-remote-bootstrap/empty-kustomization/manifests/configmap
36   patches:
37     - patch: |-
38         apiVersion: v1
39         kind: ConfigMap
40         metadata:
41           name: ${configmap_name}
42           namespace: ${configmap_namespace}
43         data:
44           kubeconfig: ${kubeconfig_secret_name}
45   # Inputs:
46   postBuild:
47     substitute:
48       configmap_name: imported-${CLUSTER_KUSTOMIZATION_NAME}
49       configmap_namespace: managed-resources
50       kubeconfig_secret_name: kubeconfig-${CLUSTER_KUSTOMIZATION_NAME}