Skip to content

Commit

Permalink
Merge pull request #9 from PecanProject/upgrade-postgresql
Browse files Browse the repository at this point in the history
upgrade postgresql
  • Loading branch information
robkooper authored May 22, 2024
2 parents 9cc5541 + bfd4d66 commit 3535adf
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 44 deletions.
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Change Log

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## 0.5.5

### Fixed
- use new repository for postgresql chart

## Changed
- upgraded postgresql to 14.5

## 0.5.4

### Fixed
- back to hooks since job completion requires RBAC role

## 0.5.3

### Fixed
- need to check for table before start bety application

## 0.5.2

### Added
- use new check image to use PG environment variables
- add-user and load-db are now jobs, not hooks (prevent timeout issues)

## 0.5.1

## Changed
- update README to describe values
- fix left over when initializing from URL
- fix binami url change

## 0.5.0

## Added
- initial release of the BETY helm chart.
- build on bety 5.4.1
8 changes: 4 additions & 4 deletions Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: postgresql
repository: https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami
version: 8.9.9
digest: sha256:526629d1646df6a72d4414adc89f3728f0e97e37a4e8ac65036c51e06361c7bb
generated: "2022-06-22T22:35:06.775527-05:00"
repository: oci://registry-1.docker.io/bitnamicharts
version: 11.9.13
digest: sha256:f6c50d1570fe995f60d34ac2a25dcd502caa08ef5194624fe7db275aab8df10f
generated: "2024-05-07T22:48:59.495844-05:00"
6 changes: 3 additions & 3 deletions Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ sources:
# are enabled.
dependencies:
- name: postgresql
version: ~8.9
repository: https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami
version: ~11
repository: oci://registry-1.docker.io/bitnamicharts
condition: postgres.enabled

annotations:
artifacthub.io/links: |
- name: Helm Chart
url: https://github.com/pecanproject/bety-helm
artifacthub.io/changes: |
- back to hooks since job completion requires RBAC role
- use new repository for postgresql chart
31 changes: 9 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,20 @@ The following table lists the configurable parameters of the Bety chart and thei
| `ingress.tls` | TLS configuration for the hostnames to be covered | `false` |
| `ingress.annotations` | Ingress annotations | `[]` (evaluated as a template) |

### PostgreSQL parameters

| Parameter | Description | Default |
| ----------------------------------- | ------------------------------------------------------------ | ------------- |
| `postgresq.auth.enablePostgresUser` | Create the postgres user, this is the `root` account for postgresql. | `true` |
| `postgresq.auth.postgresPassword` | Password for `postgres` user | `supersecret` |


Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
```
helm install mt-release ncsa/betydb \
--set betyPassword="xxxx" \
--set secretKey="xxxx" \
--set postgresql.postgresqlPassword="xxxx"
--set postgresql.auth.postgresqlPassword="xxxx"
```

The above command sets the bety password, secret, postgresql password to `xxxx`,`xxxx`, and `xxxx` respectively.
Expand All @@ -121,24 +129,3 @@ helm delete my-release
```

The command removes all the Kubernetes components associated with the chart and deletes the release.

## ChangeLog

### 0.5.4
- back to hooks since job completion requires RBAC role

### 0.5.3
- need to check for table before start bety application

### 0.5.2
- use new check image to use PG environment variables
- add-user and load-db are now jobs, not hooks (prevent timeout issues)

### 0.5.1
- update README to describe values
- fix left over when initializing from URL
- fix binami url change

### 0.5.0
- initial release of the BETY helm chart.
- build on bety 5.4.1
4 changes: 2 additions & 2 deletions templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ Environment variables for PostgreSQL
- name: PGPORT
value: {{ include "betydb.postgresqlPort" . | quote }}
- name: PGUSER
value: {{ .Values.postgresql.postgresqlUsername | default "postgres" | quote }}
value: {{ .Values.postgresql.auth.username | default "postgres" | quote }}
- name: PGPASSWORD
valueFrom:
secretKeyRef:
{{- if .Values.postgresql.enabled }}
name: {{ .Release.Name }}-postgresql
key: postgresql-password
key: postgres-password
{{- else }}
name: {{ include "betydb.fullname" . }}
key: postgresqlPassword
Expand Down
28 changes: 15 additions & 13 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,21 @@ postgresql:
## postgresqlPort port to connect to postgresql
# postgresqlPort: 5432

## postgresqlUsername is the initial user added to the system. This is freqently the
## postgres user. This user will have superuser abilities.
# postgresqlUsername: postgres

## postgresqlPassword the password for postgresqlUsername, if using auto generated
## password make sure to save the password as described in the notes. When upgrading
## you will need to provide this secret otherwise a new secret will be generated but
## not saved in the database.
postgresqlPassword: supersecret

# need more space
persistence:
size: 20Gi
auth:
## enablePostgresUser adds the postgres user This user will have superuser abilities.
# enablePostgresUser: true

## postgresPassword the password for postgres, if using auto generated
## password make sure to save the password as described in the notes. When upgrading
## you will need to provide this secret otherwise a new secret will be generated but
## not saved in the database.
postgresPassword: supersecret

# we will only configure the primary database
primary:
# need more space
persistence:
size: 20Gi

# -------------------------------------------------------------------------------

Expand Down

0 comments on commit 3535adf

Please sign in to comment.