Compare commits
5 Commits
homepage-0
...
postgres-c
Author | SHA1 | Date | |
---|---|---|---|
031b1dec3a | |||
41282e79e8 | |||
ffcaf51b66 | |||
30d69f695c | |||
c5feb14abc |
2
.github/workflows/lint-test.yaml
vendored
2
.github/workflows/lint-test.yaml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Lint and Test Charts
|
||||
name: lint-and-test-charts
|
||||
|
||||
on: pull_request
|
||||
|
||||
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Release Charts
|
||||
name: release-charts
|
||||
|
||||
on:
|
||||
push:
|
||||
|
12
README.md
12
README.md
@@ -1,9 +1,21 @@
|
||||
# Welcome
|
||||
|
||||
Welcome to the documentation for the [alexlebens's Helm charts](https://github.com/alexlebens/helm-charts).
|
||||
|
||||
## Getting started
|
||||
|
||||
[Helm](https://helm.sh) must be installed to use the charts in this repository.
|
||||
|
||||
Refer to Helm's [documentation](https://helm.sh/docs/) to get started.
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
helm repo add alexlebens http://alexlebens.github.io/helm-charts/
|
||||
```
|
||||
|
||||
You can then run `helm search repo alexlebens` to search the charts.
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the terms of the Apache 2.0 License license.
|
@@ -1,6 +1,6 @@
|
||||
apiVersion: v2
|
||||
name: homepage
|
||||
version: 0.0.1
|
||||
version: 0.0.2
|
||||
description: Chart for benphelps homepage
|
||||
keywords:
|
||||
- dashboard
|
||||
|
@@ -40,6 +40,10 @@ spec:
|
||||
- name: {{ $k }}
|
||||
value: {{ $v | quote }}
|
||||
{{- end }}
|
||||
{{- with .Values.deployment.envFrom }}
|
||||
envFrom:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: homepage-config
|
||||
subPath: bookmarks.yaml
|
||||
|
@@ -6,6 +6,7 @@ deployment:
|
||||
tag: v0.8.7
|
||||
imagePullPolicy: IfNotPresent
|
||||
env:
|
||||
envFrom:
|
||||
resources:
|
||||
requests:
|
||||
memory: 50Mi
|
||||
|
13
charts/postgres-cluster/Chart.yaml
Normal file
13
charts/postgres-cluster/Chart.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
apiVersion: v2
|
||||
name: postgres-cluster
|
||||
version: 0.0.2
|
||||
description: Chart for cloudnative-pg cluster
|
||||
keywords:
|
||||
- database
|
||||
- postgres
|
||||
sources:
|
||||
- https://github.com/cloudnative-pg/cloudnative-pg
|
||||
maintainers:
|
||||
- name: alexlebens
|
||||
icon: https://avatars.githubusercontent.com/u/100373852?s=48&v=4
|
||||
appVersion: v1.22.1
|
17
charts/postgres-cluster/README.md
Normal file
17
charts/postgres-cluster/README.md
Normal file
@@ -0,0 +1,17 @@
|
||||
## Introduction
|
||||
|
||||
[CloudNative PG](https://github.com/cloudnative-pg/cloudnative-pg)
|
||||
|
||||
CloudNativePG is the Kubernetes operator that covers the full lifecycle of a highly available PostgreSQL database cluster with a primary/standby architecture, using native streaming replication.
|
||||
|
||||
This chart bootstraps a [CNPG](https://github.com/cloudnative-pg/cloudnative-pg) cluster on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Kubernetes
|
||||
- Helm
|
||||
- CloudNative PG Operator
|
||||
|
||||
## Parameters
|
||||
|
||||
See the [values files](values.yaml).
|
81
charts/postgres-cluster/templates/postgresql-cluster.yaml
Normal file
81
charts/postgres-cluster/templates/postgresql-cluster.yaml
Normal file
@@ -0,0 +1,81 @@
|
||||
apiVersion: postgresql.cnpg.io/v1
|
||||
kind: Cluster
|
||||
metadata:
|
||||
name: "postgresql-{{ .Release.Name }}-cluster"
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app.kubernetes.io/name: postgresql
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||
app.kubernetes.io/component: database
|
||||
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: helm
|
||||
spec:
|
||||
instances: {{ .Values.cluster.instances }}
|
||||
replicationSlots:
|
||||
highAvailability:
|
||||
enabled: true
|
||||
affinity:
|
||||
enablePodAntiAffinity: true
|
||||
topologyKey: kubernetes.io/hostname
|
||||
postgresql:
|
||||
parameters:
|
||||
{{- toYaml .Values.cluster.parameters | nindent 6 }}
|
||||
resources:
|
||||
{{- toYaml .Values.cluster.resources | nindent 4 }}
|
||||
storage:
|
||||
storageClass: {{ .Values.cluster.storage.data.storageClass }}
|
||||
size: {{ .Values.cluster.storage.data.size }}
|
||||
walStorage:
|
||||
storageClass: {{ .Values.cluster.storage.wal.storageClass }}
|
||||
size: {{ .Values.cluster.storage.wal.size }}
|
||||
monitoring:
|
||||
enablePodMonitor: true
|
||||
|
||||
{{- if .Values.bootstrap.initdbEnabled }}
|
||||
bootstrap:
|
||||
initdb:
|
||||
{{- toYaml .Values.bootstrap.initdb | nindent 6 }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.backup.recoveryEnabled }}
|
||||
bootstrap:
|
||||
recovery:
|
||||
source: "postgresql-{{ .Release.Name }}-cluster-recovery-index-{{ .Values.backup.recoveryIndex }}"
|
||||
externalClusters:
|
||||
- name: "postgresql-{{ .Release.Name }}-cluster-recovery-index-{{ .Values.backup.recoveryIndex }}"
|
||||
barmanObjectStore:
|
||||
endpointURL: {{ .Values.backup.endpointURL }}
|
||||
destinationPath: "s3://{{ .Values.backup.bucket }}/{{ .Values.cluster.name }}/postgresql/{{ .Release.Name }}-cluster"
|
||||
s3Credentials:
|
||||
accessKeyId:
|
||||
name: "postgresql-{{ .Release.Name }}-cluster-backup-secret"
|
||||
key: ACCESS_KEY_ID
|
||||
secretAccessKey:
|
||||
name: "postgresql-{{ .Release.Name }}-cluster-backup-secret"
|
||||
key: ACCESS_SECRET_KEY
|
||||
data:
|
||||
compression: {{ .Values.backup.compression }}
|
||||
wal:
|
||||
compression: {{ .Values.backup.compression }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.backup.backupEnabled }}
|
||||
backup:
|
||||
retentionPolicy: "{{ .Values.backup.retentionPolicy }}"
|
||||
barmanObjectStore:
|
||||
destinationPath: "s3://{{ .Values.backup.bucket }}/{{ .Values.cluster.name }}/postgresql/{{ .Release.Name }}-cluster"
|
||||
endpointURL: {{ .Values.backup.endpointURL }}
|
||||
serverName: "postgresql-{{ .Release.Name }}-cluster-backup-index-{{ .Values.backup.backupIndex }}"
|
||||
s3Credentials:
|
||||
accessKeyId:
|
||||
name: "postgresql-{{ .Release.Name }}-cluster-backup-secret"
|
||||
key: ACCESS_KEY_ID
|
||||
secretAccessKey:
|
||||
name: "postgresql-{{ .Release.Name }}-cluster-backup-secret"
|
||||
key: ACCESS_SECRET_KEY
|
||||
data:
|
||||
compression: {{ .Values.backup.compression }}
|
||||
wal:
|
||||
compression: {{ .Values.backup.compression }}
|
||||
{{- end }}
|
17
charts/postgres-cluster/templates/scheduled-backup.yaml
Normal file
17
charts/postgres-cluster/templates/scheduled-backup.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
apiVersion: postgresql.cnpg.io/v1
|
||||
kind: ScheduledBackup
|
||||
metadata:
|
||||
name: "postgresql-{{ .Release.Name }}-cluster-backup"
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app.kubernetes.io/name: postgresql
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||
app.kubernetes.io/component: database
|
||||
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: helm
|
||||
spec:
|
||||
schedule: {{ .Values.backup.schedule }}
|
||||
backupOwnerReference: self
|
||||
cluster:
|
||||
name: "postgresql-{{ .Release.Name }}-cluster"
|
37
charts/postgres-cluster/values.yaml
Normal file
37
charts/postgres-cluster/values.yaml
Normal file
@@ -0,0 +1,37 @@
|
||||
cluster:
|
||||
name: cl01tl
|
||||
instances: 2
|
||||
parameters:
|
||||
shared_buffers: 128MB
|
||||
max_slot_wal_keep_size: 2000MB
|
||||
hot_standby_feedback: "on"
|
||||
resources:
|
||||
requests:
|
||||
memory: 128Mi
|
||||
cpu: 100m
|
||||
limits:
|
||||
memory: 2Gi
|
||||
cpu: 1500m
|
||||
hugepages-2Mi: 512Mi
|
||||
storage:
|
||||
data:
|
||||
storageClass: ceph-block
|
||||
size: 10Gi
|
||||
wal:
|
||||
storageClass: ceph-block
|
||||
size: 2Gi
|
||||
bootstrap:
|
||||
initdbEnabled: false
|
||||
initdb:
|
||||
database: app
|
||||
owner: app
|
||||
backup:
|
||||
backupEnabled: true
|
||||
recoveryEnabled: false
|
||||
schedule: "0 0 0 * * *"
|
||||
retentionPolicy: 14d
|
||||
backupIndex: 1
|
||||
recoveryIndex: 1
|
||||
endpointURL: https://nyc3.digitaloceanspaces.com
|
||||
bucket: net-infra
|
||||
compression: snappy
|
Reference in New Issue
Block a user