Skip to content

Commit

Permalink
Added emitunes resources (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
spietras authored Jul 20, 2024
1 parent 2db1bdb commit 90e3f79
Show file tree
Hide file tree
Showing 26 changed files with 310 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/clusters/main/apps/emitunes/emitunes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Create emitunes Kustomization
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: emitunes
spec:
# Path inside repository to a directory containing Kustomization files
path: src/clusters/main/apps/emitunes/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: emitunes
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Create emitunes-helm Kustomization
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: emitunes-helm
spec:
# Path inside repository to a directory containing Kustomization files
path: src/clusters/main/apps/emitunes/kustomize/emitunes-helm/kustomize
dependsOn:
# Deploy namespace first
- name: emitunes-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,8 @@
# Configure names transformer
nameReference:
- kind: Secret
fieldSpecs:
# Replace secret names in HelmReleases
- group: helm.toolkit.fluxcd.io
kind: HelmRelease
path: spec/valuesFrom/name
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Create emitunes-helm Kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# Include the following configuration files
configurations:
- configurations/names.yaml
# Include the following resources
resources:
- resources/release.yaml
- resources/repository.yaml
# Generate secrets
secretGenerator:
- files:
# It's important to include extension in the key
# SOPS will use it to determine the format of the content
- values.yaml=secrets/values.yaml
name: emitunes-helm-secrets-values
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Create emitunes Helm release
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: emitunes
spec:
chart:
spec:
# Use this chart from the repository
chart: emitunes
# Pin version to major
version: "0.x"
# Use this Helm repository
sourceRef:
kind: HelmRepository
name: radio-aktywne
# This key always needs to be here for patching to work
postRenderers: []
valuesFrom:
- kind: Secret
name: emitunes-helm-secrets-values
valuesKey: values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Create emitunes 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,37 @@
app:
datatunes:
sql:
password: ENC[AES256_GCM,data:mV8HAYplpKA=,iv:1lc0pWHZlHeX8esqSwvdmT9w5mElMYKQJTImsf0lJfE=,tag:LLk5h/YUDQVzq0M5CtB9bA==,type:str]
mediatunes:
s3:
user: ENC[AES256_GCM,data:ofJTUAgn6pHW,iv:a156MyylXUeKgP0EXREhjtqktNypNtXhwMSgiWoPUz4=,tag:WAphJacIe7KsUo2HzOfhQA==,type:str]
password: ENC[AES256_GCM,data:bfBYKlJJcpc=,iv:qzYGvbDHRtp2C1WiCMaz4DHFyc70MCLTqEVyRYbkIE8=,tag:1EOt3pHI1pJKEWQq5R9+qA==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age14uepygtepskwehywergh9fe9j2a3ytqd80y9r2ekfmett6rq3peqjtgxns
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBGY1ZoYlZvWG04Zk9ZdXh2
T0VWUk1oY0R0eEtpQnJRcWIzUXozQUlGOVRNCitxY0h5b3l6QnN2ejNZQ3Z1aXJX
aWhuNjZtYVNlTi9vV2pJOXJ3dkpZQjQKLS0tIGtJdFNOaDVtWXQ5aTd5L1diTzhw
c2RmaXczVnY0azVqWEtZTHQ5YUZFYkEK57cPtu0CelzVM9LFR/i3qUbAPt6HRAUZ
jAlPDHIQqQWeJE7x8E3CwCT3Z7LyA3fgSlt8eZ/n1OE6hNc1uWRz4Q==
-----END AGE ENCRYPTED FILE-----
- recipient: age1y5lqafxarcnlrduh8k3tycnaq63v2alagmtkf0k9gd59pg263axqtt928v
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBOalFvczJlL2xpUlVEblRD
TGlid0dzRWhxYTBUZENVQzNESGtyTmkvcVFJCmxtWDQyb2VJNUNPaEVJVzVja0RK
aEVOZ2ZsMmZTckduVGRzcHFWSUFJdjAKLS0tIFRHZ3M0dUlob0p6R0JPQlpSWG0x
cm1sN3U1VnZNNTU1NFQ2UlRmSUJiVUkKcDxNEToerq/aAa+m8Bmyg9R+UsuMXwx/
1guqoWy3m4ucGQBi7eCswg5m+rGee+FgzlQsan9EQwL8Zhh8sTwlaQ==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-07-20T09:09:11Z"
mac: ENC[AES256_GCM,data:O+OCc9f2T0h84q5Ohy3O3aQ2P8PKPMUFFcS8F4p8z3ItMuZHElkU1I8TjMxfKaZP5bIE3/gGBvLxBMzhSQxTqKhPX5y7QOYCCLf7ZHaSmiv4uQT5YYeTS9vYODtBSAYpjBtgbaFuyLrdKr8n+x8kvs+ZiOTsY7cL6xj1S7IswHM=,iv:lulF2TKvLfVkySWRiEy6iVz3K+VSJayC3IB9TZAJMa8=,tag:ILgTBUQuZeQQfrH9GyU0ow==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Create emitunes-namespace Kustomization
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: emitunes-namespace
spec:
# Path inside repository to a directory containing Kustomization files
path: src/clusters/main/apps/emitunes/kustomize/emitunes-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 emitunes-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 emitunes namespace
apiVersion: v1
kind: Namespace
metadata:
name: emitunes
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Create emitunes-traefik Kustomization
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: emitunes-traefik
spec:
# Path inside repository to a directory containing Kustomization files
path: src/clusters/main/apps/emitunes/kustomize/emitunes-traefik/kustomize
dependsOn:
# Deploy Helm release first
- name: emitunes-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,6 @@
# Create emitunes-traefik Kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# Include the following resources
resources:
- resources/routes/http.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Create HTTP ingress route for emitunes
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: emitunes-http
spec:
entryPoints:
# Use entrypoint for HTTPS traffic
- https
routes:
# Match traffic with the Host header
- match: HostRegexp(`emitunes\..*`)
kind: Rule
services:
# Route traffic to the emitunes service
- name: emitunes
# This is the name of the port in the service
port: http
8 changes: 8 additions & 0 deletions src/clusters/main/apps/emitunes/kustomize/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Create emitunes Kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# Include the following resources
resources:
- emitunes-helm/emitunes-helm.yaml
- emitunes-namespace/emitunes-namespace.yaml
- emitunes-traefik/emitunes-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 @@ -8,6 +8,7 @@ resources:
- emischeduler/emischeduler.yaml
- emishows/emishows.yaml
- emistream/emistream.yaml
- emitunes/emitunes.yaml
- fusion/fusion.yaml
- podinfo/podinfo.yaml
- streamcast/streamcast.yaml
Expand Down
25 changes: 25 additions & 0 deletions tests/clusters/ci/main/apps/emitunes/emitunes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Create emitunes Kustomization
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: emitunes
spec:
# Path inside repository to a directory containing Kustomization files
path: tests/clusters/ci/main/apps/emitunes/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: emitunes
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Create emitunes-helm Kustomization
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: emitunes-helm
spec:
# Path inside repository to a directory containing Kustomization files
path: tests/clusters/ci/main/apps/emitunes/kustomize/emitunes-helm/kustomize
dependsOn:
# Deploy namespace first
- name: emitunes-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 emitunes-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,18 @@
# Create emitunes Helm release
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: emitunes
spec:
chart:
spec:
# Use this chart from the repository
chart: emitunes
# Pin version to major
version: "0.x"
# 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 emitunes 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 emitunes-namespace Kustomization
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: emitunes-namespace
spec:
# Path inside repository to a directory containing Kustomization files
path: tests/clusters/ci/main/apps/emitunes/kustomize/emitunes-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 emitunes-namespace Kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../../../../../../../../src/clusters/main/apps/emitunes/kustomize/emitunes-namespace/kustomize
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Create emitunes-traefik Kustomization
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: emitunes-traefik
spec:
# Path inside repository to a directory containing Kustomization files
path: tests/clusters/ci/main/apps/emitunes/kustomize/emitunes-traefik/kustomize
dependsOn:
# Deploy Helm release first
- name: emitunes-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 emitunes-traefik Kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../../../../../../../../src/clusters/main/apps/emitunes/kustomize/emitunes-traefik/kustomize
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Create emitunes Kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# Include the following resources
resources:
- emitunes-helm/emitunes-helm.yaml
- emitunes-namespace/emitunes-namespace.yaml
- emitunes-traefik/emitunes-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 @@ -8,6 +8,7 @@ resources:
- emischeduler/emischeduler.yaml
- emishows/emishows.yaml
- emistream/emistream.yaml
- emitunes/emitunes.yaml
- fusion/fusion.yaml
- podinfo/podinfo.yaml
- streamcast/streamcast.yaml
Expand Down

0 comments on commit 90e3f79

Please sign in to comment.