diff --git a/helm/cf2cnp/Chart.yaml b/helm/cf2cnp/Chart.yaml index dd871d5..d5e718d 100644 --- a/helm/cf2cnp/Chart.yaml +++ b/helm/cf2cnp/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: cf2cnp description: A Helm chart for CF2CNP - Cilium Flow to CiliumNetworkPolicy converter type: application -version: 0.3.1 +version: 0.4.0 appVersion: "0.3.1" keywords: - cilium diff --git a/helm/cf2cnp/README.md b/helm/cf2cnp/README.md index 4b1f5c1..3fa4aa1 100644 --- a/helm/cf2cnp/README.md +++ b/helm/cf2cnp/README.md @@ -37,6 +37,11 @@ The following table lists the configurable parameters of the CF2CNP chart and th | `ingress.annotations` | Ingress annotations | `{}` | | `ingress.hosts` | Ingress hosts configuration | See values.yaml | | `ingress.tls` | Ingress TLS configuration | `[]` | +| `httpRoute.enabled` | Enable HTTPRoute (Gateway API) | `false` | +| `httpRoute.annotations` | HTTPRoute annotations | `{}` | +| `httpRoute.parentRefs` | Gateways the route is attached to | `[]` | +| `httpRoute.hostnames` | HTTPRoute hostnames | See values.yaml | +| `httpRoute.paths` | Path matches of the route | See values.yaml | | `extraManifests` | Extra Kubernetes manifests to deploy | `[]` | | `resources` | CPU/Memory resource requests/limits | `{}` | | `nodeSelector` | Node selector | `{}` | diff --git a/helm/cf2cnp/templates/httproute.yaml b/helm/cf2cnp/templates/httproute.yaml new file mode 100644 index 0000000..3856c6a --- /dev/null +++ b/helm/cf2cnp/templates/httproute.yaml @@ -0,0 +1,33 @@ +{{- if .Values.httpRoute.enabled -}} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: {{ include "cf2cnp.fullname" . }} + labels: + {{- include "cf2cnp.labels" . | nindent 4 }} + {{- with .Values.httpRoute.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.httpRoute.parentRefs }} + parentRefs: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.httpRoute.hostnames }} + hostnames: + {{- range . }} + - {{ . | quote }} + {{- end }} + {{- end }} + rules: + - matches: + {{- range .Values.httpRoute.paths }} + - path: + type: {{ .pathType }} + value: {{ .path }} + {{- end }} + backendRefs: + - name: {{ include "cf2cnp.fullname" . }} + port: {{ .Values.service.port }} +{{- end }} diff --git a/helm/cf2cnp/values.yaml b/helm/cf2cnp/values.yaml index f6cd593..b2877a0 100644 --- a/helm/cf2cnp/values.yaml +++ b/helm/cf2cnp/values.yaml @@ -59,6 +59,19 @@ ingress: # hosts: # - cf2cnp.local +httpRoute: + enabled: false + annotations: {} + parentRefs: [] + # - name: my-gateway + # namespace: gateway-system + # sectionName: https + hostnames: + - cf2cnp.local + paths: + - path: / + pathType: PathPrefix + resources: {} # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little