Skip to content

Commit

Permalink
Add nginx-ingress-controller option (#1022)
Browse files Browse the repository at this point in the history
Previously, our AWS-based setup only supported ALB ingresses via the
alb-ingress-controller. This change enables the use of Nginx ingress
controller as an alternative, particularly beneficial for self-hosted
clusters. Users can now choose between ALB and Nginx when configuring
ingresses, providing more flexibility in ingress management.
  • Loading branch information
emplam27 authored Sep 30, 2024
1 parent 7b8e974 commit 2a29c7d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
12 changes: 10 additions & 2 deletions build/charts/yorkie-cluster/templates/istio/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
{{ if .Values.ingress.nginx.enabled }}
name: ingress-nginx
{{ else }}
name: {{ .Values.yorkie.name }}
{{ end }}
namespace: {{ .Values.yorkie.namespace }}
{{ if .Values.ingress.awsAlb.enabled }}
annotations:
Expand All @@ -27,14 +31,18 @@ metadata:
# If the health check fails, NCP ALB will not route the traffic to the service
alb.ingress.kubernetes.io/healthcheck-path: /healthz
{{ end }}
{{ if .Values.ingress.nginx.enabled }}
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
kubernetes.io/ingress.class: "nginx"
{{ end }}
spec:
ingressClassName: {{ .Values.ingress.ingressClassName }}
rules:
{{ if .Values.ingress.hosts.enabled }}
- host: {{ .Values.ingress.hosts.apiHost }}
http:
{{ end }}
{{ if not .Values.ingress.hosts.enabled }}
{{ else }}
- http:
{{ end }}
paths:
Expand Down
3 changes: 3 additions & 0 deletions build/charts/yorkie-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ ingress:
enabled: false
certNo: 1234

nginx:
enabled: false

# Configuration for ratelimit
ratelimit:
enabled: false
Expand Down

0 comments on commit 2a29c7d

Please sign in to comment.