Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions overrides/values-imported-clusters.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Auto-import existing (BYOC) clusters into ACM via the ACM chart.
# Requires matching kubeconfig secrets in values-secret (vaultPrefixes: hub;
# name must end with _cluster_kubeconfig — see values-secret.yaml.template).
# Cluster name is secretName with that suffix removed.
# clusterGroup must match a managedClusterGroups Placement label
# (e.g. group-one in variants/hub/values-hub.yaml) so policies attach.
#
# This file is included by the ACM application via extraValueFiles.
# To enable its usage, uncomment the following lines.
# acm:
# importedClusters:
# - secretName: mcg-primary_cluster_kubeconfig
# clusterGroup: group-one
# - secretName: mcg-secondary_cluster_kubeconfig
# clusterGroup: group-one
16 changes: 16 additions & 0 deletions values-secret.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,19 @@ secrets:
# fields:
# - name: content
# path: ~/.pullsecret.json

# Bring-your-own clusters: load kubeconfigs into Vault on the hub, then list
# them under acm.importedClusters in overrides/values-imported-clusters.yaml
# (wired to the ACM app via extraValueFiles in variants/hub/values-hub.yaml).
# Secret names MUST end with _cluster_kubeconfig; the ManagedCluster name is the
# remainder (e.g. mcg-primary_cluster_kubeconfig -> mcg-primary).
# The clusterGroup label must match an existing managedClusterGroups Placement
# (MCG already defines group-one).
#- name: mcg-primary_cluster_kubeconfig
# fields:
# - name: kubeconfig
# path: /path/to/primary.kubeconfig
#- name: mcg-secondary_cluster_kubeconfig
# fields:
# - name: kubeconfig
# path: /path/to/secondary.kubeconfig
13 changes: 13 additions & 0 deletions variants/hub/values-hub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,18 @@ clusterGroup:
argoProject: hub
chart: acm
chartVersion: 0.2.*
# BYOC importedClusters list lives here (not in values-hub body)
extraValueFiles:
- '/overrides/values-imported-clusters.yaml'
# ACM mutates ManagedCluster labels/spec after import (cloud/vendor discovery,
# addon feature labels, clusterset, managedClusterClientConfigs). Ignore those
# so the ACM app stays Synced while still owning clusterGroup via the chart.
ignoreDifferences:
- group: cluster.open-cluster-management.io
kind: ManagedCluster
jqPathExpressions:
- .metadata.labels | with_entries(select(.key != "clusterGroup"))
- .spec.managedClusterClientConfigs
vault:
name: vault
namespace: vault
Expand Down Expand Up @@ -123,6 +135,7 @@ clusterGroup:
# clusters:
# - Two
# - Three

# To have apps in multiple flavors, use namespaces and use helm overrides as appropriate
#
# pipelines:
Expand Down
Loading