Compare commits

..

6 Commits

Author SHA1 Message Date
466b67581f raise default memory request 2024-02-12 19:33:50 -07:00
031b1dec3a fix linting 2024-02-10 11:34:47 -07:00
41282e79e8 add postgres-cluster 2024-02-10 11:12:38 -07:00
ffcaf51b66 add envFrom 2024-02-10 04:08:58 -07:00
30d69f695c change readme 2024-02-10 03:32:06 -07:00
c5feb14abc change names 2024-02-10 03:17:12 -07:00
11 changed files with 186 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
name: Lint and Test Charts name: lint-and-test-charts
on: pull_request on: pull_request

View File

@@ -1,4 +1,4 @@
name: Release Charts name: release-charts
on: on:
push: push:

View File

@@ -1,9 +1,21 @@
# Welcome
Welcome to the documentation for the [alexlebens's Helm charts](https://github.com/alexlebens/helm-charts).
## Getting started ## Getting started
[Helm](https://helm.sh) must be installed to use the charts in this repository. [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. 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 ## License
This project is licensed under the terms of the Apache 2.0 License license. This project is licensed under the terms of the Apache 2.0 License license.

View File

@@ -1,6 +1,6 @@
apiVersion: v2 apiVersion: v2
name: homepage name: homepage
version: 0.0.1 version: 0.0.2
description: Chart for benphelps homepage description: Chart for benphelps homepage
keywords: keywords:
- dashboard - dashboard

View File

@@ -40,6 +40,10 @@ spec:
- name: {{ $k }} - name: {{ $k }}
value: {{ $v | quote }} value: {{ $v | quote }}
{{- end }} {{- end }}
{{- with .Values.deployment.envFrom }}
envFrom:
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts: volumeMounts:
- name: homepage-config - name: homepage-config
subPath: bookmarks.yaml subPath: bookmarks.yaml

View File

@@ -6,6 +6,7 @@ deployment:
tag: v0.8.7 tag: v0.8.7
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
env: env:
envFrom:
resources: resources:
requests: requests:
memory: 50Mi memory: 50Mi

View File

@@ -0,0 +1,13 @@
apiVersion: v2
name: postgres-cluster
version: 0.0.3
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

View 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).

View 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 }}

View 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"

View 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: 512Mi
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