feat(grainlab): Added Staging environment to ArgoCD.
This commit is contained in:
17
clusters/artemis/apps/grainlab-staging/app-project.yaml
Normal file
17
clusters/artemis/apps/grainlab-staging/app-project.yaml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: AppProject
|
||||||
|
metadata:
|
||||||
|
name: grainlab-staging
|
||||||
|
spec:
|
||||||
|
description: GrianLab Staging environment
|
||||||
|
sourceRepos:
|
||||||
|
- '*'
|
||||||
|
sourceNamespaces:
|
||||||
|
- '*'
|
||||||
|
destinations:
|
||||||
|
- namespace: 'grainlab-staging'
|
||||||
|
server: '*'
|
||||||
|
clusterResourceWhitelist:
|
||||||
|
- group: '*'
|
||||||
|
kind: '*'
|
||||||
24
clusters/artemis/apps/grainlab-staging/application.yaml
Normal file
24
clusters/artemis/apps/grainlab-staging/application.yaml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: grainlab-staging
|
||||||
|
namespace: grainlab-staging
|
||||||
|
labels:
|
||||||
|
platform.dgse.cloud/cluster: artemis
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
spec:
|
||||||
|
project: homebox
|
||||||
|
source:
|
||||||
|
repoURL: 'https://git.dgse.cloud/DGSE/kubernetes.git'
|
||||||
|
path: manifests/artemis/grainlab-staging
|
||||||
|
targetRevision: staging
|
||||||
|
destination:
|
||||||
|
namespace: grainlab-staging
|
||||||
|
name: in-cluster
|
||||||
|
syncPolicy:
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- app-project.yaml
|
||||||
|
- application.yaml
|
||||||
@@ -17,3 +17,4 @@ resources:
|
|||||||
- immich
|
- immich
|
||||||
- digital-garden
|
- digital-garden
|
||||||
- homebox
|
- homebox
|
||||||
|
- grainlab-staging
|
||||||
|
|||||||
57
manifests/artemis/grainlab-staging/app-deployment.yaml
Normal file
57
manifests/artemis/grainlab-staging/app-deployment.yaml
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: grainlab
|
||||||
|
namespace: grainlab-staging
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: grainlab
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: grainlab
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: ghcr-cred
|
||||||
|
containers:
|
||||||
|
- name: grainlab
|
||||||
|
image: ghcr.io/daniel-luke/grainlab:staging
|
||||||
|
imagePullPolicy: Always
|
||||||
|
|
||||||
|
ports:
|
||||||
|
- containerPort: 3000
|
||||||
|
env:
|
||||||
|
- name: NODE_ENV
|
||||||
|
value: "production"
|
||||||
|
- name: PORT
|
||||||
|
value: "3000"
|
||||||
|
- name: HOST
|
||||||
|
value: "0.0.0.0"
|
||||||
|
envFrom:
|
||||||
|
- secretRef:
|
||||||
|
name: grainlab-app
|
||||||
|
- secretRef:
|
||||||
|
name: grainlab-database
|
||||||
|
- secretRef:
|
||||||
|
name: grainlab-s3
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: 3000
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 5
|
||||||
|
failureThreshold: 6
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: 3000
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
periodSeconds: 10
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 256Mi
|
||||||
|
limits:
|
||||||
|
memory: 512Mi
|
||||||
24
manifests/artemis/grainlab-staging/app-ingress.yaml
Normal file
24
manifests/artemis/grainlab-staging/app-ingress.yaml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: grainlab
|
||||||
|
namespace: grainlab-staging
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: letsencrypt
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: staging.grainlab.app
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: grainlab
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- staging.grainlab.app
|
||||||
|
secretName: letsencrypt
|
||||||
11
manifests/artemis/grainlab-staging/app-service.yaml
Normal file
11
manifests/artemis/grainlab-staging/app-service.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: grainlab
|
||||||
|
namespace: grainlab-staging
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: grainlab
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 3000
|
||||||
4
manifests/artemis/grainlab-staging/namespace.yaml
Normal file
4
manifests/artemis/grainlab-staging/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: grainlab-staging
|
||||||
24
manifests/artemis/grainlab-staging/postgres-cluster.yaml
Normal file
24
manifests/artemis/grainlab-staging/postgres-cluster.yaml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
|
kind: Cluster
|
||||||
|
metadata:
|
||||||
|
name: grainlab-db
|
||||||
|
namespace: grainlab-staging
|
||||||
|
spec:
|
||||||
|
instances: 1
|
||||||
|
|
||||||
|
bootstrap:
|
||||||
|
initdb:
|
||||||
|
database: grainlab
|
||||||
|
owner: grainlab
|
||||||
|
secret:
|
||||||
|
name: grainlab-db-credentials
|
||||||
|
|
||||||
|
storage:
|
||||||
|
size: 10Gi
|
||||||
|
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 256Mi
|
||||||
|
limits:
|
||||||
|
memory: 512Mi
|
||||||
Reference in New Issue
Block a user