k8s/external-services/gitea.yaml
2022-12-30 18:34:48 +00:00

110 lines
1.7 KiB
YAML

---
apiVersion: v1
kind: Service
metadata:
name: git
namespace: external-services
spec:
type: ClusterIP
ports:
- name: http
port: 80
...
---
apiVersion: discovery.k8s.io/v1
kind: EndpointSlice
metadata:
name: git
namespace: external-services
labels:
kubernetes.io/service-name: git
addressType: IPv4
ports:
- name: http
appProtocol: http
protocol: TCP
port: 27298
endpoints:
- addresses:
- "192.168.0.12"
conditions:
ready: true
...
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: git-cert
namespace: istio-system
spec:
secretName: git-cert
commonName: git.minhas.io
dnsNames:
- git.minhas.io
issuerRef:
name: letsencrypt-prod
kind: ClusterIssuer
group: cert-manager.io
...
---
apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
name: git-gateway
namespace: external-services
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 443
name: https
protocol: HTTPS
tls:
mode: SIMPLE
credentialName: git-cert
hosts:
- git.minhas.io
...
---
apiVersion: networking.istio.io/v1beta1
kind: ServiceEntry
metadata:
name: git
namespace: external-services
spec:
hosts:
- git.minhas.io
addresses:
- 0.0.0.0/0
ports:
- number: 27298
name: git
protocol: HTTP
location: MESH_EXTERNAL
resolution: STATIC
endpoints:
- address: 192.168.0.12
...
---
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: git-gateway
namespace: external-services
spec:
hosts:
- git.minhas.io
gateways:
- git-gateway
http:
- match:
- uri:
prefix: /
route:
- destination:
port:
number: 80
host: git
...