Skip to content

Commit

Permalink
update betydb and checks image
Browse files Browse the repository at this point in the history
  • Loading branch information
robkooper committed Jul 26, 2022
1 parent 245dbfe commit 352647c
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 27 deletions.
6 changes: 3 additions & 3 deletions Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ dependencies:
version: 6.28.1
- name: betydb
repository: https://opensource.ncsa.illinois.edu/charts/
version: 0.5.1
digest: sha256:c293d9887cf905d173b510200b73fdeee75707a67968cb6756132e63c3df10c6
generated: "2022-06-22T22:39:53.650221-05:00"
version: 0.5.4
digest: sha256:b1faaa40ed16ba32c1fac38402f172c11dca1147d68c22ffeca8fd619c10741f
generated: "2022-07-26T13:56:22.537572157-05:00"
5 changes: 3 additions & 2 deletions Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ description: >
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.6.1
version: 0.6.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down Expand Up @@ -49,4 +49,5 @@ annotations:
artifacthub.io/license: BSD-3-Clause
artifacthub.io/changes: |
- Update BETY chart
- update url forb bitnami
- Update checks image
- Load data is now job, not hook, this prevents chart from taking long time to install
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,14 @@ rabbitmq:

## ChangeLog

### 0.6.2
- Update BETY chart
- Update checks image
- Load data is now job, not hook, this prevents chart from taking long time to install

### 0.6.1
- Update BETY chart
- update url forb bitnami
- update url for bitnami

### 0.6.0

Expand Down
10 changes: 5 additions & 5 deletions templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ Get the application URL by running these commands:
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "bety.fullname" . }})
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "pecan.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "bety.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "bety.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "pecan.fullname" . }}-web'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "pecan.fullname" . }}-web -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "betydb.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "pecan.name" . }}-web,app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}

{{- if .Values.initializeData }}
A job is added that will load some example data. Once this job is finished you can safely remove it using:
kubectl delete job/{{ include "pecan.fullname" . }}-load-data
kubectl --namespace {{ .Release.Namespace }} delete job/{{ include "pecan.fullname" . }}-load-data

{{- end}}
2 changes: 1 addition & 1 deletion templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Postgresql Environment for postgres
name: {{ .Release.Name }}-postgresql
key: postgresql-password
- name: BETYUSER
value: {{ .Values.betydb.betyUser | default "bety" | quote }}
value: {{ .Values.betydb.betyUser | quote }}
- name: BETYPASSWORD
valueFrom:
secretKeyRef:
Expand Down
17 changes: 7 additions & 10 deletions templates/hooks/add-data.yaml → templates/add-data.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
{{- if and .Values.initializeData }}
# do we want to add .Release.IsInstall to only run on install?
{{- if .Values.initializeData }}
apiVersion: batch/v1
kind: Job
metadata:
name: {{ include "pecan.fullname" . }}-load-data
labels:
{{- include "pecan.labels" . | nindent 4 }}
annotations:
# This is what defines this resource as a hook. Without this line, the
# job is considered part of the release.
"helm.sh/hook": "post-install"
"helm.sh/hook-delete-policy": "hook-succeeded,before-hook-creation"
"helm.sh/hook-weight": "20"
spec:
ttlSecondsAfterFinished: 1
template:
Expand All @@ -32,9 +25,13 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
{{- include "pecan.env.postgresql" . | nindent 12 }}
- name: PGDATABASE
value: {{ .Values.betydb.betyDatabase | quote }}
- name: PG_TABLE
value: "yields"
containers:
- name: post-install-job
image: "{{ $.Values.image.checks }}"
- name: add-data
image: "{{ .Values.image.project }}/data:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- name: data
Expand Down
4 changes: 4 additions & 0 deletions templates/executor/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ spec:
imagePullPolicy: {{ $.Values.image.pullPolicy }}
env:
{{- include "pecan.env.postgresql" . | nindent 12 }}
- name: PGDATABASE
value: {{ .Values.betydb.betyDatabase | quote }}
- name: PG_TABLE
value: "yields"
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.project }}/executor:{{ .Values.image.tag | default .Chart.AppVersion }}"
Expand Down
4 changes: 4 additions & 0 deletions templates/monitor/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
{{- include "pecan.env.postgresql" . | nindent 12 }}
- name: PGDATABASE
value: {{ .Values.betydb.betyDatabase | quote }}
- name: PG_TABLE
value: "yields"
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.project }}/monitor:{{ .Values.image.tag | default .Chart.AppVersion }}"
Expand Down
5 changes: 5 additions & 0 deletions templates/rstudio/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
{{- $labels := include "pecan.labels" . -}}
{{- $rabbitmq := include "pecan.env.rabbitmq" . -}}
{{- $postgresql := include "pecan.env.postgresql" . -}}
{{- $betydb := .Values.betydb.betyDatabase | quote -}}
{{- $env := include "pecan.env.cluster" . -}}
{{- range .Values.rstudioUsers -}}
apiVersion: apps/v1
Expand Down Expand Up @@ -40,6 +41,10 @@ spec:
imagePullPolicy: {{ $.Values.image.pullPolicy }}
env:
{{- $postgresql | nindent 12 }}
- name: PGDATABASE
value: {{ $betydb }}
- name: PG_TABLE
value: "yields"
containers:
- name: rstudio
image: "{{ $.Values.image.project }}/base:{{ $.Values.image.tag | default $.Chart.AppVersion }}"
Expand Down
4 changes: 4 additions & 0 deletions templates/web/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ spec:
imagePullPolicy: {{ $.Values.image.pullPolicy }}
env:
{{- include "pecan.env.postgresql" . | nindent 12 }}
- name: PGDATABASE
value: {{ .Values.betydb.betyDatabase | quote }}
- name: PG_TABLE
value: "yields"
- name: check-betydb
image: "{{ $.Values.image.checks }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
Expand Down
9 changes: 4 additions & 5 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
image:
project: pecan
tag: null
checks: "ncsa/checks:1.0.0"
checks: "ncsa/checks:1.0.1"
pullPolicy: IfNotPresent

imagePullSecrets: []
Expand Down Expand Up @@ -97,10 +97,9 @@ betydb:

rabbitmq:
rabbitmq:
#username: guest
#password: guest
#erlangCookie: 1234thisisasupersecretoflength32
tls: false
username: guest
password: guest
erlangCookie: 1234thisisasupersecretoflength32

ingress:
enabled: false
Expand Down

0 comments on commit 352647c

Please sign in to comment.