Skip to content

Commit

Permalink
Add fleet addon config with auto-import label setting
Browse files Browse the repository at this point in the history
Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>
  • Loading branch information
Danil-Grigorev committed Jul 22, 2024
1 parent 0d54e6f commit f617eea
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions charts/rancher-turtles/templates/addon-provider-fleet.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if index .Values "rancherTurtles" "features" "addon-provider-fleet" "enabled" }}
---
apiVersion: turtles-capi.cattle.io/v1alpha1
kind: CAPIProvider
metadata:
Expand All @@ -9,4 +10,33 @@ metadata:
"helm.sh/hook-weight": "2"
spec:
type: addon
additionalManifests:
name: fleet-addon-config
namespace: '{{ .Values.rancherTurtles.namespace }}'
---
apiVersion: v1
kind: ConfigMap
metadata:
name: fleet-addon-config
namespace: '{{ .Values.rancherTurtles.namespace }}'
annotations:
"helm.sh/hook": "post-install, post-upgrade"
"helm.sh/hook-weight": "2"
data:
manifests: |-
apiVersion: addons.cluster.x-k8s.io/v1alpha1
kind: FleetAddonConfig
metadata:
name: fleet-addon-config
spec:
clusterClass:
patchResource: true
cluster:
patchResource: true
selector:
matchLabels:
cluster-api.cattle.io/rancher-auto-import: "true"
namespaceSelector:
matchLabels:
cluster-api.cattle.io/rancher-auto-import: "true"
{{- end }}

0 comments on commit f617eea

Please sign in to comment.