From 6115dadf6ba10aab5ff899fcf55888c43c3bf111 Mon Sep 17 00:00:00 2001
From: Varac <varac@varac.net>
Date: Wed, 30 Mar 2022 22:11:12 +0200
Subject: [PATCH] Add podinfo source + helmrelease

---
 README.md                                    | 28 ++++++++++++++++++++
 basic/apps/example/podinfo-release.yaml      | 23 ++++++++++++++++
 basic/infrastructure/sources/podinfo-hr.yaml |  7 +++++
 3 files changed, 58 insertions(+)
 create mode 100644 basic/apps/example/podinfo-release.yaml
 create mode 100644 basic/infrastructure/sources/podinfo-hr.yaml

diff --git a/README.md b/README.md
index 12c381f..012bc94 100644
--- a/README.md
+++ b/README.md
@@ -6,3 +6,31 @@ The main use-case is to add additional applications which are not integrated int
 For a more advanced example repo see the [flux2-kustomize-helm-example](https://github.com/fluxcd/flux2-kustomize-helm-example) repo.
 This repo's directory structure is similar to the `flux2-kustomize-helm-example`
 one.
+
+## Basic configuration
+
+We'll start with a very basic configuration:
+
+* It uses a public git repo
+* No secrets are included
+* No forking/modifications needed, install as it is
+
+Apply it to your cluster:
+
+```sh
+basic/install.sh
+```
+
+List the resource created by this flux repo:
+
+```sh
+kubectl -n flux-system get gitrepositories
+kubectl -n flux-system get kustomizations
+kubectl -n example get helmreleases
+```
+
+Show output of the one and only app applied, [podinfo](https://github.com/stefanprodan/podinfo)
+
+```sh
+curl --resolve podinfo.local:80:CLUSTER_IPV4_ADDRESS http://podinfo.local
+```
diff --git a/basic/apps/example/podinfo-release.yaml b/basic/apps/example/podinfo-release.yaml
new file mode 100644
index 0000000..fd54d67
--- /dev/null
+++ b/basic/apps/example/podinfo-release.yaml
@@ -0,0 +1,23 @@
+apiVersion: helm.toolkit.fluxcd.io/v2beta1
+kind: HelmRelease
+metadata:
+  name: podinfo
+  namespace: example
+spec:
+  releaseName: podinfo
+  chart:
+    spec:
+      chart: podinfo
+      sourceRef:
+        kind: HelmRepository
+        name: podinfo
+        namespace: flux-system
+  interval: 5m
+  install:
+    remediation:
+      retries: 3
+  # Default values
+  # https://github.com/stefanprodan/podinfo/blob/master/charts/podinfo/values.yaml
+  values:
+    ingress:
+      enabled: true
diff --git a/basic/infrastructure/sources/podinfo-hr.yaml b/basic/infrastructure/sources/podinfo-hr.yaml
new file mode 100644
index 0000000..1f70e9a
--- /dev/null
+++ b/basic/infrastructure/sources/podinfo-hr.yaml
@@ -0,0 +1,7 @@
+apiVersion: source.toolkit.fluxcd.io/v1beta2
+kind: HelmRepository
+metadata:
+  name: podinfo
+spec:
+  interval: 5m
+  url: https://stefanprodan.github.io/podinfo
-- 
GitLab