Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hotfix] [charts] #291

Merged
merged 5 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/integration/postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:
condition: service_healthy
environment:
- PGPASSWORD=rootpasswd
image: ubuntu:kinetic
image: ubuntu:jammy
volumes:
- ./scripts:/scripts

Expand Down Expand Up @@ -82,7 +82,7 @@ services:
condition: service_healthy
environment:
- PGPASSWORD=rootpasswd
image: ubuntu:kinetic
image: ubuntu:jammy
profiles:
- tests
volumes:
Expand Down
15 changes: 12 additions & 3 deletions .github/integration/scripts/charts/deploy_charts.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
#!/bin/bash
set -ex

if [ -z "$2" ];then
if [ -z "$2" ]; then
echo "PR number missing"
exit 1
fi

MQ_PORT=5672
if [ "$3" == "true" ]; then
MQ_PORT=5671
fi

if [ "$1" == "sda-db" ]; then
ROOTPASS=$(yq e '.global.db.password' .github/integration/scripts/charts/values.yaml)
helm install postgres charts/sda-db \
--set image.tag="PR$2-postgres" \
--set image.pullPolicy=IfNotPresent \
--set global.postgresAdminPassword="$ROOTPASS" \
--set global.tls.enabled=false \
--set global.tls.clusterIssuer=cert-issuer \
--set global.tls.enabled="$3" \
--set persistence.enabled=false \
--set resources=null \
--wait
Expand All @@ -25,7 +31,8 @@ if [ "$1" == "sda-mq" ]; then
--set image.pullPolicy=IfNotPresent \
--set global.adminPassword="$ADMINPASS" \
--set global.adminUser=admin \
--set global.tls.enabled=false \
--set global.tls.enabled="$3" \
--set global.tls.clusterIssuer=cert-issuer \
--set persistence.enabled=false \
--set resources=null \
--wait
Expand All @@ -35,6 +42,8 @@ if [ "$1" == "sda-svc" ]; then
helm install pipeline charts/sda-svc \
--set image.tag="PR$2" \
--set image.pullPolicy=IfNotPresent \
--set global.tls.enabled="$3" \
--set global.broker.port="$MQ_PORT" \
-f .github/integration/scripts/charts/values.yaml \
--wait
fi
4 changes: 2 additions & 2 deletions .github/integration/scripts/charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ global:
level: "debug"
tls:
enabled: false
issuer: "cert-issuer"
clusterIssuer: ""
issuer: ""
clusterIssuer: "cert-issuer"
archive:
s3Url: "http://minio.minio"
s3Bucket: "archive"
Expand Down
2 changes: 1 addition & 1 deletion .github/integration/sda-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
condition: service_healthy
environment:
- PGPASSWORD=rootpasswd
image: ubuntu:kinetic
image: ubuntu:jammy
volumes:
- ./scripts:/scripts
- shared:/shared
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/build_pr_container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ jobs:
strategy:
matrix:
version: ["1.26", "1.27"]
tls: ["true", "false"]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -270,14 +271,14 @@ jobs:
shell: bash

- name: Deploy DB
run: bash .github/integration/scripts/charts/deploy_charts.sh sda-db ${{ github.event.number }}
run: bash .github/integration/scripts/charts/deploy_charts.sh sda-db ${{ github.event.number }} ${{matrix.tls}}

- name: Deploy MQ
run: bash .github/integration/scripts/charts/deploy_charts.sh sda-mq ${{ github.event.number }}
run: bash .github/integration/scripts/charts/deploy_charts.sh sda-mq ${{ github.event.number }} ${{matrix.tls}}
shell: bash

- name: Deploy pipeline
run: bash .github/integration/scripts/charts/deploy_charts.sh sda-svc ${{ github.event.number }}
run: bash .github/integration/scripts/charts/deploy_charts.sh sda-svc ${{ github.event.number }} ${{matrix.tls}}
shell: bash

- name: test
Expand Down
2 changes: 1 addition & 1 deletion charts/sda-mq/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: sda-mq
version: "0.5.0"
version: "0.5.1"
description: RabbitMQ component for Sensitive Data Archive (SDA) installation
home: https://neic-sda.readthedocs.io
icon: https://neic.no/assets/images/logo.png
Expand Down
12 changes: 6 additions & 6 deletions charts/sda-mq/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ spec:
key: shovel_connection
{{- end }}
{{- if .Values.global.tls.enabled }}
- name: MQ_SERVER_CERT
- name: RABBITMQ_SERVER_CERT
value: {{ template "mqCert" . }}
- name: MQ_SERVER_KEY
- name: RABBITMQ_SERVER_KEY
value: {{ template "mqKey" . }}
{{- if .Values.global.tls.verifyPeer }}
- name: MQ_CA
- name: RABBITMQ_SERVER_CACERT
value: {{ template "caCert" . }}
- name: MQ_VERIFY
- name: RABBITMQ_SERVER_VERIFY
value: {{ template "verifyPeer" . }}
{{- end }}
{{- end }}
Expand All @@ -107,7 +107,7 @@ spec:
- /bin/bash
- -ec
- rabbitmq-diagnostics -q ping
initialDelaySeconds: 20
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 3
readinessProbe:
Expand All @@ -117,7 +117,7 @@ spec:
- -ec
- rabbitmq-diagnostics -q check_running && rabbitmq-diagnostics -q check_local_alarms
initialDelaySeconds: 30
periodSeconds: 10
periodSeconds: 5
timeoutSeconds: 3
volumeMounts:
- name: data
Expand Down
2 changes: 1 addition & 1 deletion charts/sda-svc/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: sda-svc
version: "0.20.0"
version: "0.20.1"
kubeVersion: ">= 1.19.0-0"
description: Components for Sensitive Data Archive (SDA) installation
home: https://neic-sda.readthedocs.io
Expand Down
2 changes: 1 addition & 1 deletion charts/sda-svc/templates/backup-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ spec:
value: {{ .Values.global.broker.host | quote }}
- name: BROKER_SSL
value: {{ .Values.global.tls.enabled | quote }}
{{- if and .Values.global.broker.ssl .Values.global.tls.enabled }}
{{- if .Values.global.tls.enabled }}
- name: BROKER_VERIFYPEER
value: {{ .Values.global.broker.verifyPeer | quote }}
- name: BROKER_CACERT
Expand Down
2 changes: 1 addition & 1 deletion charts/sda-svc/templates/finalize-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ spec:
value: {{ .Values.global.broker.host | quote }}
- name: BROKER_SSL
value: {{ .Values.global.tls.enabled | quote }}
{{- if and .Values.global.broker.ssl .Values.global.tls.enabled }}
{{- if .Values.global.tls.enabled }}
- name: BROKER_VERIFYPEER
value: {{ .Values.global.broker.verifyPeer | quote }}
- name: BROKER_CACERT
Expand Down
2 changes: 1 addition & 1 deletion charts/sda-svc/templates/ingest-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ spec:
{{- end }}
- name: BROKER_SSL
value: {{ .Values.global.tls.enabled | quote }}
{{- if and .Values.global.broker.ssl .Values.global.tls.enabled }}
{{- if .Values.global.tls.enabled }}
- name: BROKER_CACERT
value: {{ template "tlsPath" . }}/ca.crt
{{- if .Values.global.broker.verifyPeer }}
Expand Down
2 changes: 1 addition & 1 deletion charts/sda-svc/templates/intercept-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ spec:
{{- end }}
- name: BROKER_SSL
value: {{ .Values.global.tls.enabled | quote }}
{{- if and .Values.global.broker.ssl .Values.global.tls.enabled }}
{{- if .Values.global.tls.enabled }}
- name: BROKER_CACERT
value: {{ template "tlsPath" . }}/ca.crt
{{- if .Values.global.broker.verifyPeer }}
Expand Down
2 changes: 1 addition & 1 deletion charts/sda-svc/templates/mapper-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ spec:
value: {{ .Values.global.broker.host | quote }}
- name: BROKER_SSL
value: {{ .Values.global.tls.enabled | quote }}
{{- if and .Values.global.broker.ssl .Values.global.tls.enabled }}
{{- if .Values.global.tls.enabled }}
- name: BROKER_VERIFYPEER
value: {{ .Values.global.broker.verifyPeer | quote }}
- name: BROKER_CACERT
Expand Down
2 changes: 1 addition & 1 deletion charts/sda-svc/templates/s3-inbox-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ spec:
value: "inbox"
- name: BROKER_SSL
value: {{ .Values.global.tls.enabled | quote }}
{{- if and .Values.global.broker.ssl .Values.global.tls.enabled }}
{{- if .Values.global.tls.enabled }}
- name: BROKER_VERIFYPEER
value: {{ .Values.global.broker.verifyPeer | quote }}
- name: BROKER_CACERT
Expand Down
2 changes: 1 addition & 1 deletion charts/sda-svc/templates/verify-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ spec:
{{- end }}
- name: BROKER_SSL
value: {{ .Values.global.tls.enabled | quote }}
{{- if and .Values.global.broker.ssl .Values.global.tls.enabled }}
{{- if .Values.global.tls.enabled }}
- name: BROKER_VERIFYPEER
value: {{ .Values.global.broker.verifyPeer | quote }}
- name: BROKER_CACERT
Expand Down
Loading