init
This commit is contained in:
24
template-postgres/.helmignore
Normal file
24
template-postgres/.helmignore
Normal file
@ -0,0 +1,24 @@
|
||||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
node_modules/
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
6
template-postgres/Chart.yaml
Normal file
6
template-postgres/Chart.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
apiVersion: v2
|
||||
name: template-postgres
|
||||
description: Template helm chart for a postgres-database
|
||||
type: application
|
||||
version: 0.1.0
|
||||
appVersion: "0.0.1"
|
30
template-postgres/templates/deployment.yaml
Normal file
30
template-postgres/templates/deployment.yaml
Normal file
@ -0,0 +1,30 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Values.database.name }}
|
||||
labels:
|
||||
app: {{ .Values.database.name }}
|
||||
spec:
|
||||
replicas: {{ .Values.container.replicas }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ .Values.database.name }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ .Values.database.name }}
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ .Values.database.name }}
|
||||
image: bitnami/postgresql:latest
|
||||
ports:
|
||||
containerPort: 5432
|
||||
volumeMounts:
|
||||
- mountPath: /bitnami/postgresql
|
||||
env:
|
||||
- name: POSTGRESQL_USERNAME
|
||||
value: {{ .Values.database.auth.user }}
|
||||
- name: POSTGRESQL_PASSWORD
|
||||
value: {{ .Values.database.auth.password }}
|
||||
- name: POSTGRESQL_DATABASE
|
||||
value: {{ .Values.database.createdDatabase }}
|
14
template-postgres/templates/persistent-volume.yaml
Normal file
14
template-postgres/templates/persistent-volume.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: {{ .Values.database.name }}-pv
|
||||
labels:
|
||||
type: local
|
||||
spec:
|
||||
storageClassName: manual
|
||||
capacity:
|
||||
storage: {{ .Values.database.size }}
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
hostPath:
|
||||
path: {{ .Values.database.mountPath }}
|
11
template-postgres/templates/persistent-volumes-claim.yaml
Normal file
11
template-postgres/templates/persistent-volumes-claim.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ .Values.database.name }}-pvc
|
||||
spec:
|
||||
storageClassName: manual
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.database.size }}
|
10
template-postgres/values.yaml
Normal file
10
template-postgres/values.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
container:
|
||||
replicas: 1
|
||||
database:
|
||||
createdDatabase: postgres
|
||||
name: template-postgres
|
||||
mountPath: /mnt/postgres/data
|
||||
size: 10Gi
|
||||
auth:
|
||||
user: postgres
|
||||
password: super
|
Reference in New Issue
Block a user