Skip to content

Commit f018300

Browse files
committed
Update docs to Helm v3
1 parent b421b8f commit f018300

File tree

3 files changed

+77
-29
lines changed

3 files changed

+77
-29
lines changed

docs/canary/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,14 @@ fluxctl sync
4040

4141
Create a canary release for podinfo:
4242

43-
```yaml
43+
```yaml{7}
4444
apiVersion: flagger.app/v1alpha3
4545
kind: Canary
4646
metadata:
4747
name: podinfo
4848
namespace: prod
49+
annotations:
50+
fluxcd.io/ignore: "false"
4951
spec:
5052
targetRef:
5153
apiVersion: apps/v1
@@ -90,7 +92,7 @@ kubectl -n prod get canary
9092

9193
Install the load testing service to generate traffic during the canary analysis:
9294

93-
```yaml
95+
```yaml{7}
9496
apiVersion: helm.fluxcd.io/v1
9597
kind: HelmRelease
9698
metadata:

docs/helm/README.md

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The controller will run inside the Linkerd mesh.
1717

1818
Create a namespace with linkerd injection enabled:
1919

20-
```yaml
20+
```yaml{5}
2121
apiVersion: v1
2222
kind: Namespace
2323
metadata:
@@ -29,7 +29,7 @@ metadata:
2929

3030
Create a Helm release to install the NGINX ingress controller:
3131

32-
```yaml
32+
```yaml{7}
3333
apiVersion: helm.fluxcd.io/v1
3434
kind: HelmRelease
3535
metadata:
@@ -77,7 +77,7 @@ You'll be installing podinfo using a Helm chart stored in the git repository at
7777

7878
Create the `prod` namespace with linkerd injection enabled:
7979

80-
```yaml
80+
```yaml{5}
8181
apiVersion: v1
8282
kind: Namespace
8383
metadata:
@@ -87,9 +87,10 @@ metadata:
8787
name: prod
8888
```
8989

90-
Create a Helm release to install the podinfo chart (replace `GHUSER` with your GitHub username):
90+
Create a Helm release to install the podinfo chart
91+
(replace `GHUSER` with your GitHub username and `LB-PUBLIC-IP` with your ingress IP):
9192

92-
```yaml
93+
```yaml{7,11,31}
9394
apiVersion: helm.fluxcd.io/v1
9495
kind: HelmRelease
9596
metadata:
@@ -118,6 +119,15 @@ spec:
118119
proxy_set_header l5d-dst-override $service_name.$namespace.svc.cluster.local:9898;
119120
proxy_hide_header l5d-remote-ip;
120121
proxy_hide_header l5d-server-id;
122+
path: /
123+
hosts:
124+
- LB-PUBLIC-IP.nip.io
125+
```
126+
127+
Note that if you are on EKS, the host should be set to the `elb.amazonaws.com` address:
128+
129+
```sh
130+
kubectl ingress-nginx get svc | grep Ingress
121131
```
122132

123133
Apply changes:
@@ -135,7 +145,7 @@ Validate that the Helm operator has installed podinfo:
135145
kubectl -n prod get hr
136146
```
137147

138-
Open your browser and navigate to `http://<LB-IP>/`, you should see podinfo v3.0.0 UI.
148+
Open your browser and navigate to `http://LB-PUBLIC-IP.nip.io/`, you should see podinfo v3.0.0 UI.
139149

140150
![podinfo](/podinfo-3.0.0.png)
141151

@@ -157,15 +167,12 @@ metadata:
157167
fluxcd.io/tag.chart-image: semver:~3.0
158168
```
159169

160-
Commit and push the changes to GitHub:
161-
162-
```sh
163-
git add -A && git commit -m "automate podinfo" && git push origin master
164-
```
165-
166-
Sync the the changes on the cluster:
170+
Apply changes:
167171

168172
```sh
173+
git add -A && \
174+
git commit -m "automate podinfo" && \
175+
git push origin master && \
169176
fluxctl sync
170177
```
171178

@@ -181,7 +188,7 @@ Pull the changes made by Flux locally:
181188
git pull origin master
182189
```
183190

184-
Open your browser and navigate to `http://<LB-IP>/`, you should see podinfo v3.0.5 UI.
191+
Open your browser and navigate to `http://LB-PUBLIC-IP.nip.io/`, you should see podinfo v3.0.5 UI.
185192

186193
![podinfo](/podinfo-3.0.5.png)
187194

@@ -194,7 +201,7 @@ The sealed secret can be decrypted only by the controller running in your cluste
194201

195202
Create the Sealed Secrets Helm release:
196203

197-
```yaml
204+
```yaml{7}
198205
apiVersion: helm.fluxcd.io/v1
199206
kind: HelmRelease
200207
metadata:
@@ -207,7 +214,7 @@ spec:
207214
chart:
208215
repository: https://kubernetes-charts.storage.googleapis.com/
209216
name: sealed-secrets
210-
version: 1.3.4
217+
version: 1.4.0
211218
```
212219

213220
Apply changes:
@@ -241,7 +248,7 @@ kubeseal --fetch-cert \
241248
You can generate a Kubernetes secret locally with kubectl and encrypt it with kubeseal:
242249

243250
```sh
244-
kubectl -n dev create secret generic basic-auth \
251+
kubectl -n prod create secret generic basic-auth \
245252
--from-literal=user=admin \
246253
--from-literal=password=admin \
247254
--dry-run \
@@ -258,7 +265,8 @@ then decrypt it into a Kubernetes secret.
258265
To prepare for disaster recovery you should backup the Sealed Secrets controller private key with:
259266

260267
```sh
261-
kubectl get secret -n fluxcd sealed-secrets-key -o yaml --export > sealed-secrets-key.yaml
268+
kubectl get secret -n fluxcd sealed-secrets-key -o yaml \
269+
--export > sealed-secrets-key.yaml
262270
```
263271

264272
To restore from backup after a disaster, replace the newly-created secret and restart the controller:

docs/prerequisites/README.md

Lines changed: 47 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,22 @@ title: Prerequisites
55
# Prerequisites
66

77
In order to install the workshop prerequisites you'll need a Kubernetes cluster **1.13**
8-
or newer with **Load Balancer** support.
8+
or newer with **Load Balancer** support and **RBAC** enabled.
99
Make sure you have the following tools installed locally:
1010
* kubectl 1.14
11-
* helm 3.0
1211
* git 2.20
1312

13+
## Helm v3
14+
15+
Download the Helm v3 CLI:
16+
17+
```sh
18+
OS=darwin-amd64 && \
19+
mkdir -p $HOME/.helm3/bin && \
20+
curl -sSL "https://get.helm.sh/helm-v3.0.0-beta.3-${OS}.tar.gz" | tar xvz && \
21+
chmod +x ${OS}/helm && mv ${OS}/helm $HOME/.helm3/bin/helmv3
22+
```
23+
1424
## Git
1525

1626
Fork the [workshop](https://github.com/stefanprodan/gitops-helm-workshop) repository
@@ -45,14 +55,22 @@ Cluster state directory structure:
4555
Add FluxCD repository to Helm repos:
4656

4757
```sh
48-
helm repo add fluxcd https://charts.fluxcd.io
58+
helmv3 repo add fluxcd https://charts.fluxcd.io
59+
```
60+
61+
Create the fluxcd namespace:
62+
63+
```sh
64+
kubectl create ns fluxcd
4965
```
5066

5167
Install Flux by providing your GitHub repository URL:
5268

5369
```sh
54-
helm upgrade -i flux fluxcd/flux --wait \
70+
helmv3 upgrade -i flux fluxcd/flux --wait \
5571
--namespace fluxcd \
72+
--set registry.pollInterval=1m \
73+
--set git.pollInterval=1m \
5674
--set git.url=git@github.com:${GHUSER}/gitops-helm-workshop
5775
```
5876

@@ -81,13 +99,27 @@ paste the Flux public key and click `Add key`.
8199

82100
## Helm Operator
83101

102+
Install the HelmRelease CRD:
103+
104+
```sh
105+
kubectl apply -f https://raw.githubusercontent.com/fluxcd/helm-operator/helm-v3/deploy/flux-helm-release-crd.yaml
106+
```
107+
84108
Install Flux Helm Operator in the `fluxcd` namespace:
85109

86110
```sh
87-
helm upgrade -i helm-operator fluxcd/helm-operator --wait \
111+
helmv3 upgrade -i helm-operator fluxcd/helm-operator --wait \
88112
--namespace fluxcd \
89-
--set createCRD=true \
90-
--set git.ssh.secretName=flux-git-deploy
113+
--set git.ssh.secretName=flux-git-deploy \
114+
--set git.pollInterval=1m \
115+
--set chartsSyncInterval=1m \
116+
--set configureRepositories.enable=true \
117+
--set configureRepositories.repositories[0].name=stable \
118+
--set configureRepositories.repositories[0].url=https://kubernetes-charts.storage.googleapis.com \
119+
--set extraEnvs[0].name=HELM_VERSION \
120+
--set extraEnvs[0].value=v3 \
121+
--set image.repository=docker.io/fluxcd/helm-operator-prerelease \
122+
--set image.tag=helm-v3-3f3ca506
91123
```
92124

93125
## Linkerd
@@ -116,13 +148,19 @@ linkerd check
116148
Add Flagger Helm repository:
117149

118150
```sh
119-
helm repo add flagger https://flagger.app
151+
helmv3 repo add flagger https://flagger.app
152+
```
153+
154+
Install Flagger's Canary CRD:
155+
156+
```sh
157+
kubectl apply -f https://raw.githubusercontent.com/weaveworks/flagger/master/artifacts/flagger/crd.yaml
120158
```
121159

122160
Install Flagger in the `linkerd` namespace:
123161

124162
```sh
125-
helm upgrade -i flagger flagger/flagger --wait \
163+
helmv3 upgrade -i flagger flagger/flagger --wait \
126164
--namespace linkerd \
127165
--set crd.create=true \
128166
--set metricsServer=http://linkerd-prometheus:9090 \

0 commit comments

Comments
 (0)