-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
trying postgres normally for coder-db
- Loading branch information
1 parent
3869038
commit f59b583
Showing
7 changed files
with
96 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: &app <chart name> | ||
namespace: &ns <namespace> | ||
name: &chart-name coder-db | ||
namespace: argocd | ||
spec: | ||
project: default | ||
source: | ||
chart: *chart-name | ||
repoURL: https://charts.bitnami.com/bitnami | ||
targetRevision: 15.5.17 | ||
helm: | ||
valuesObject: | ||
# auth: | ||
# username: coder | ||
# password: coder | ||
# database: coder | ||
# persistence: | ||
# size: 10Gi | ||
destination: | ||
server: "https://kubernetes.default.svc" | ||
namespace: *ns | ||
sources: | ||
- repoURL: <chart repo url> | ||
targetRevision: <chart version> | ||
chart: *app | ||
helm: | ||
valueFiles: | ||
- $values/kubernetes/registry/helm/<directory storing helm app>/values.yaml | ||
- repoURL: https://github.com/mrpbennett/home-ops.git | ||
targetRevision: HEAD | ||
ref: values | ||
namespace: coder | ||
syncPolicy: | ||
automated: | ||
prune: true | ||
selfHeal: true | ||
syncOptions: | ||
- CreateNamespace=true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: coder-db-configmap | ||
labels: | ||
app: coder-db | ||
data: | ||
POSTGRES_DB: coder | ||
POSTGRES_USER: coder | ||
POSTGRES_PASSWORD: coder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: coder-db-deployment | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: coder-db | ||
template: | ||
metadata: | ||
labels: | ||
app: coder-db | ||
spec: | ||
containers: | ||
- name: postgres | ||
image: "postgres:16" | ||
imagePullPolicy: IfNotPresent | ||
ports: | ||
- containerPort: 5432 | ||
envFrom: | ||
- configMapRef: | ||
name: coder-db-configmap | ||
env: | ||
- name: PGDATA | ||
value: /var/lib/postgresql/data/pgdata | ||
volumeMounts: | ||
- mountPath: /var/lib/postgresql/data | ||
name: coder-db-data | ||
volumes: | ||
- name: coder-db-data | ||
persistentVolumeClaim: | ||
claimName: coder-db-pvc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolume | ||
metadata: | ||
name: coder-db-pv | ||
labels: | ||
type: local | ||
app: coder | ||
spec: | ||
capacity: | ||
storage: 10Gi | ||
accessModes: | ||
- ReadWriteMany | ||
hostPath: | ||
path: /mnt/storage/coder-db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: coder-db-pvc | ||
labels: | ||
app: coder | ||
spec: | ||
accessModes: | ||
- ReadWriteMany | ||
resources: | ||
requests: | ||
storage: 10Gi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: coder-db-svc | ||
labels: | ||
app: coder | ||
spec: | ||
type: LoadBalancer | ||
ports: | ||
- port: 5432 | ||
selector: | ||
app: coder |