- 在 templates/consul-ingress.yaml 中添加了 registry_expose 条件判断 - 在 values.yaml 中添加了 registry_expose 配置项,默认为 false
42 lines
880 B
YAML
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 }} |