Skip to content

Commit

Permalink
feat(kuma-cp): expose kuma-cp gui through ingress (#4101)
Browse files Browse the repository at this point in the history
Signed-off-by: Łukasz Dziedziak <lukidzi@gmail.com>
  • Loading branch information
lukidzi authored Apr 5, 2022
1 parent 87582d6 commit e88a16e
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
6 changes: 6 additions & 0 deletions deployments/charts/kuma/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ A Helm chart for the Kuma Control Plane
| controlPlane.service.name | string | `nil` | Optionally override of the Kuma Control Plane Service's name |
| controlPlane.service.type | string | `"ClusterIP"` | Service type of the Kuma Control Plane |
| controlPlane.service.annotations | object | `{}` | Additional annotations to put on the Kuma Control Plane |
| controlPlane.ingress.enabled | bool | `false` | Install K8s Ingress resource that exposes GUI and API |
| controlPlane.ingress.ingressClassName | string | `nil` | IngressClass defines which controller will implement the resource |
| controlPlane.ingress.hostname | string | `nil` | Ingress hostname |
| controlPlane.ingress.annotations | object | `{}` | Map of ingress annotations. |
| controlPlane.ingress.path | string | `"/"` | Ingress path. |
| controlPlane.ingress.pathType | string | `"ImplementationSpecific"` | Each path in an Ingress is required to have a corresponding path type. (ImplementationSpecific/Exact/Prefix) |
| controlPlane.globalZoneSyncService | object | `{"annotations":{},"loadBalancerIP":null,"port":5685,"type":"LoadBalancer"}` | URL of Global Kuma CP |
| controlPlane.globalZoneSyncService.type | string | `"LoadBalancer"` | Service type of the Global-zone sync |
| controlPlane.globalZoneSyncService.loadBalancerIP | string | `nil` | Optionally specify IP to be used by cloud provider when configuring load balancer |
Expand Down
24 changes: 24 additions & 0 deletions deployments/charts/kuma/templates/cp-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{{- if .Values.controlPlane.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "kuma.controlPlane.serviceName" . }}
namespace: {{ .Release.Namespace }}
{{- with .Values.controlPlane.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
ingressClassName: {{ .Values.controlPlane.ingress.ingressClassName }}
rules:
- host: {{ .Values.controlPlane.ingress.hostname }}
http:
paths:
- path: {{ .Values.controlPlane.ingress.path }}
pathType: {{ .Values.controlPlane.ingress.pathType }}
backend:
service:
name: {{ include "kuma.controlPlane.serviceName" . }}
port:
number: 5681
{{- end }}
16 changes: 16 additions & 0 deletions deployments/charts/kuma/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,22 @@ controlPlane:
# -- Additional annotations to put on the Kuma Control Plane
annotations: { }

# Kuma API and GUI ingress settings. Useful if you want to expose the
# API and GUI of Kuma outside the k8s cluster.
ingress:
# -- Install K8s Ingress resource that exposes GUI and API
enabled: false
# -- IngressClass defines which controller will implement the resource
ingressClassName:
# -- Ingress hostname
hostname:
# -- Map of ingress annotations.
annotations: {}
# -- Ingress path.
path: /
# -- Each path in an Ingress is required to have a corresponding path type. (ImplementationSpecific/Exact/Prefix)
pathType: ImplementationSpecific

# -- URL of Global Kuma CP
globalZoneSyncService:
# -- Service type of the Global-zone sync
Expand Down

0 comments on commit e88a16e

Please sign in to comment.