hertz101/templates/consul-ingress.yaml
suyiiyii 019c3da82c
feat(consul): 添加注册表暴露控制功能
- 在 templates/consul-ingress.yaml 中添加了 registry_expose 条件判断
- 在 values.yaml 中添加了 registry_expose 配置项,默认为 false
2025-01-21 22:05:04 +08:00

42 lines
880 B
YAML

{{- if .Values.registry_expose }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: consul-ingress
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
spec:
tls:
- hosts:
- consul.kl.suyiiyii.top
secretName: consul-tls
rules:
- host: consul.kl.suyiiyii.top
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: consul
port:
number: 8500
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: consul-http-ingress
spec:
rules:
- host: consul.kl.suyiiyii.top
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: consul
port:
number: 8500
{{- end }}