feat(cinny): add networkpolicy
This commit is contained in:
parent
2aaa746bee
commit
42e6727e57
4 changed files with 46 additions and 2 deletions
|
@ -3,7 +3,7 @@ name: cinny
|
||||||
description: A Helm Chart to install cinny (yet another matrix client)
|
description: A Helm Chart to install cinny (yet another matrix client)
|
||||||
icon: https://cinny.in/assets/favicon-48x48.png
|
icon: https://cinny.in/assets/favicon-48x48.png
|
||||||
type: application
|
type: application
|
||||||
version: "0.1.0"
|
version: "0.2.0"
|
||||||
# renovate: image=ghcr.io/cinnyapp/cinny
|
# renovate: image=ghcr.io/cinnyapp/cinny
|
||||||
appVersion: "4.6.0"
|
appVersion: "4.6.0"
|
||||||
maintainers:
|
maintainers:
|
||||||
|
|
|
@ -7,7 +7,7 @@ description: "A Helm Chart to install cinny (yet another matrix client)"
|
||||||
|
|
||||||
# cinny
|
# cinny
|
||||||
|
|
||||||
  
|
  
|
||||||
|
|
||||||
A Helm Chart to install cinny (yet another matrix client)
|
A Helm Chart to install cinny (yet another matrix client)
|
||||||
|
|
||||||
|
@ -91,6 +91,10 @@ helm uninstall cinny-release
|
||||||
| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | |
|
| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | |
|
||||||
| ingress.tls | list | `[]` | |
|
| ingress.tls | list | `[]` | |
|
||||||
| nameOverride | string | `""` | |
|
| nameOverride | string | `""` | |
|
||||||
|
| networkPolicy.egress.enabled | bool | `true` | activate egress no networkpolicy |
|
||||||
|
| networkPolicy.egress.extra | list | `[]` | egress rules |
|
||||||
|
| networkPolicy.enabled | bool | `false` | |
|
||||||
|
| networkPolicy.ingress.http | list | `[]` | ingress for http port (e.g. ingress-controller) |
|
||||||
| nodeSelector | object | `{}` | |
|
| nodeSelector | object | `{}` | |
|
||||||
| podAnnotations | object | `{}` | |
|
| podAnnotations | object | `{}` | |
|
||||||
| podLabels | object | `{}` | |
|
| podLabels | object | `{}` | |
|
||||||
|
|
29
cinny/templates/networkpolicy.yaml
Normal file
29
cinny/templates/networkpolicy.yaml
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{{- if .Values.networkPolicy.enabled }}
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: NetworkPolicy
|
||||||
|
metadata:
|
||||||
|
name: {{ include "cinny.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "cinny.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
podSelector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "cinny.selectorLabels" . | nindent 6 }}
|
||||||
|
policyTypes:
|
||||||
|
- Ingress
|
||||||
|
{{- if .Values.networkPolicy.egress.enabled }}
|
||||||
|
- Egress
|
||||||
|
{{- end }}
|
||||||
|
ingress:
|
||||||
|
- ports:
|
||||||
|
- port: {{ .Values.service.port }}
|
||||||
|
protocol: TCP
|
||||||
|
from:
|
||||||
|
{{- toYaml .Values.networkPolicy.ingress.http | nindent 8 }}
|
||||||
|
{{- with .Values.networkPolicy.egress }}
|
||||||
|
egress:
|
||||||
|
{{- toYaml .extra | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
|
@ -85,6 +85,17 @@ service:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
port: 8080
|
port: 8080
|
||||||
|
|
||||||
|
networkPolicy:
|
||||||
|
enabled: false
|
||||||
|
ingress:
|
||||||
|
# -- ingress for http port (e.g. ingress-controller)
|
||||||
|
http: []
|
||||||
|
egress:
|
||||||
|
# -- activate egress no networkpolicy
|
||||||
|
enabled: true
|
||||||
|
# -- egress rules
|
||||||
|
extra: []
|
||||||
|
|
||||||
ingress:
|
ingress:
|
||||||
enabled: false
|
enabled: false
|
||||||
className: ""
|
className: ""
|
||||||
|
|
Loading…
Add table
Reference in a new issue