feat(gitops): add frontend apps and argocd applications

This commit is contained in:
Ashwin Kumar 2026-03-11 02:35:05 +01:00
parent ea0fae89d6
commit 8eec430997
20 changed files with 309 additions and 0 deletions

View file

@ -0,0 +1,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: nxtgauge-admin-frontend-config
namespace: nxtgauge
data:
NODE_ENV: "production"
PORT: "3000"
NEXT_PUBLIC_API_URL: "https://api.nxtgauge.com/api"

View file

@ -0,0 +1,52 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: nxtgauge-admin-frontend
namespace: nxtgauge
labels:
app: nxtgauge-admin-frontend
spec:
replicas: 1
selector:
matchLabels:
app: nxtgauge-admin-frontend
template:
metadata:
labels:
app: nxtgauge-admin-frontend
spec:
containers:
- name: admin-frontend
image: ghcr.io/traceworks2023/nxtgauge-nov-2025-frontend
imagePullPolicy: Always
ports:
- containerPort: 3000
name: http
envFrom:
- configMapRef:
name: nxtgauge-admin-frontend-config
- secretRef:
name: nxtgauge-admin-frontend-secrets
readinessProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 3
failureThreshold: 3
livenessProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 20
periodSeconds: 20
timeoutSeconds: 3
failureThreshold: 3
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi

View file

@ -0,0 +1,18 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: nxtgauge-admin-frontend
namespace: nxtgauge
spec:
ingressClassName: traefik
rules:
- host: admin.nxtgauge.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: nxtgauge-admin-frontend
port:
number: 80

View file

@ -0,0 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- configmap.yaml
- secret.yaml
- deployment.yaml
- service.yaml
- ingress.yaml

View file

@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: nxtgauge

View file

@ -0,0 +1,14 @@
apiVersion: v1
kind: Secret
metadata:
name: nxtgauge-admin-frontend-secrets
namespace: nxtgauge
type: Opaque
stringData:
MAIL_FROM: "REPLACE_ME"
MAIL_SMTP_HOST: "REPLACE_ME"
MAIL_SMTP_PORT: "587"
MAIL_SMTP_SECURE: "false"
MAIL_SMTP_STARTTLS: "true"
MAIL_SMTP_USER: "REPLACE_ME"
MAIL_SMTP_PASS: "REPLACE_ME"

View file

@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: nxtgauge-admin-frontend
namespace: nxtgauge
labels:
app: nxtgauge-admin-frontend
spec:
type: ClusterIP
selector:
app: nxtgauge-admin-frontend
ports:
- name: http
port: 80
targetPort: 3000
protocol: TCP

View file

@ -0,0 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base
patchesStrategicMerge:
- replicas-patch.yaml
images:
- name: ghcr.io/traceworks2023/nxtgauge-nov-2025-frontend
newTag: testingcodex-latest

View file

@ -0,0 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: nxtgauge-admin-frontend
namespace: nxtgauge
spec:
replicas: 1

View file

@ -0,0 +1,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: nxtgauge-frontendwebsite-config
namespace: nxtgauge
data:
NODE_ENV: "production"
PORT: "3000"
NEXT_PUBLIC_API_URL: "https://api.nxtgauge.com/api"

View file

@ -0,0 +1,52 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: nxtgauge-frontendwebsite
namespace: nxtgauge
labels:
app: nxtgauge-frontendwebsite
spec:
replicas: 1
selector:
matchLabels:
app: nxtgauge-frontendwebsite
template:
metadata:
labels:
app: nxtgauge-frontendwebsite
spec:
containers:
- name: frontendwebsite
image: ghcr.io/traceworks2023/nxtgauge-frontendwebsite
imagePullPolicy: Always
ports:
- containerPort: 3000
name: http
envFrom:
- configMapRef:
name: nxtgauge-frontendwebsite-config
- secretRef:
name: nxtgauge-frontendwebsite-secrets
readinessProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 3
failureThreshold: 3
livenessProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 20
periodSeconds: 20
timeoutSeconds: 3
failureThreshold: 3
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi

View file

@ -0,0 +1,18 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: nxtgauge-frontendwebsite
namespace: nxtgauge
spec:
ingressClassName: traefik
rules:
- host: test121.nxtgauge.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: nxtgauge-frontendwebsite
port:
number: 80

View file

@ -0,0 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- configmap.yaml
- secret.yaml
- deployment.yaml
- service.yaml
- ingress.yaml

View file

@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: nxtgauge

View file

@ -0,0 +1,7 @@
apiVersion: v1
kind: Secret
metadata:
name: nxtgauge-frontendwebsite-secrets
namespace: nxtgauge
type: Opaque
stringData: {}

View file

@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: nxtgauge-frontendwebsite
namespace: nxtgauge
labels:
app: nxtgauge-frontendwebsite
spec:
type: ClusterIP
selector:
app: nxtgauge-frontendwebsite
ports:
- name: http
port: 80
targetPort: 3000
protocol: TCP

View file

@ -0,0 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base
patchesStrategicMerge:
- replicas-patch.yaml
images:
- name: ghcr.io/traceworks2023/nxtgauge-frontendwebsite
newTag: testingcodex-latest

View file

@ -0,0 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: nxtgauge-frontendwebsite
namespace: nxtgauge
spec:
replicas: 1

View file

@ -0,0 +1,20 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: nxtgauge-admin-frontend
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/Traceworks2023/nxtgauge-gitops.git
targetRevision: main
path: apps/nxtgauge-admin-frontend/overlays/prod
destination:
server: https://kubernetes.default.svc
namespace: nxtgauge
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true

View file

@ -0,0 +1,20 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: nxtgauge-frontendwebsite
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/Traceworks2023/nxtgauge-gitops.git
targetRevision: main
path: apps/nxtgauge-frontendwebsite/overlays/prod
destination:
server: https://kubernetes.default.svc
namespace: nxtgauge
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true