Skip to content

Commit fe78532

Browse files
committed
Combine hosted argo sites with acm into a managedClusters chart
1 parent 9e26a9b commit fe78532

21 files changed

+1969
-559
lines changed

Changes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Changes
22

33
## October 3, 2022
4+
* Support both .Values.global.managedClusterGroups and the old .Values.clusterGroup.managedClusterGroups
45
* Restore the ability to install a non-default site: `make TARGET_SITE=mysite install`
56
* Revised tests (new output and filenames, requires adding new result files to git)
67
* ACM 2.6 required for ACM-based managed sites

acm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
managedClusters

acm/templates/multiclusterhub.yaml

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{{- $haveACM := false }}
2+
{{- range coalesce .Values.global.managedClusterGroups .Values.clusterGroup.managedClusterGroups }}
3+
{{- if not .hostedArgoSites }}
4+
{{- $haveACM = true }}
5+
{{- end }}
6+
{{- end }}
7+
{{- if $haveACM }}
8+
apiVersion: operator.open-cluster-management.io/v1
9+
kind: MultiClusterHub
10+
metadata:
11+
name: multiclusterhub
12+
namespace: open-cluster-management
13+
annotations:
14+
argocd.argoproj.io/sync-wave: "-1"
15+
spec: {}
16+
{{- end }}

acm/templates/policies/application-policies.yaml renamed to managedClusters/templates/acm/policies/application-policies.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# TODO: Also create a GitOpsCluster.apps.open-cluster-management.io
2-
{{- range .Values.clusterGroup.managedClusterGroups }}
2+
{{- range coalesce .Values.global.managedClusterGroups .Values.clusterGroup.managedClusterGroups }}
33
{{- $group := . }}
44
{{- if not .hostedArgoSites }}
55
apiVersion: policy.open-cluster-management.io/v1

acm/templates/policies/ocp-gitops-policy.yaml renamed to managedClusters/templates/acm/policies/ocp-gitops-policy.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
{{- $haveACM := false }}
2+
{{- range coalesce .Values.global.managedClusterGroups .Values.clusterGroup.managedClusterGroups }}
3+
{{- if not .hostedArgoSites }}
4+
{{- $haveACM = true }}
5+
{{- end }}
6+
{{- end }}
7+
{{- if $haveACM }}
18
apiVersion: policy.open-cluster-management.io/v1
29
kind: Policy
310
metadata:
@@ -74,3 +81,4 @@ spec:
7481
operator: In
7582
values:
7683
- OpenShift
84+
{{- end }}
File renamed without changes.

acm/templates/provision/clusterpool.yaml renamed to managedClusters/templates/acm/provision/clusterpool.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- range .Values.clusterGroup.managedClusterGroups }}
1+
{{- range coalesce .Values.global.managedClusterGroups .Values.clusterGroup.managedClusterGroups }}
22
{{- $group := . }}
33
{{- if .clusterPools }}{{- /* We only create ManagedClusterSets if there are clusterPools defined */}}
44
apiVersion: cluster.open-cluster-management.io/v1beta1
@@ -84,4 +84,4 @@ spec:
8484
{{- end }}{{- /* range .range clusters */}}
8585
{{- end }}{{- /* range .clusterPools */}}
8686
{{- end }}{{- /* if .clusterPools) */}}
87-
{{- end }}{{- /* range .Values.clusterGroup.managedClusterGroups */}}
87+
{{- end }}{{- /* range coalesce .Values.global.managedClusterGroups .Values.clusterGroup.managedClusterGroups */}}

0 commit comments

Comments
 (0)