fix(docs): Created guide to install capacitor in your cluster. (#35602)
Created a short guide on how to set up capacitor. I have this configuration working in my cluster now and I think it could be useful for people to know. **Description** <!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. --> ⚒️ Fixes # <!--(issue)--> **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code - [x] 📜 Documentation Changes **🧪 How Has This Been Tested?** <!-- This is currently running in my cluster in this configuration now. --> **📃 Notes:** <!-- Please enter any other relevant information here --> **✔️ Checklist:** - [ ] ⚖️ My code follows the style guidelines of this project - [ ] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [x] 📄 I have made changes to the documentation - [] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [] ⬆️ I increased versions for any altered app according to semantic versioning - [x] I made sure the title starts with `feat(chart-name):`, `fix(chart-name):`, `chore(chart-name):`, `docs(chart-name):` or `fix(docs):` **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --------- Signed-off-by: TJ <55514551+nerddotdad@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,118 @@
|
||||
---
|
||||
sidebar:
|
||||
order: 2
|
||||
title: FluxCD Capacitor
|
||||
---
|
||||
|
||||
:::caution[Disclaimer]
|
||||
|
||||
This guide isnt covered by the Support Policy and is considered more advanced.
|
||||
If you face issues feel free to open a thread in the appropiate Channel in our Discord server.
|
||||
|
||||
:::
|
||||
|
||||
:::note[Note]
|
||||
|
||||
[Capacitor](https://fluxcd.io/blog/2024/02/introducing-capacitor/) was created by FluxCD the repo and Kustomization file were pulled from that link. Please reference that document to gain more contenxt and understanding of how it works.
|
||||
|
||||
:::
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Having a running Kubernetes cluster
|
||||
- Bootstrapped fluxcd
|
||||
- Knowledge on how to add charts/kubernetes resources with fluxcd
|
||||
- Usage of an ingress to make the webhook accessible from outside your network
|
||||
|
||||
## Initial Setup
|
||||
|
||||
- Create a new folder called `capacitor` inside the `flux-system` folder.
|
||||
- Update the `kustomization.yaml` file in `flux-system` with `- capacitor`
|
||||
- Next we will need 3 files inside the capacitor folder:
|
||||
|
||||
|
||||
capacitor.yaml
|
||||
```yaml
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: capacitor
|
||||
namespace: flux-system
|
||||
spec:
|
||||
targetNamespace: flux-system
|
||||
interval: 1h
|
||||
retryInterval: 2m
|
||||
timeout: 5m
|
||||
wait: true
|
||||
prune: true
|
||||
path: "./"
|
||||
sourceRef:
|
||||
kind: OCIRepository
|
||||
name: capacitor
|
||||
```
|
||||
|
||||
ingress.yaml
|
||||
```yaml
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: capacitor
|
||||
namespace: flux-system
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: domain-0-le-prod # use what you have configured for your ingress
|
||||
cert-manager.io/private-key-rotation-policy: Always
|
||||
spec:
|
||||
ingressClassName: internal
|
||||
rules:
|
||||
- host: capacitor.${DOMAIN_0} # use what you have configured for your ingress
|
||||
http:
|
||||
paths:
|
||||
- pathType: Prefix
|
||||
path: /
|
||||
backend:
|
||||
service:
|
||||
name: capacitor
|
||||
port:
|
||||
number: 9000
|
||||
tls:
|
||||
- hosts:
|
||||
- capacitor.${DOMAIN_0} # use what you have configured for your ingress
|
||||
secretName: capacitor-tls-0 # use what you have configured for your ingress
|
||||
```
|
||||
|
||||
kustomization.yaml
|
||||
``` yaml
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- capacitor.yaml
|
||||
- ingress.yaml
|
||||
```
|
||||
|
||||
## Add The Repository
|
||||
|
||||
Go to your `Reponsitories/oci` directory and create this file.
|
||||
|
||||
capacitor-manifests.yaml
|
||||
``` yaml
|
||||
apiVersion: source.toolkit.fluxcd.io/v1beta2
|
||||
kind: OCIRepository
|
||||
metadata:
|
||||
name: capacitor
|
||||
namespace: flux-system
|
||||
spec:
|
||||
interval: 12h
|
||||
url: oci://ghcr.io/gimlet-io/capacitor-manifests
|
||||
ref:
|
||||
semver: ">=0.1.0"
|
||||
```
|
||||
|
||||
Update the kustomization.yaml in oci to include `- capacitor-manifests.yaml`
|
||||
|
||||
## Finishing Steps
|
||||
|
||||
Reoncile your cluster.
|
||||
|
||||
``` shell
|
||||
flux reconcile source git cluster
|
||||
```
|
||||
Reference in New Issue
Block a user