diff --git a/flux/air-quality/externalsecret.yaml b/flux/air-quality/externalsecret.yaml new file mode 100644 index 0000000..33c66e2 --- /dev/null +++ b/flux/air-quality/externalsecret.yaml @@ -0,0 +1,29 @@ +# Placeholder: inject the RapidAPI Proxy Secret here once ESO is deployed. +# Replace with a real ExternalSecret once leeworks-agents/api-company#2 and +# the external-secrets operator are running in the cluster. +# +# Example (uncomment and fill in secretStore name): +# +# apiVersion: external-secrets.io/v1beta1 +# kind: ExternalSecret +# metadata: +# name: rapidapi-proxy-secret +# namespace: air-quality +# spec: +# refreshInterval: 1h +# secretStoreRef: +# name: +# kind: ClusterSecretStore +# target: +# name: rapidapi-proxy-secret +# creationPolicy: Owner +# data: +# - secretKey: X-RapidAPI-Proxy-Secret +# remoteRef: +# key: rapidapi/air-quality +# property: proxy-secret +# +# Until then, create manually: +# kubectl create secret generic rapidapi-proxy-secret \ +# --from-literal=X-RapidAPI-Proxy-Secret= \ +# -n air-quality diff --git a/flux/air-quality/helmrelease.yaml b/flux/air-quality/helmrelease.yaml new file mode 100644 index 0000000..128be9a --- /dev/null +++ b/flux/air-quality/helmrelease.yaml @@ -0,0 +1,101 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: air-quality + namespace: air-quality +spec: + interval: 10m + chart: + spec: + chart: raw + version: ">=0.2.0" + sourceRef: + kind: HelmRepository + name: bedag + namespace: flux-system + interval: 60m + values: + resources: + - apiVersion: apps/v1 + kind: Deployment + metadata: + name: air-quality + namespace: air-quality + spec: + replicas: 1 + selector: + matchLabels: + app: air-quality + template: + metadata: + labels: + app: air-quality + spec: + imagePullSecrets: + - name: gitea-registry + containers: + - name: air-quality + image: registry.leeworks.dev/air-quality/server:latest + ports: + - containerPort: 3000 + env: + - name: RAPIDAPI_PROXY_SECRET + valueFrom: + secretKeyRef: + name: rapidapi-proxy-secret + key: X-RapidAPI-Proxy-Secret + resources: + requests: + cpu: 50m + memory: 128Mi + limits: + cpu: 500m + memory: 256Mi + livenessProbe: + httpGet: + path: /health + port: 3000 + initialDelaySeconds: 10 + periodSeconds: 30 + readinessProbe: + httpGet: + path: /health + port: 3000 + initialDelaySeconds: 5 + periodSeconds: 10 + - apiVersion: v1 + kind: Service + metadata: + name: air-quality + namespace: air-quality + spec: + selector: + app: air-quality + ports: + - port: 80 + targetPort: 3000 + - apiVersion: networking.k8s.io/v1 + kind: Ingress + metadata: + name: air-quality + namespace: air-quality + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + nginx.ingress.kubernetes.io/ssl-redirect: "true" + spec: + ingressClassName: nginx + tls: + - hosts: + - aqi.leeworks.dev + secretName: air-quality-tls + rules: + - host: aqi.leeworks.dev + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: air-quality + port: + number: 80 diff --git a/flux/air-quality/kustomization.yaml b/flux/air-quality/kustomization.yaml new file mode 100644 index 0000000..7ca00db --- /dev/null +++ b/flux/air-quality/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - namespace.yaml + - externalsecret.yaml + - helmrelease.yaml diff --git a/flux/air-quality/namespace.yaml b/flux/air-quality/namespace.yaml new file mode 100644 index 0000000..0dbbc4d --- /dev/null +++ b/flux/air-quality/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: air-quality diff --git a/flux/holidays/externalsecret.yaml b/flux/holidays/externalsecret.yaml new file mode 100644 index 0000000..469880e --- /dev/null +++ b/flux/holidays/externalsecret.yaml @@ -0,0 +1,29 @@ +# Placeholder: inject the RapidAPI Proxy Secret here once ESO is deployed. +# Replace with a real ExternalSecret once leeworks-agents/api-company#2 and +# the external-secrets operator are running in the cluster. +# +# Example (uncomment and fill in secretStore name): +# +# apiVersion: external-secrets.io/v1beta1 +# kind: ExternalSecret +# metadata: +# name: rapidapi-proxy-secret +# namespace: holidays +# spec: +# refreshInterval: 1h +# secretStoreRef: +# name: +# kind: ClusterSecretStore +# target: +# name: rapidapi-proxy-secret +# creationPolicy: Owner +# data: +# - secretKey: X-RapidAPI-Proxy-Secret +# remoteRef: +# key: rapidapi/holidays +# property: proxy-secret +# +# Until then, create manually: +# kubectl create secret generic rapidapi-proxy-secret \ +# --from-literal=X-RapidAPI-Proxy-Secret= \ +# -n holidays diff --git a/flux/holidays/helmrelease.yaml b/flux/holidays/helmrelease.yaml new file mode 100644 index 0000000..35c48ba --- /dev/null +++ b/flux/holidays/helmrelease.yaml @@ -0,0 +1,101 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: holidays + namespace: holidays +spec: + interval: 10m + chart: + spec: + chart: raw + version: ">=0.2.0" + sourceRef: + kind: HelmRepository + name: bedag + namespace: flux-system + interval: 60m + values: + resources: + - apiVersion: apps/v1 + kind: Deployment + metadata: + name: holidays + namespace: holidays + spec: + replicas: 1 + selector: + matchLabels: + app: holidays + template: + metadata: + labels: + app: holidays + spec: + imagePullSecrets: + - name: gitea-registry + containers: + - name: holidays + image: registry.leeworks.dev/holidays/server:latest + ports: + - containerPort: 3000 + env: + - name: RAPIDAPI_PROXY_SECRET + valueFrom: + secretKeyRef: + name: rapidapi-proxy-secret + key: X-RapidAPI-Proxy-Secret + resources: + requests: + cpu: 50m + memory: 128Mi + limits: + cpu: 500m + memory: 256Mi + livenessProbe: + httpGet: + path: /health + port: 3000 + initialDelaySeconds: 10 + periodSeconds: 30 + readinessProbe: + httpGet: + path: /health + port: 3000 + initialDelaySeconds: 5 + periodSeconds: 10 + - apiVersion: v1 + kind: Service + metadata: + name: holidays + namespace: holidays + spec: + selector: + app: holidays + ports: + - port: 80 + targetPort: 3000 + - apiVersion: networking.k8s.io/v1 + kind: Ingress + metadata: + name: holidays + namespace: holidays + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + nginx.ingress.kubernetes.io/ssl-redirect: "true" + spec: + ingressClassName: nginx + tls: + - hosts: + - holidays.leeworks.dev + secretName: holidays-tls + rules: + - host: holidays.leeworks.dev + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: holidays + port: + number: 80 diff --git a/flux/holidays/kustomization.yaml b/flux/holidays/kustomization.yaml new file mode 100644 index 0000000..7ca00db --- /dev/null +++ b/flux/holidays/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - namespace.yaml + - externalsecret.yaml + - helmrelease.yaml diff --git a/flux/holidays/namespace.yaml b/flux/holidays/namespace.yaml new file mode 100644 index 0000000..728de59 --- /dev/null +++ b/flux/holidays/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: holidays diff --git a/flux/kustomization.yaml b/flux/kustomization.yaml index 42fec49..b5db76d 100644 --- a/flux/kustomization.yaml +++ b/flux/kustomization.yaml @@ -4,3 +4,6 @@ resources: - gitea-runner - monitoring - docs-site + - zip-enrichment + - holidays + - air-quality diff --git a/flux/zip-enrichment/externalsecret.yaml b/flux/zip-enrichment/externalsecret.yaml new file mode 100644 index 0000000..fcd86a3 --- /dev/null +++ b/flux/zip-enrichment/externalsecret.yaml @@ -0,0 +1,29 @@ +# Placeholder: inject the RapidAPI Proxy Secret here once ESO is deployed. +# Replace with a real ExternalSecret once leeworks-agents/api-company#2 and +# the external-secrets operator are running in the cluster. +# +# Example (uncomment and fill in secretStore name): +# +# apiVersion: external-secrets.io/v1beta1 +# kind: ExternalSecret +# metadata: +# name: rapidapi-proxy-secret +# namespace: zip-enrichment +# spec: +# refreshInterval: 1h +# secretStoreRef: +# name: +# kind: ClusterSecretStore +# target: +# name: rapidapi-proxy-secret +# creationPolicy: Owner +# data: +# - secretKey: X-RapidAPI-Proxy-Secret +# remoteRef: +# key: rapidapi/zip-enrichment +# property: proxy-secret +# +# Until then, create manually: +# kubectl create secret generic rapidapi-proxy-secret \ +# --from-literal=X-RapidAPI-Proxy-Secret= \ +# -n zip-enrichment diff --git a/flux/zip-enrichment/helmrelease.yaml b/flux/zip-enrichment/helmrelease.yaml new file mode 100644 index 0000000..7bf2698 --- /dev/null +++ b/flux/zip-enrichment/helmrelease.yaml @@ -0,0 +1,101 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: zip-enrichment + namespace: zip-enrichment +spec: + interval: 10m + chart: + spec: + chart: raw + version: ">=0.2.0" + sourceRef: + kind: HelmRepository + name: bedag + namespace: flux-system + interval: 60m + values: + resources: + - apiVersion: apps/v1 + kind: Deployment + metadata: + name: zip-enrichment + namespace: zip-enrichment + spec: + replicas: 1 + selector: + matchLabels: + app: zip-enrichment + template: + metadata: + labels: + app: zip-enrichment + spec: + imagePullSecrets: + - name: gitea-registry + containers: + - name: zip-enrichment + image: registry.leeworks.dev/zip-enrichment/server:latest + ports: + - containerPort: 3000 + env: + - name: RAPIDAPI_PROXY_SECRET + valueFrom: + secretKeyRef: + name: rapidapi-proxy-secret + key: X-RapidAPI-Proxy-Secret + resources: + requests: + cpu: 50m + memory: 128Mi + limits: + cpu: 500m + memory: 256Mi + livenessProbe: + httpGet: + path: /health + port: 3000 + initialDelaySeconds: 10 + periodSeconds: 30 + readinessProbe: + httpGet: + path: /health + port: 3000 + initialDelaySeconds: 5 + periodSeconds: 10 + - apiVersion: v1 + kind: Service + metadata: + name: zip-enrichment + namespace: zip-enrichment + spec: + selector: + app: zip-enrichment + ports: + - port: 80 + targetPort: 3000 + - apiVersion: networking.k8s.io/v1 + kind: Ingress + metadata: + name: zip-enrichment + namespace: zip-enrichment + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + nginx.ingress.kubernetes.io/ssl-redirect: "true" + spec: + ingressClassName: nginx + tls: + - hosts: + - zip.leeworks.dev + secretName: zip-enrichment-tls + rules: + - host: zip.leeworks.dev + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: zip-enrichment + port: + number: 80 diff --git a/flux/zip-enrichment/kustomization.yaml b/flux/zip-enrichment/kustomization.yaml new file mode 100644 index 0000000..7ca00db --- /dev/null +++ b/flux/zip-enrichment/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - namespace.yaml + - externalsecret.yaml + - helmrelease.yaml diff --git a/flux/zip-enrichment/namespace.yaml b/flux/zip-enrichment/namespace.yaml new file mode 100644 index 0000000..2f3d29c --- /dev/null +++ b/flux/zip-enrichment/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: zip-enrichment