From 5a5d3a1317d574d4a1bf1d74ebfa765c24bdccd6 Mon Sep 17 00:00:00 2001 From: HenriqueSFernandes Date: Wed, 20 May 2026 00:13:42 +0100 Subject: [PATCH 01/14] added database --- services/databases/postgresql/cnpg-cluster.yaml | 6 ++++++ services/databases/postgresql/cnpg-secrets.yaml | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/services/databases/postgresql/cnpg-cluster.yaml b/services/databases/postgresql/cnpg-cluster.yaml index 205dd46..ef35c98 100644 --- a/services/databases/postgresql/cnpg-cluster.yaml +++ b/services/databases/postgresql/cnpg-cluster.yaml @@ -45,6 +45,12 @@ spec: login: true passwordSecret: name: website-ae-secret + - name: teup + ensure: present + createdb: false + login: true + passwordSecret: + name: teup-secret storage: size: 20Gi diff --git a/services/databases/postgresql/cnpg-secrets.yaml b/services/databases/postgresql/cnpg-secrets.yaml index 9f57c16..a94292b 100644 --- a/services/databases/postgresql/cnpg-secrets.yaml +++ b/services/databases/postgresql/cnpg-secrets.yaml @@ -49,6 +49,16 @@ metadata: type: kubernetes.io/basic-auth --- apiVersion: v1 +stringData: + password: + username: teup +kind: Secret +metadata: + name: teup-secret + namespace: pg +type: kubernetes.io/basic-auth +--- +apiVersion: v1 stringData: password: username: website-ae From dc7c5b498bec9f38fcf5511f7541dd5b879e4cdb Mon Sep 17 00:00:00 2001 From: HenriqueSFernandes Date: Wed, 20 May 2026 00:13:48 +0100 Subject: [PATCH 02/14] created namespace --- services/teup/website/00-namespace.yaml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 services/teup/website/00-namespace.yaml diff --git a/services/teup/website/00-namespace.yaml b/services/teup/website/00-namespace.yaml new file mode 100644 index 0000000..62b1b5d --- /dev/null +++ b/services/teup/website/00-namespace.yaml @@ -0,0 +1,5 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: teup-website From 95202775663ea4a518ff18531fd7290391be92d7 Mon Sep 17 00:00:00 2001 From: HenriqueSFernandes Date: Wed, 20 May 2026 00:13:52 +0100 Subject: [PATCH 03/14] added pvc --- services/teup/website/01-volume-claims.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 services/teup/website/01-volume-claims.yaml diff --git a/services/teup/website/01-volume-claims.yaml b/services/teup/website/01-volume-claims.yaml new file mode 100644 index 0000000..a9ac72b --- /dev/null +++ b/services/teup/website/01-volume-claims.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: teup-images-pvc + namespace: teup-website +spec: + storageClassName: longhorn-locality-no-backup-retain + resources: + requests: + storage: 5Gi + accessModes: + - ReadWriteOnce \ No newline at end of file From a5f8dc43712893ae19b002273cbb05e4e333ecff Mon Sep 17 00:00:00 2001 From: HenriqueSFernandes Date: Wed, 20 May 2026 00:13:55 +0100 Subject: [PATCH 04/14] added secrets --- services/teup/website/02-secrets.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 services/teup/website/02-secrets.yaml diff --git a/services/teup/website/02-secrets.yaml b/services/teup/website/02-secrets.yaml new file mode 100644 index 0000000..834bb7b --- /dev/null +++ b/services/teup/website/02-secrets.yaml @@ -0,0 +1,9 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + name: teup-website-env + namespace: teup-website +type: Opaque +stringData: + env: From 361462c97748a1778b91e260bf5f7cad5b265f29 Mon Sep 17 00:00:00 2001 From: HenriqueSFernandes Date: Wed, 20 May 2026 00:13:58 +0100 Subject: [PATCH 05/14] added deployment --- services/teup/website/03-deployment.yaml | 69 ++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 services/teup/website/03-deployment.yaml diff --git a/services/teup/website/03-deployment.yaml b/services/teup/website/03-deployment.yaml new file mode 100644 index 0000000..3fafb1d --- /dev/null +++ b/services/teup/website/03-deployment.yaml @@ -0,0 +1,69 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: teup-website + namespace: teup-website + annotations: + keel.sh/policy: "force" + keel.sh/match-tag: "true" +spec: + selector: + matchLabels: + app: teup-website + template: + metadata: + labels: + app: teup-website + spec: + containers: + - name: teup-website-frontend + image: registry.niaefeup.pt/teup/website-frontend:main + resources: + limits: + memory: "256Mi" + cpu: "500m" + ports: + - containerPort: 80 + imagePullPolicy: Always + volumeMounts: + - name: teup-images + mountPath: /usr/share/nginx/html/imagens + - name: teup-website-api + image: registry.niaefeup.pt/teup/website-api:master + resources: + limits: + memory: "256Mi" + cpu: "500m" + ports: + - containerPort: 8000 + imagePullPolicy: Always + volumeMounts: + - name: teup-images + mountPath: /app/images + - name: teup-env + mountPath: /app/.env + subPath: env + readOnly: true + volumes: + - name: teup-images + persistentVolumeClaim: + claimName: teup-images-pvc + - name: teup-env + secret: + secretName: teup-website-env + imagePullSecrets: + - name: harbor-pull-secret +--- +apiVersion: v1 +kind: Service +metadata: + name: teup-website-service + namespace: teup-website +spec: + selector: + app: teup-website + ports: + - port: 80 + targetPort: 80 + type: "ClusterIP" From 853d3cb7a942fbc39d56a52d20a294f52913d715 Mon Sep 17 00:00:00 2001 From: HenriqueSFernandes Date: Wed, 20 May 2026 00:14:04 +0100 Subject: [PATCH 06/14] added certificate (temporary) --- services/teup/website/04-certificates.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 services/teup/website/04-certificates.yaml diff --git a/services/teup/website/04-certificates.yaml b/services/teup/website/04-certificates.yaml new file mode 100644 index 0000000..bbc04ac --- /dev/null +++ b/services/teup/website/04-certificates.yaml @@ -0,0 +1,13 @@ +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: teup-website-cert + namespace: teup-website +spec: + secretName: teup-website-cert + issuerRef: + name: letsencrypt-production + kind: ClusterIssuer + commonName: teup.niaefeup.pt + dnsNames: + - teup.niaefeup.pt From 0af932dd820e0ede2e60e9887ad86526547d6b26 Mon Sep 17 00:00:00 2001 From: HenriqueSFernandes Date: Wed, 20 May 2026 00:14:07 +0100 Subject: [PATCH 07/14] added ingress route --- services/teup/website/05-ingress-routes.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 services/teup/website/05-ingress-routes.yaml diff --git a/services/teup/website/05-ingress-routes.yaml b/services/teup/website/05-ingress-routes.yaml new file mode 100644 index 0000000..3a8908f --- /dev/null +++ b/services/teup/website/05-ingress-routes.yaml @@ -0,0 +1,16 @@ +apiVersion: traefik.io/v1alpha1 +kind: IngressRoute +metadata: + name: teup-website-https + namespace: teup-website +spec: + entryPoints: + - websecure + routes: + - match: Host(`teup.niaefeup.pt`) + kind: Rule + services: + - name: teup-website-service + port: 80 + tls: + secretName: teup-website-cert From 2e9271c66440a7ffd344a3b9e0e6e5abb12f7d9c Mon Sep 17 00:00:00 2001 From: HenriqueSFernandes Date: Wed, 20 May 2026 00:43:15 +0100 Subject: [PATCH 08/14] added missing namespaces to harbor pull secret --- services/cluster-secret/01-harbor-pull-secret.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/cluster-secret/01-harbor-pull-secret.yaml b/services/cluster-secret/01-harbor-pull-secret.yaml index 985c0ce..532ecf5 100644 --- a/services/cluster-secret/01-harbor-pull-secret.yaml +++ b/services/cluster-secret/01-harbor-pull-secret.yaml @@ -13,5 +13,9 @@ matchNamespace: - sinf-website - tts - tts-staging + - website-ae + - inicio + - niddle-staging + - teup-website data: .dockerconfigjson: From 7f23b72ee0df894c0089459f11ae2f74289046c8 Mon Sep 17 00:00:00 2001 From: HenriqueSFernandes Date: Thu, 21 May 2026 22:03:50 +0100 Subject: [PATCH 09/14] updated teup website domain --- services/teup/website/04-certificates.yaml | 5 +++-- services/teup/website/05-ingress-routes.yaml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/services/teup/website/04-certificates.yaml b/services/teup/website/04-certificates.yaml index bbc04ac..8048099 100644 --- a/services/teup/website/04-certificates.yaml +++ b/services/teup/website/04-certificates.yaml @@ -8,6 +8,7 @@ spec: issuerRef: name: letsencrypt-production kind: ClusterIssuer - commonName: teup.niaefeup.pt + commonName: teup.pt dnsNames: - - teup.niaefeup.pt + - teup.pt + - www.teup.pt diff --git a/services/teup/website/05-ingress-routes.yaml b/services/teup/website/05-ingress-routes.yaml index 3a8908f..ba22940 100644 --- a/services/teup/website/05-ingress-routes.yaml +++ b/services/teup/website/05-ingress-routes.yaml @@ -7,7 +7,7 @@ spec: entryPoints: - websecure routes: - - match: Host(`teup.niaefeup.pt`) + - match: Host(`teup.pt`) || Host(`www.teup.pt`) kind: Rule services: - name: teup-website-service From cfb109ff2b4e2ad3034d0c42ff9cb09c5e33c196 Mon Sep 17 00:00:00 2001 From: HenriqueSFernandes Date: Thu, 28 May 2026 15:33:09 +0100 Subject: [PATCH 10/14] teup domain rollback --- .../databases/postgresql/cnpg-cluster.yaml | 2 +- "services/pulumi/niployments/\\" | 38 +++++++++++++++++++ services/teup/website/04-certificates.yaml | 5 +-- services/teup/website/05-ingress-routes.yaml | 2 +- 4 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 "services/pulumi/niployments/\\" diff --git a/services/databases/postgresql/cnpg-cluster.yaml b/services/databases/postgresql/cnpg-cluster.yaml index ef35c98..43502a9 100644 --- a/services/databases/postgresql/cnpg-cluster.yaml +++ b/services/databases/postgresql/cnpg-cluster.yaml @@ -53,7 +53,7 @@ spec: name: teup-secret storage: - size: 20Gi + size: 40Gi #backups are handled by cloudnative postgres storageClass: longhorn-strict-local-no-backup diff --git "a/services/pulumi/niployments/\\" "b/services/pulumi/niployments/\\" new file mode 100644 index 0000000..73d6b4b --- /dev/null +++ "b/services/pulumi/niployments/\\" @@ -0,0 +1,38 @@ +import * as k8s from "@pulumi/kubernetes"; +import * as pulumi from "@pulumi/pulumi"; + +const namespace = new k8s.core.v1.Namespace("nfs-provisioner-namespace", { + metadata: { + name: "nfs-provisioner", + }, +}); + +export const chart = new k8s.helm.v4.Chart("nfs-provisioner-chart", { + chart: "nfs-subdir-external-provisioner", + namespace: namespace.metadata.name, + skipAwait: true, + repositoryOpts: { + repo: "https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner", + }, + valueYamlFiles: [ + new pulumi.asset.FileAsset("resources/nfs-provisioner/values.yaml"), + ], + transformations: [ + (obj) => { + if (obj.kind === "StorageClass") { + if (!obj.metadata) { + obj.metadata = {}; + } + if ( + obj.metadata.annotations === undefined || + obj.metadata.annotations === null || + typeof obj.metadata.annotations !== "object" + ) { + console.log("🔧 Fixing invalid annotations on", obj.metadata?.name); + obj.metadata.annotations = {}; + } + } + }, + ], +}); + diff --git a/services/teup/website/04-certificates.yaml b/services/teup/website/04-certificates.yaml index 8048099..bbc04ac 100644 --- a/services/teup/website/04-certificates.yaml +++ b/services/teup/website/04-certificates.yaml @@ -8,7 +8,6 @@ spec: issuerRef: name: letsencrypt-production kind: ClusterIssuer - commonName: teup.pt + commonName: teup.niaefeup.pt dnsNames: - - teup.pt - - www.teup.pt + - teup.niaefeup.pt diff --git a/services/teup/website/05-ingress-routes.yaml b/services/teup/website/05-ingress-routes.yaml index ba22940..3a8908f 100644 --- a/services/teup/website/05-ingress-routes.yaml +++ b/services/teup/website/05-ingress-routes.yaml @@ -7,7 +7,7 @@ spec: entryPoints: - websecure routes: - - match: Host(`teup.pt`) || Host(`www.teup.pt`) + - match: Host(`teup.niaefeup.pt`) kind: Rule services: - name: teup-website-service From 8aa30bfb8afc163c1b3f7d2aec42657b10d7eb40 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Wed, 2 Sep 2026 22:12:44 +0100 Subject: [PATCH 11/14] fix: added recreate to deployment spec --- services/teup/website/03-deployment.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/teup/website/03-deployment.yaml b/services/teup/website/03-deployment.yaml index 3fafb1d..e288032 100644 --- a/services/teup/website/03-deployment.yaml +++ b/services/teup/website/03-deployment.yaml @@ -11,6 +11,8 @@ spec: selector: matchLabels: app: teup-website + strategy: + type: Recreate template: metadata: labels: From 682217e3fec034c560774c60edcd505019413acb Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Wed, 30 Sep 2026 10:34:09 +0100 Subject: [PATCH 12/14] added teup issuer --- services/cert-manager/01-cluster-issuer.yaml | 31 ++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/services/cert-manager/01-cluster-issuer.yaml b/services/cert-manager/01-cluster-issuer.yaml index a7a2605..254fd36 100644 --- a/services/cert-manager/01-cluster-issuer.yaml +++ b/services/cert-manager/01-cluster-issuer.yaml @@ -72,3 +72,34 @@ spec: apiTokenSecretRef: name: cloudflare-api-token-secret key: api-token +--- +apiVersion: cert-manager.io/v1 +kind: ClusterIssuer +metadata: + name: letsencrypt-teup +spec: + acme: + email: ni@aefeup.pt + privateKeySecretRef: + name: letsencrypt-teup + server: https://acme-v02.api.letsencrypt.org/directory + solvers: + - selector: + dnsZones: + - teup.pt + dns01: + cnameStrategy: Follow + cloudflare: + email: ni@aefeup.pt + apiTokenSecretRef: + name: cloudflare-api-token-secret + key: api-token + - selector: + dnsZones: + - niaefeup.pt + dns01: + cloudflare: + email: ni@aefeup.pt + apiTokenSecretRef: + name: cloudflare-api-token-secret + key: api-token From 09f913e6b6e2eca46bba58a6f1da27231f56f4b1 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Wed, 30 Sep 2026 10:34:29 +0100 Subject: [PATCH 13/14] updated teup deployment --- services/teup/website/04-certificates.yaml | 6 ++++-- services/teup/website/05-ingress-routes.yaml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/services/teup/website/04-certificates.yaml b/services/teup/website/04-certificates.yaml index bbc04ac..6a9f887 100644 --- a/services/teup/website/04-certificates.yaml +++ b/services/teup/website/04-certificates.yaml @@ -6,8 +6,10 @@ metadata: spec: secretName: teup-website-cert issuerRef: - name: letsencrypt-production + name: letsencrypt-teup kind: ClusterIssuer - commonName: teup.niaefeup.pt + commonName: teup.pt dnsNames: + - teup.pt + - www.teup.pt - teup.niaefeup.pt diff --git a/services/teup/website/05-ingress-routes.yaml b/services/teup/website/05-ingress-routes.yaml index 3a8908f..b1cd22c 100644 --- a/services/teup/website/05-ingress-routes.yaml +++ b/services/teup/website/05-ingress-routes.yaml @@ -7,7 +7,7 @@ spec: entryPoints: - websecure routes: - - match: Host(`teup.niaefeup.pt`) + - match: Host(`teup.pt`) || Host(`www.teup.pt`) || Host(`teup.niaefeup.pt`) kind: Rule services: - name: teup-website-service From 7b283f6e9b8ebe9cb057cceb3dfae57137522bcd Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Wed, 30 Sep 2026 12:50:52 +0100 Subject: [PATCH 14/14] REMOVED PULUMI FILE --- "services/pulumi/niployments/\\" | 38 -------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 "services/pulumi/niployments/\\" diff --git "a/services/pulumi/niployments/\\" "b/services/pulumi/niployments/\\" deleted file mode 100644 index 73d6b4b..0000000 --- "a/services/pulumi/niployments/\\" +++ /dev/null @@ -1,38 +0,0 @@ -import * as k8s from "@pulumi/kubernetes"; -import * as pulumi from "@pulumi/pulumi"; - -const namespace = new k8s.core.v1.Namespace("nfs-provisioner-namespace", { - metadata: { - name: "nfs-provisioner", - }, -}); - -export const chart = new k8s.helm.v4.Chart("nfs-provisioner-chart", { - chart: "nfs-subdir-external-provisioner", - namespace: namespace.metadata.name, - skipAwait: true, - repositoryOpts: { - repo: "https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner", - }, - valueYamlFiles: [ - new pulumi.asset.FileAsset("resources/nfs-provisioner/values.yaml"), - ], - transformations: [ - (obj) => { - if (obj.kind === "StorageClass") { - if (!obj.metadata) { - obj.metadata = {}; - } - if ( - obj.metadata.annotations === undefined || - obj.metadata.annotations === null || - typeof obj.metadata.annotations !== "object" - ) { - console.log("🔧 Fixing invalid annotations on", obj.metadata?.name); - obj.metadata.annotations = {}; - } - } - }, - ], -}); -