Skip to content

Commit

Permalink
Added emipass (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
spietras authored Mar 26, 2024
1 parent de7a2d4 commit 1f9fb4c
Show file tree
Hide file tree
Showing 26 changed files with 267 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/clusters/main/apps/emipass/emipass.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Create emipass Kustomization
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: emipass
spec:
# Path inside repository to a directory containing Kustomization files
path: src/clusters/main/apps/emipass/kustomize
dependsOn:
# Deploy Traefik first
- name: traefik
# Apply patches for common configurations
# This key always needs to be here for patching to work
patches:
# Set target namespace
- target:
group: kustomize.toolkit.fluxcd.io
kind: Kustomization
name: .*
patch: |
kind: .
metadata:
name: .
spec:
targetNamespace: emipass
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Create emipass-helm Kustomization
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: emipass-helm
spec:
# Path inside repository to a directory containing Kustomization files
path: src/clusters/main/apps/emipass/kustomize/emipass-helm/kustomize
dependsOn:
# Deploy namespace first
- name: emipass-namespace
# This key always needs to be here for patching to work
patches: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Create emipass-helm Kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# Include the following resources
resources:
- resources/release.yaml
- resources/repository.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Create emipass Helm release
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: emipass
spec:
chart:
spec:
# Use this chart from the repository
chart: emipass
# Use this Helm repository
sourceRef:
kind: HelmRepository
name: radio-aktywne
# This key always needs to be here for patching to work
postRenderers: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Create emipass Helm repository
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: radio-aktywne
spec:
type: oci
url: oci://ghcr.io/radio-aktywne/charts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Create emipass-namespace Kustomization
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: emipass-namespace
spec:
# Path inside repository to a directory containing Kustomization files
path: src/clusters/main/apps/emipass/kustomize/emipass-namespace/kustomize
# This key always needs to be here for patching to work
patches: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Create emipass-namespace Kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# Include the following resources
resources:
- resources/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Create emipass namespace
apiVersion: v1
kind: Namespace
metadata:
name: emipass
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Create emipass-traefik Kustomization
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: emipass-traefik
spec:
# Path inside repository to a directory containing Kustomization files
path: src/clusters/main/apps/emipass/kustomize/emipass-traefik/kustomize
dependsOn:
# Deploy Helm release first
- name: emipass-helm
# This key always needs to be here for patching to work
patches: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Create emipass-traefik Kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# Include the following resources
resources:
- resources/routes/http.yaml
- resources/routes/whip.yaml
- resources/routes/rtp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Create HTTP ingress route for emipass
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: emipass-http
spec:
entryPoints:
# Use entrypoint for HTTPS traffic
- https
routes:
# Match traffic with the Host header
- match: HostRegexp(`emipass\..*`)
kind: Rule
services:
# Route traffic to the emipass service
- name: emipass
# This is the name of the port in the service
port: http
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Create RTP ingress route for emipass
apiVersion: traefik.io/v1alpha1
kind: IngressRouteUDP
metadata:
name: emipass-rtp
spec:
entryPoints:
# Use entrypoint for emipass RTP traffic
- emipass-rtp
routes:
- services:
# Route traffic to the emipass service
- name: emipass
# This is the name of the port in the service
port: rtp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Create WHIP ingress route for emipass
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: emipass-whip
spec:
entryPoints:
# Use entrypoint for HTTPS traffic
- https
routes:
# Match traffic with the Host header
- match: HostRegexp(`whip.emipass\..*`)
kind: Rule
services:
# Route traffic to the emipass service
- name: emipass
# This is the name of the port in the service
port: whip
8 changes: 8 additions & 0 deletions src/clusters/main/apps/emipass/kustomize/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Create emipass Kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# Include the following resources
resources:
- emipass-helm/emipass-helm.yaml
- emipass-namespace/emipass-namespace.yaml
- emipass-traefik/emipass-traefik.yaml
1 change: 1 addition & 0 deletions src/clusters/main/apps/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# Include the following resources
resources:
- emipass/emipass.yaml
- emirecorder/emirecorder.yaml
- emischeduler/emischeduler.yaml
- emishows/emishows.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,16 @@ spec:
protocol: UDP
# Port to use inside the cluster
port: 9996
# Port for emipass RTP traffic
emipass-rtp:
# Expose it outside the cluster
expose: true
# Expose it on this port
exposedPort: 9995
# emipass RTP traffic uses UDP
protocol: UDP
# Port to use inside the cluster
port: 9995
service:
annotations:
# Use custom machine name in Tailscale
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ spec:
dnsNames:
- "*.k8s.spietras.dev"
- "*.emiarchive.k8s.spietras.dev"
- "*.emipass.k8s.spietras.dev"
# Use Let's Encrypt to issue the certificate
issuerRef:
name: letsencrypt
Expand Down
25 changes: 25 additions & 0 deletions tests/clusters/ci/main/apps/emipass/emipass.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Create emipass Kustomization
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: emipass
spec:
# Path inside repository to a directory containing Kustomization files
path: tests/clusters/ci/main/apps/emipass/kustomize
dependsOn:
# Deploy Traefik first
- name: traefik
# Apply patches for common configurations
# This key always needs to be here for patching to work
patches:
# Set target namespace
- target:
group: kustomize.toolkit.fluxcd.io
kind: Kustomization
name: .*
patch: |
kind: .
metadata:
name: .
spec:
targetNamespace: emipass
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Create emipass-helm Kustomization
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: emipass-helm
spec:
# Path inside repository to a directory containing Kustomization files
path: tests/clusters/ci/main/apps/emipass/kustomize/emipass-helm/kustomize
dependsOn:
# Deploy namespace first
- name: emipass-namespace
# This key always needs to be here for patching to work
patches: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Overlay emipass-helm Kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../../../../../../../../src/clusters/main/apps/emipass/kustomize/emipass-helm/kustomize
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Create emipass-namespace Kustomization
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: emipass-namespace
spec:
# Path inside repository to a directory containing Kustomization files
path: tests/clusters/ci/main/apps/emipass/kustomize/emipass-namespace/kustomize
# This key always needs to be here for patching to work
patches: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Overlay emipass-namespace Kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../../../../../../../../src/clusters/main/apps/emipass/kustomize/emipass-namespace/kustomize
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Create emipass-traefik Kustomization
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: emipass-traefik
spec:
# Path inside repository to a directory containing Kustomization files
path: tests/clusters/ci/main/apps/emipass/kustomize/emipass-traefik/kustomize
dependsOn:
# Deploy Helm release first
- name: emipass-helm
# This key always needs to be here for patching to work
patches: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Overlay emipass-traefik Kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../../../../../../../../src/clusters/main/apps/emipass/kustomize/emipass-traefik/kustomize
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Create emipass Kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# Include the following resources
resources:
- emipass-helm/emipass-helm.yaml
- emipass-namespace/emipass-namespace.yaml
- emipass-traefik/emipass-traefik.yaml
1 change: 1 addition & 0 deletions tests/clusters/ci/main/apps/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# Include the following resources
resources:
- emipass/emipass.yaml
- emirecorder/emirecorder.yaml
- emischeduler/emischeduler.yaml
- emishows/emishows.yaml
Expand Down

0 comments on commit 1f9fb4c

Please sign in to comment.