.
This commit is contained in:
16
app-of-apps/rallly.yaml
Normal file
16
app-of-apps/rallly.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: rallly
|
||||
namespace: argocd
|
||||
finalizers:
|
||||
- resources-finalizer.argocd.argoproj.io
|
||||
spec:
|
||||
destination:
|
||||
namespace: rallly
|
||||
server: https://kubernetes.default.svc
|
||||
project: default
|
||||
source:
|
||||
path: rallly
|
||||
repoURL: http://gitea.gitea.svc.k8s.undercloud.local:3000/Undercloud/k8s-apps.git
|
||||
targetRevision: HEAD
|
||||
5
rallly/README.md
Normal file
5
rallly/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# Rally
|
||||
## Schedule Appintments
|
||||
|
||||
ToDo:
|
||||
email implemantation
|
||||
168
rallly/db.yaml
Normal file
168
rallly/db.yaml
Normal file
@@ -0,0 +1,168 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: db
|
||||
namespace: rallly
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 8Gi
|
||||
storageClassName: cephfs-hyper
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: db
|
||||
namespace: rallly
|
||||
labels:
|
||||
app: db
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: db
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: db
|
||||
spec:
|
||||
containers:
|
||||
- name: db
|
||||
image: postgres
|
||||
imagePullPolicy: "IfNotPresent"
|
||||
ports:
|
||||
- name: mysql
|
||||
containerPort: 5432
|
||||
env:
|
||||
- name: MARIADB_ROOT_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: rallly-db
|
||||
key: root.pw
|
||||
- name: POSTGRES_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: rallly-db
|
||||
key: username
|
||||
optional: false
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: rallly-db
|
||||
key: user.pw
|
||||
optional: false
|
||||
- name: POSTGRES_DB
|
||||
value: rallly
|
||||
- name: POSTGRES_INITDB_ARGS
|
||||
value: "--lc-collate=C --lc-ctype=C --encoding=UTF8"
|
||||
#livenessProbe:
|
||||
# exec:
|
||||
# command: ["sh", "-c", "exec mysqladmin status -uroot -p$MARIADB_ROOT_PASSWORD"]
|
||||
# initialDelaySeconds: 120
|
||||
# periodSeconds: 10
|
||||
# timeoutSeconds: 1
|
||||
# successThreshold: 1
|
||||
# failureThreshold: 3
|
||||
#readinessProbe:
|
||||
# exec:
|
||||
# command: ["sh", "-c", "exec mysqladmin status -uroot -p$MARIADB_ROOT_PASSWORD"]
|
||||
# initialDelaySeconds: 30
|
||||
# periodSeconds: 10
|
||||
# timeoutSeconds: 1
|
||||
# successThreshold: 1
|
||||
# failureThreshold: 3
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/postgresql
|
||||
name: data
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: db
|
||||
readOnly: false
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: db
|
||||
namespace: rallly
|
||||
spec:
|
||||
internalTrafficPolicy: Cluster
|
||||
ipFamilies:
|
||||
- IPv6
|
||||
ipFamilyPolicy: SingleStack
|
||||
ports:
|
||||
- name: postgres
|
||||
port: 5432
|
||||
protocol: TCP
|
||||
targetPort: 5432
|
||||
selector:
|
||||
app: db
|
||||
sessionAffinity: None
|
||||
type: ClusterIP
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: db-backup
|
||||
namespace: rallly
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 4Gi
|
||||
storageClassName: cephfs-hyper
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: db-backup
|
||||
namespace: rallly
|
||||
labels:
|
||||
app: db-backup
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: db-backup
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: db-backup
|
||||
spec:
|
||||
containers:
|
||||
- name: db-backup
|
||||
image: prodrigestivill/postgres-backup-local
|
||||
imagePullPolicy: "IfNotPresent"
|
||||
env:
|
||||
- name: SCHEDULE
|
||||
value: "@daily"
|
||||
- name: BACKUP_KEEP_DAYS
|
||||
value: "7"
|
||||
- name: POSTGRES_DB
|
||||
value: "rallly"
|
||||
- name: POSTGRES_HOST
|
||||
value: db
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: rallly-db
|
||||
key: root.pw
|
||||
- name: POSTGRES_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: rallly-db
|
||||
key: username
|
||||
optional: false
|
||||
- name: HEALTHCHECK_PORT
|
||||
value: "8080"
|
||||
volumeMounts:
|
||||
- mountPath: /backups
|
||||
name: backup
|
||||
volumes:
|
||||
- name: backup
|
||||
persistentVolumeClaim:
|
||||
claimName: db-backup
|
||||
readOnly: false
|
||||
4
rallly/namespace.yaml
Normal file
4
rallly/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: rallly
|
||||
99
rallly/rallly.yaml
Normal file
99
rallly/rallly.yaml
Normal file
@@ -0,0 +1,99 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: data
|
||||
namespace: rallly
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 8Gi
|
||||
storageClassName: cephfs-hyper
|
||||
---
|
||||
|
||||
|
||||
environment:
|
||||
DATABASE_URL: "postgres://postgres:${POSTGRES_PASSWORD}@db:5432/rallly"
|
||||
SECRET_PASSWORD: "${SECRET_PASSWORD}"
|
||||
NEXT_PUBLIC_BASE_URL: "${NEXT_PUBLIC_BASE_URL}"
|
||||
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: rallly
|
||||
namespace: rallly
|
||||
labels:
|
||||
app: rallly
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: rallly
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: rallly
|
||||
spec:
|
||||
containers:
|
||||
- name: rallly
|
||||
image: lukevella/rallly:latest
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
env:
|
||||
- name: rallly_ADMIN_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: rallly-user
|
||||
key: username
|
||||
optional: false
|
||||
- name: rallly_ADMIN_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: rallly-user
|
||||
key: pw
|
||||
optional: false
|
||||
- name: DATABASE_URL
|
||||
value: "postgres://db:@db:5432/rallly"
|
||||
- name: SECRET_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: rallly-db
|
||||
key: user.pw
|
||||
optional: false
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: rallly-db
|
||||
key: user.pw
|
||||
optional: false
|
||||
- name: NEXT_PUBLIC_BASE_URL
|
||||
value: "https://rallly.apps.undercloud.dev"
|
||||
- name: SUPPORT_EMAIL
|
||||
value: "thrawn235@gmail.com"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: rallly
|
||||
namespace: rallly
|
||||
labels:
|
||||
app: rallly
|
||||
spec:
|
||||
internalTrafficPolicy: Cluster
|
||||
ipFamilies:
|
||||
- IPv4
|
||||
- IPv6
|
||||
ipFamilyPolicy: PreferDualStack
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 3000
|
||||
selector:
|
||||
app: rallly
|
||||
sessionAffinity: None
|
||||
type: ClusterIP
|
||||
---
|
||||
11
rallly/secrets.yaml
Normal file
11
rallly/secrets.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: rallly-db
|
||||
namespace: rallly
|
||||
type: Opaque
|
||||
data:
|
||||
root.pw: cGFwZXJsZXNzREJSb290UFc=
|
||||
username: cGFwZXJsZXNz
|
||||
user.pw: cGFwZXJsZXNzREJQYXBlcmxlc3NQVw==
|
||||
---
|
||||
Reference in New Issue
Block a user