Skip to content

Commit

Permalink
Feature/docker ingress (#59)
Browse files Browse the repository at this point in the history
* Defining Service and IngressRoute for ingress-forwarder

* Fixing DNS name for service

* Adding additional attributes for IngressRoute service definition.

* Allowing External Services in Traefik

* Stringifying the boolean

* Allowing ExternalNames for Traefik CRDs

* Adding Docker1 service and sparkhacks ingressroute

* Fixing Traefik endpoint
  • Loading branch information
clee231 authored Nov 1, 2023
1 parent d2e0e15 commit f50a304
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
71 changes: 71 additions & 0 deletions kubernetes/argocd/stacks/common/docker-ingress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: ingress-forwarder
---
# https://crt.the-mori.com/index/2021-09-17-kubernetes-traefik-forward-traffic-external-ip
kind: Service
apiVersion: v1
metadata:
name: docker2
namespace: ingress-forwarder
spec:
type: ExternalName
ports:
- name: docker2
port: 80
targetPort: 80
externalName: 172.29.1.224
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: flourishconf
namespace: ingress-forwarder
spec:
entryPoints:
- web
routes:
- match: Host(`flourishconf.com`)
kind: Rule
services:
- name: docker2
namespace: ingress-forwarder
passHostHeader: true
kind: Service
port: 80
scheme: http
---
# https://crt.the-mori.com/index/2021-09-17-kubernetes-traefik-forward-traffic-external-ip
kind: Service
apiVersion: v1
metadata:
name: docker1
namespace: ingress-forwarder
spec:
type: ExternalName
ports:
- name: docker1
port: 443
targetPort: 443
externalName: 172.29.0.31
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: sparkhacksatuic
namespace: ingress-forwarder
spec:
entryPoints:
- websecure
routes:
- match: "Host(`sparkhacksatuic.com`) || Host(`www.sparkhacksatuic.com`)"
kind: Rule
services:
- name: docker1
namespace: ingress-forwarder
passHostHeader: true
kind: Service
port: 443
scheme: https
4 changes: 4 additions & 0 deletions kubernetes/argocd/stacks/common/traefik.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ spec:
PathPrefix(`/api`)
- name: ingressRoute.dashboard.entryPoints[0]
value: web
- name: providers.kubernetesIngress.allowExternalNameServices
value: "true"
- name: providers.kubernetesCRD.allowExternalNameServices
value: "true"
project: default
syncPolicy:
automated:
Expand Down

0 comments on commit f50a304

Please sign in to comment.