Skip to content

Commit

Permalink
Make installation into target cluster optional via .Values.installApps
Browse files Browse the repository at this point in the history
  • Loading branch information
wahabmk committed Aug 26, 2024
1 parent 9311595 commit 8206e8c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion templates/aws-standalone-cp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion templates/aws-standalone-cp/templates/apps/cert-manager.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.installApps }}
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
Expand All @@ -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
Expand All @@ -38,3 +39,4 @@ spec:
storageNamespace: cert-manager
values:
installCRDs: true
{{- end }}
2 changes: 2 additions & 0 deletions templates/aws-standalone-cp/templates/apps/nginx-ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.installApps }}
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: OCIRepository
metadata:
Expand Down Expand Up @@ -32,3 +33,4 @@ spec:
retries: -1
values:
fullnameOverride: nginx-ingress
{{- end }}
4 changes: 4 additions & 0 deletions templates/aws-standalone-cp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,7 @@ worker:
# K0s parameters
k0s:
version: v1.30.2+k0s.0

# Optionally install apps defined under
# templates/apps into target cluster
installApps: false

0 comments on commit 8206e8c

Please sign in to comment.