diff --git a/templates/aws-standalone-cp/README.md b/templates/aws-standalone-cp/README.md index c653998ec..83a39630c 100644 --- a/templates/aws-standalone-cp/README.md +++ b/templates/aws-standalone-cp/README.md @@ -4,7 +4,7 @@ To install applications into the target cluster created using Cluster API (CAPI) **Reference:** https://fluxcd.io/flux/components/helm/helmreleases/#remote-clusters--cluster-api -This chart/template already defines the following applications under `templates/apps` to be installed into the target cluster: +This chart/template already defines the following applications under `templates/apps` which can be be installed into the target cluster by setting `.Values.installApps=true`: 1. cert-manager 2. nginx-ingress diff --git a/templates/aws-standalone-cp/templates/apps/cert-manager.yaml b/templates/aws-standalone-cp/templates/apps/cert-manager.yaml index 59e4df9c0..6fc40244b 100644 --- a/templates/aws-standalone-cp/templates/apps/cert-manager.yaml +++ b/templates/aws-standalone-cp/templates/apps/cert-manager.yaml @@ -1,3 +1,4 @@ +{{- if .Values.installApps }} apiVersion: source.toolkit.fluxcd.io/v1 kind: HelmRepository metadata: @@ -21,7 +22,7 @@ spec: hmc.mirantis.com/managed: "true" spec: chart: cert-manager - version: ">=v1.12.3" + version: "v1.12.3" sourceRef: kind: HelmRepository name: cert-manager @@ -38,3 +39,4 @@ spec: storageNamespace: cert-manager values: installCRDs: true +{{- end }} \ No newline at end of file diff --git a/templates/aws-standalone-cp/templates/apps/nginx-ingress.yaml b/templates/aws-standalone-cp/templates/apps/nginx-ingress.yaml index 0d3017c6a..f71f50d85 100644 --- a/templates/aws-standalone-cp/templates/apps/nginx-ingress.yaml +++ b/templates/aws-standalone-cp/templates/apps/nginx-ingress.yaml @@ -1,3 +1,4 @@ +{{- if .Values.installApps }} apiVersion: source.toolkit.fluxcd.io/v1beta2 kind: OCIRepository metadata: @@ -32,3 +33,4 @@ spec: retries: -1 values: fullnameOverride: nginx-ingress +{{- end }} \ No newline at end of file diff --git a/templates/aws-standalone-cp/values.yaml b/templates/aws-standalone-cp/values.yaml index 79c8e7ee1..1782a87f7 100644 --- a/templates/aws-standalone-cp/values.yaml +++ b/templates/aws-standalone-cp/values.yaml @@ -44,3 +44,7 @@ worker: # K0s parameters k0s: version: v1.30.2+k0s.0 + +# Optionally install apps defined under +# template/apps into target cluster +installApps: false \ No newline at end of file