Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions services/cert-manager/01-cluster-issuer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions services/cluster-secret/01-harbor-pull-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ matchNamespace:
- sinf-website
- tts
- tts-staging
- website-ae
- inicio
- inicio-staging
- niddle-staging
- teup-website
data:
.dockerconfigjson: <FILL-IN>
8 changes: 7 additions & 1 deletion services/databases/postgresql/cnpg-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ spec:
login: true
passwordSecret:
name: website-ae-secret
- name: teup
ensure: present
createdb: false
login: true
passwordSecret:
name: teup-secret
- name: inicio
ensure: present
createdb: false
Expand All @@ -59,7 +65,7 @@ spec:
name: inicio-staging-secret

storage:
size: 20Gi
size: 40Gi
#backups are handled by cloudnative postgres
storageClass: longhorn-strict-local-no-backup

Expand Down
10 changes: 10 additions & 0 deletions services/databases/postgresql/cnpg-secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ metadata:
type: kubernetes.io/basic-auth
---
apiVersion: v1
stringData:
password: <FILL-IN>
username: teup
kind: Secret
metadata:
name: teup-secret
namespace: pg
type: kubernetes.io/basic-auth
---
apiVersion: v1
stringData:
password: <FILL-IN>
username: website-ae
Expand Down
5 changes: 5 additions & 0 deletions services/teup/website/00-namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: teup-website
12 changes: 12 additions & 0 deletions services/teup/website/01-volume-claims.yaml
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions services/teup/website/02-secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
apiVersion: v1
kind: Secret
metadata:
name: teup-website-env
namespace: teup-website
type: Opaque
stringData:
env: <FILL-IN>
71 changes: 71 additions & 0 deletions services/teup/website/03-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
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
strategy:
type: Recreate
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"
15 changes: 15 additions & 0 deletions services/teup/website/04-certificates.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: teup-website-cert
namespace: teup-website
spec:
secretName: teup-website-cert
issuerRef:
name: letsencrypt-teup
kind: ClusterIssuer
commonName: teup.pt
dnsNames:
- teup.pt
- www.teup.pt
- teup.niaefeup.pt
16 changes: 16 additions & 0 deletions services/teup/website/05-ingress-routes.yaml
Original file line number Diff line number Diff line change
@@ -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.pt`) || Host(`www.teup.pt`) || Host(`teup.niaefeup.pt`)
kind: Rule
services:
- name: teup-website-service
port: 80
tls:
secretName: teup-website-cert
Loading