diff --git a/src/clusters/main/apps/kustomization.yaml b/src/clusters/main/apps/kustomization.yaml index f6d15ba..69395a3 100644 --- a/src/clusters/main/apps/kustomization.yaml +++ b/src/clusters/main/apps/kustomization.yaml @@ -13,6 +13,7 @@ resources: - emistream/emistream.yaml - emitunes/emitunes.yaml - podinfo/podinfo.yaml + - webfuse/webfuse.yaml - webscheduler/webscheduler.yaml - webshows/webshows.yaml - webstream/webstream.yaml diff --git a/src/clusters/main/apps/webfuse/kustomize/kustomization.yaml b/src/clusters/main/apps/webfuse/kustomize/kustomization.yaml new file mode 100644 index 0000000..f50cbf9 --- /dev/null +++ b/src/clusters/main/apps/webfuse/kustomize/kustomization.yaml @@ -0,0 +1,8 @@ +# Create webfuse Kustomization +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +# Include the following resources +resources: + - webfuse-helm/webfuse-helm.yaml + - webfuse-namespace/webfuse-namespace.yaml + - webfuse-traefik/webfuse-traefik.yaml diff --git a/src/clusters/main/apps/webfuse/kustomize/webfuse-helm/kustomize/kustomization.yaml b/src/clusters/main/apps/webfuse/kustomize/webfuse-helm/kustomize/kustomization.yaml new file mode 100644 index 0000000..85000e7 --- /dev/null +++ b/src/clusters/main/apps/webfuse/kustomize/webfuse-helm/kustomize/kustomization.yaml @@ -0,0 +1,7 @@ +# Create webfuse-helm Kustomization +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +# Include the following resources +resources: + - resources/release.yaml + - resources/repository.yaml diff --git a/src/clusters/main/apps/webfuse/kustomize/webfuse-helm/kustomize/resources/release.yaml b/src/clusters/main/apps/webfuse/kustomize/webfuse-helm/kustomize/resources/release.yaml new file mode 100644 index 0000000..1ea0d3d --- /dev/null +++ b/src/clusters/main/apps/webfuse/kustomize/webfuse-helm/kustomize/resources/release.yaml @@ -0,0 +1,18 @@ +# Create webfuse Helm release +apiVersion: helm.toolkit.fluxcd.io/v2beta1 +kind: HelmRelease +metadata: + name: webfuse +spec: + chart: + spec: + # Use this chart from the repository + chart: webfuse + # 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: [] diff --git a/src/clusters/main/apps/webfuse/kustomize/webfuse-helm/kustomize/resources/repository.yaml b/src/clusters/main/apps/webfuse/kustomize/webfuse-helm/kustomize/resources/repository.yaml new file mode 100644 index 0000000..48a8c2b --- /dev/null +++ b/src/clusters/main/apps/webfuse/kustomize/webfuse-helm/kustomize/resources/repository.yaml @@ -0,0 +1,8 @@ +# Create webfuse Helm repository +apiVersion: source.toolkit.fluxcd.io/v1beta2 +kind: HelmRepository +metadata: + name: radio-aktywne +spec: + type: oci + url: oci://ghcr.io/radio-aktywne/charts diff --git a/src/clusters/main/apps/webfuse/kustomize/webfuse-helm/webfuse-helm.yaml b/src/clusters/main/apps/webfuse/kustomize/webfuse-helm/webfuse-helm.yaml new file mode 100644 index 0000000..2bc2a51 --- /dev/null +++ b/src/clusters/main/apps/webfuse/kustomize/webfuse-helm/webfuse-helm.yaml @@ -0,0 +1,13 @@ +# Create webfuse-helm Kustomization +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: webfuse-helm +spec: + # Path inside repository to a directory containing Kustomization files + path: src/clusters/main/apps/webfuse/kustomize/webfuse-helm/kustomize + dependsOn: + # Deploy namespace first + - name: webfuse-namespace + # This key always needs to be here for patching to work + patches: [] diff --git a/src/clusters/main/apps/webfuse/kustomize/webfuse-namespace/kustomize/kustomization.yaml b/src/clusters/main/apps/webfuse/kustomize/webfuse-namespace/kustomize/kustomization.yaml new file mode 100644 index 0000000..66df72a --- /dev/null +++ b/src/clusters/main/apps/webfuse/kustomize/webfuse-namespace/kustomize/kustomization.yaml @@ -0,0 +1,6 @@ +# Create webfuse-namespace Kustomization +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +# Include the following resources +resources: + - resources/namespace.yaml diff --git a/src/clusters/main/apps/webfuse/kustomize/webfuse-namespace/kustomize/resources/namespace.yaml b/src/clusters/main/apps/webfuse/kustomize/webfuse-namespace/kustomize/resources/namespace.yaml new file mode 100644 index 0000000..3941d7f --- /dev/null +++ b/src/clusters/main/apps/webfuse/kustomize/webfuse-namespace/kustomize/resources/namespace.yaml @@ -0,0 +1,5 @@ +# Create webfuse namespace +apiVersion: v1 +kind: Namespace +metadata: + name: webfuse diff --git a/src/clusters/main/apps/webfuse/kustomize/webfuse-namespace/webfuse-namespace.yaml b/src/clusters/main/apps/webfuse/kustomize/webfuse-namespace/webfuse-namespace.yaml new file mode 100644 index 0000000..5a162ef --- /dev/null +++ b/src/clusters/main/apps/webfuse/kustomize/webfuse-namespace/webfuse-namespace.yaml @@ -0,0 +1,10 @@ +# Create webfuse-namespace Kustomization +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: webfuse-namespace +spec: + # Path inside repository to a directory containing Kustomization files + path: src/clusters/main/apps/webfuse/kustomize/webfuse-namespace/kustomize + # This key always needs to be here for patching to work + patches: [] diff --git a/src/clusters/main/apps/webfuse/kustomize/webfuse-traefik/kustomize/kustomization.yaml b/src/clusters/main/apps/webfuse/kustomize/webfuse-traefik/kustomize/kustomization.yaml new file mode 100644 index 0000000..4d7e4d6 --- /dev/null +++ b/src/clusters/main/apps/webfuse/kustomize/webfuse-traefik/kustomize/kustomization.yaml @@ -0,0 +1,6 @@ +# Create webfuse-traefik Kustomization +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +# Include the following resources +resources: + - resources/routes/http.yaml diff --git a/src/clusters/main/apps/webfuse/kustomize/webfuse-traefik/kustomize/resources/routes/http.yaml b/src/clusters/main/apps/webfuse/kustomize/webfuse-traefik/kustomize/resources/routes/http.yaml new file mode 100644 index 0000000..192e040 --- /dev/null +++ b/src/clusters/main/apps/webfuse/kustomize/webfuse-traefik/kustomize/resources/routes/http.yaml @@ -0,0 +1,18 @@ +# Create HTTP ingress route for webfuse +apiVersion: traefik.io/v1alpha1 +kind: IngressRoute +metadata: + name: webfuse-http +spec: + entryPoints: + # Use entrypoint for HTTPS traffic + - https + routes: + # Match traffic with the Host header + - match: HostRegexp(`webfuse\..*`) + kind: Rule + services: + # Route traffic to the webfuse service + - name: webfuse + # This is the name of the port in the service + port: http diff --git a/src/clusters/main/apps/webfuse/kustomize/webfuse-traefik/webfuse-traefik.yaml b/src/clusters/main/apps/webfuse/kustomize/webfuse-traefik/webfuse-traefik.yaml new file mode 100644 index 0000000..d0c6519 --- /dev/null +++ b/src/clusters/main/apps/webfuse/kustomize/webfuse-traefik/webfuse-traefik.yaml @@ -0,0 +1,13 @@ +# Create webfuse-traefik Kustomization +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: webfuse-traefik +spec: + # Path inside repository to a directory containing Kustomization files + path: src/clusters/main/apps/webfuse/kustomize/webfuse-traefik/kustomize + dependsOn: + # Deploy Helm release first + - name: webfuse-helm + # This key always needs to be here for patching to work + patches: [] diff --git a/src/clusters/main/apps/webfuse/webfuse.yaml b/src/clusters/main/apps/webfuse/webfuse.yaml new file mode 100644 index 0000000..2d78dbb --- /dev/null +++ b/src/clusters/main/apps/webfuse/webfuse.yaml @@ -0,0 +1,25 @@ +# Create webfuse Kustomization +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: webfuse +spec: + # Path inside repository to a directory containing Kustomization files + path: src/clusters/main/apps/webfuse/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: webfuse diff --git a/tests/clusters/ci/main/apps/kustomization.yaml b/tests/clusters/ci/main/apps/kustomization.yaml index f6d15ba..69395a3 100644 --- a/tests/clusters/ci/main/apps/kustomization.yaml +++ b/tests/clusters/ci/main/apps/kustomization.yaml @@ -13,6 +13,7 @@ resources: - emistream/emistream.yaml - emitunes/emitunes.yaml - podinfo/podinfo.yaml + - webfuse/webfuse.yaml - webscheduler/webscheduler.yaml - webshows/webshows.yaml - webstream/webstream.yaml diff --git a/tests/clusters/ci/main/apps/webfuse/kustomize/kustomization.yaml b/tests/clusters/ci/main/apps/webfuse/kustomize/kustomization.yaml new file mode 100644 index 0000000..f50cbf9 --- /dev/null +++ b/tests/clusters/ci/main/apps/webfuse/kustomize/kustomization.yaml @@ -0,0 +1,8 @@ +# Create webfuse Kustomization +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +# Include the following resources +resources: + - webfuse-helm/webfuse-helm.yaml + - webfuse-namespace/webfuse-namespace.yaml + - webfuse-traefik/webfuse-traefik.yaml diff --git a/tests/clusters/ci/main/apps/webfuse/kustomize/webfuse-helm/kustomize/kustomization.yaml b/tests/clusters/ci/main/apps/webfuse/kustomize/webfuse-helm/kustomize/kustomization.yaml new file mode 100644 index 0000000..e3cca44 --- /dev/null +++ b/tests/clusters/ci/main/apps/webfuse/kustomize/webfuse-helm/kustomize/kustomization.yaml @@ -0,0 +1,5 @@ +# Overlay webfuse-helm Kustomization +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ../../../../../../../../../src/clusters/main/apps/webfuse/kustomize/webfuse-helm/kustomize diff --git a/tests/clusters/ci/main/apps/webfuse/kustomize/webfuse-helm/webfuse-helm.yaml b/tests/clusters/ci/main/apps/webfuse/kustomize/webfuse-helm/webfuse-helm.yaml new file mode 100644 index 0000000..5079069 --- /dev/null +++ b/tests/clusters/ci/main/apps/webfuse/kustomize/webfuse-helm/webfuse-helm.yaml @@ -0,0 +1,13 @@ +# Create webfuse-helm Kustomization +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: webfuse-helm +spec: + # Path inside repository to a directory containing Kustomization files + path: tests/clusters/ci/main/apps/webfuse/kustomize/webfuse-helm/kustomize + dependsOn: + # Deploy namespace first + - name: webfuse-namespace + # This key always needs to be here for patching to work + patches: [] diff --git a/tests/clusters/ci/main/apps/webfuse/kustomize/webfuse-namespace/kustomize/kustomization.yaml b/tests/clusters/ci/main/apps/webfuse/kustomize/webfuse-namespace/kustomize/kustomization.yaml new file mode 100644 index 0000000..7ae2390 --- /dev/null +++ b/tests/clusters/ci/main/apps/webfuse/kustomize/webfuse-namespace/kustomize/kustomization.yaml @@ -0,0 +1,5 @@ +# Overlay webfuse-namespace Kustomization +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ../../../../../../../../../src/clusters/main/apps/webfuse/kustomize/webfuse-namespace/kustomize diff --git a/tests/clusters/ci/main/apps/webfuse/kustomize/webfuse-namespace/webfuse-namespace.yaml b/tests/clusters/ci/main/apps/webfuse/kustomize/webfuse-namespace/webfuse-namespace.yaml new file mode 100644 index 0000000..28a04ab --- /dev/null +++ b/tests/clusters/ci/main/apps/webfuse/kustomize/webfuse-namespace/webfuse-namespace.yaml @@ -0,0 +1,10 @@ +# Create webfuse-namespace Kustomization +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: webfuse-namespace +spec: + # Path inside repository to a directory containing Kustomization files + path: tests/clusters/ci/main/apps/webfuse/kustomize/webfuse-namespace/kustomize + # This key always needs to be here for patching to work + patches: [] diff --git a/tests/clusters/ci/main/apps/webfuse/kustomize/webfuse-traefik/kustomize/kustomization.yaml b/tests/clusters/ci/main/apps/webfuse/kustomize/webfuse-traefik/kustomize/kustomization.yaml new file mode 100644 index 0000000..4283602 --- /dev/null +++ b/tests/clusters/ci/main/apps/webfuse/kustomize/webfuse-traefik/kustomize/kustomization.yaml @@ -0,0 +1,5 @@ +# Overlay webfuse-traefik Kustomization +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ../../../../../../../../../src/clusters/main/apps/webfuse/kustomize/webfuse-traefik/kustomize diff --git a/tests/clusters/ci/main/apps/webfuse/kustomize/webfuse-traefik/webfuse-traefik.yaml b/tests/clusters/ci/main/apps/webfuse/kustomize/webfuse-traefik/webfuse-traefik.yaml new file mode 100644 index 0000000..7b11412 --- /dev/null +++ b/tests/clusters/ci/main/apps/webfuse/kustomize/webfuse-traefik/webfuse-traefik.yaml @@ -0,0 +1,13 @@ +# Create webfuse-traefik Kustomization +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: webfuse-traefik +spec: + # Path inside repository to a directory containing Kustomization files + path: tests/clusters/ci/main/apps/webfuse/kustomize/webfuse-traefik/kustomize + dependsOn: + # Deploy Helm release first + - name: webfuse-helm + # This key always needs to be here for patching to work + patches: [] diff --git a/tests/clusters/ci/main/apps/webfuse/webfuse.yaml b/tests/clusters/ci/main/apps/webfuse/webfuse.yaml new file mode 100644 index 0000000..794c408 --- /dev/null +++ b/tests/clusters/ci/main/apps/webfuse/webfuse.yaml @@ -0,0 +1,25 @@ +# Create webfuse Kustomization +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: webfuse +spec: + # Path inside repository to a directory containing Kustomization files + path: tests/clusters/ci/main/apps/webfuse/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: webfuse