feat: enhance ingress and notes configuration for improved accessibility and TLS support
This commit is contained in:
parent
12501d625a
commit
78ef8322ff
@ -2,6 +2,23 @@ Thank you for installing {{ .Chart.Name }}!
|
|||||||
|
|
||||||
Your Clawdbot gateway is starting up. This may take 1-2 minutes.
|
Your Clawdbot gateway is starting up. This may take 1-2 minutes.
|
||||||
|
|
||||||
|
{{- if .Values.ingress.enabled }}
|
||||||
|
{{- $domain := .Values.ingress.domain }}
|
||||||
|
{{- $tlsEnabled := .Values.ingress.tls.enabled }}
|
||||||
|
{{- if $domain }}
|
||||||
|
|
||||||
|
==========================================================
|
||||||
|
Clawdbot is accessible at:
|
||||||
|
|
||||||
|
{{- if $tlsEnabled }}
|
||||||
|
https://{{ $domain }}
|
||||||
|
{{- else }}
|
||||||
|
http://{{ $domain }}
|
||||||
|
{{- end }}
|
||||||
|
==========================================================
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
1. Check the gateway status:
|
1. Check the gateway status:
|
||||||
|
|
||||||
kubectl get statefulset {{ include "clawdbot.fullname" . }} -n {{ .Release.Namespace }}
|
kubectl get statefulset {{ include "clawdbot.fullname" . }} -n {{ .Release.Namespace }}
|
||||||
@ -10,9 +27,19 @@ Your Clawdbot gateway is starting up. This may take 1-2 minutes.
|
|||||||
2. Access the Control UI:
|
2. Access the Control UI:
|
||||||
|
|
||||||
{{- if .Values.ingress.enabled }}
|
{{- if .Values.ingress.enabled }}
|
||||||
|
{{- $domain := .Values.ingress.domain }}
|
||||||
|
{{- $tlsEnabled := .Values.ingress.tls.enabled }}
|
||||||
|
{{- if $domain }}
|
||||||
|
{{- if $tlsEnabled }}
|
||||||
|
https://{{ $domain }}
|
||||||
|
{{- else }}
|
||||||
|
http://{{ $domain }}
|
||||||
|
{{- end }}
|
||||||
|
{{- else }}
|
||||||
{{- range .Values.ingress.hosts }}
|
{{- range .Values.ingress.hosts }}
|
||||||
https://{{ .host }}
|
https://{{ .host }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
# Port-forward to access locally:
|
# Port-forward to access locally:
|
||||||
kubectl port-forward {{ include "clawdbot.fullname" . }}-0 {{ .Values.gateway.port }}:{{ .Values.gateway.port }} -n {{ .Release.Namespace }}
|
kubectl port-forward {{ include "clawdbot.fullname" . }}-0 {{ .Values.gateway.port }}:{{ .Values.gateway.port }} -n {{ .Release.Namespace }}
|
||||||
|
|||||||
@ -1,29 +1,50 @@
|
|||||||
{{- if .Values.ingress.enabled -}}
|
{{- if .Values.ingress.enabled -}}
|
||||||
|
{{- $fullName := include "clawdbot.fullname" . -}}
|
||||||
|
{{- $svcPort := .Values.service.port -}}
|
||||||
|
{{- $domain := .Values.ingress.domain -}}
|
||||||
|
{{- $tlsEnabled := .Values.ingress.tls.enabled -}}
|
||||||
|
{{- $tlsSecretName := .Values.ingress.tls.secretName | default (printf "%s-tls" $fullName) -}}
|
||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "clawdbot.fullname" . }}
|
name: {{ $fullName }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "clawdbot.labels" . | nindent 4 }}
|
{{- include "clawdbot.labels" . | nindent 4 }}
|
||||||
{{- with .Values.ingress.annotations }}
|
|
||||||
annotations:
|
annotations:
|
||||||
|
{{- if and $tlsEnabled .Values.ingress.tls.certManager.enabled }}
|
||||||
|
cert-manager.io/cluster-issuer: {{ .Values.ingress.tls.certManager.issuer | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.ingress.annotations }}
|
||||||
{{- toYaml . | nindent 4 }}
|
{{- toYaml . | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
{{- if .Values.ingress.className }}
|
{{- if .Values.ingress.className }}
|
||||||
ingressClassName: {{ .Values.ingress.className }}
|
ingressClassName: {{ .Values.ingress.className }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.ingress.tls }}
|
{{- if $tlsEnabled }}
|
||||||
tls:
|
tls:
|
||||||
{{- range .Values.ingress.tls }}
|
|
||||||
- hosts:
|
- hosts:
|
||||||
{{- range .hosts }}
|
{{- if $domain }}
|
||||||
- {{ . | quote }}
|
- {{ $domain | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
secretName: {{ .secretName }}
|
{{- range .Values.ingress.hosts }}
|
||||||
{{- end }}
|
- {{ .host | quote }}
|
||||||
|
{{- end }}
|
||||||
|
secretName: {{ $tlsSecretName }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
rules:
|
rules:
|
||||||
|
{{- if $domain }}
|
||||||
|
- host: {{ $domain | quote }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: {{ $fullName }}
|
||||||
|
port:
|
||||||
|
number: {{ $svcPort }}
|
||||||
|
{{- end }}
|
||||||
{{- range .Values.ingress.hosts }}
|
{{- range .Values.ingress.hosts }}
|
||||||
- host: {{ .host | quote }}
|
- host: {{ .host | quote }}
|
||||||
http:
|
http:
|
||||||
@ -33,9 +54,9 @@ spec:
|
|||||||
pathType: {{ .pathType }}
|
pathType: {{ .pathType }}
|
||||||
backend:
|
backend:
|
||||||
service:
|
service:
|
||||||
name: {{ include "clawdbot.fullname" $ }}
|
name: {{ $fullName }}
|
||||||
port:
|
port:
|
||||||
number: {{ $.Values.service.port }}
|
number: {{ $svcPort }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@ -139,20 +139,33 @@ service:
|
|||||||
ingress:
|
ingress:
|
||||||
enabled: false
|
enabled: false
|
||||||
className: nginx
|
className: nginx
|
||||||
annotations:
|
|
||||||
# cert-manager.io/cluster-issuer: letsencrypt-prod
|
# Simplified domain configuration (recommended)
|
||||||
|
# Set your domain here - TLS will be auto-configured if tls.enabled is true
|
||||||
|
domain: "" # e.g., "clawdbot.yourdomain.com"
|
||||||
|
|
||||||
|
# TLS configuration
|
||||||
|
tls:
|
||||||
|
enabled: false
|
||||||
|
# Secret name for TLS certificate (auto-generated name if empty)
|
||||||
|
secretName: ""
|
||||||
|
# Use cert-manager for automatic certificate provisioning
|
||||||
|
certManager:
|
||||||
|
enabled: false
|
||||||
|
issuer: "letsencrypt-prod"
|
||||||
|
|
||||||
|
# Additional annotations
|
||||||
|
annotations: {}
|
||||||
|
# WebSocket support (recommended for real-time features):
|
||||||
# nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
|
# nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
|
||||||
# nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
|
# nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
|
||||||
# nginx.ingress.kubernetes.io/websocket-services: "{{ include \"clawdbot.fullname\" . }}"
|
|
||||||
hosts:
|
# Advanced: Manual host configuration (overrides domain if set)
|
||||||
- host: clawdbot.example.com
|
hosts: []
|
||||||
paths:
|
# - host: clawdbot.example.com
|
||||||
- path: /
|
# paths:
|
||||||
pathType: Prefix
|
# - path: /
|
||||||
tls: []
|
# pathType: Prefix
|
||||||
# - secretName: clawdbot-tls
|
|
||||||
# hosts:
|
|
||||||
# - clawdbot.example.com
|
|
||||||
|
|
||||||
# Resource limits/requests
|
# Resource limits/requests
|
||||||
resources:
|
resources:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user