Skip to content

Commit

Permalink
docs(deploy): add ingress and networkpolicy (#104)
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Gaiser <[email protected]>
  • Loading branch information
sebastiangaiser authored Sep 25, 2024
1 parent c9b4837 commit 5e80874
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,45 @@ kubectl apply -f https://raw.githubusercontent.com/gimlet-io/capacitor/main/depl
kubectl port-forward svc/capacitor -n flux-system 9000:9000
```

For adding an `Ingress`, a Kubernetes `NetworkPolicy` is required.
An example would be:

```
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: capacitor-ingress
namespace: flux-system
spec:
policyTypes:
- Ingress
ingress:
- from:
- namespaceSelector: {}
podSelector:
matchLabels:
app.kubernetes.io/instance: capacitor
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: capacitor-ingress
namespace: flux-system
spec:
rules:
- host: gitops.example.com
http:
paths:
- pathType: Prefix
path: /
backend:
service:
name: capacitor
port:
number: 9000
```

### Helm

```
Expand Down

0 comments on commit 5e80874

Please sign in to comment.