Skip to content

Commit

Permalink
fixing etl to conditionally use "fence" configmap (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
EliseCastle23 authored Dec 17, 2024
1 parent 82196a7 commit e8b8855
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion helm/etl/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# 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.1.7
version: 0.1.8

# 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
2 changes: 1 addition & 1 deletion helm/etl/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# etl

![Version: 0.1.7](https://img.shields.io/badge/Version-0.1.7-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: master](https://img.shields.io/badge/AppVersion-master-informational?style=flat-square)
![Version: 0.1.8](https://img.shields.io/badge/Version-0.1.8-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: master](https://img.shields.io/badge/AppVersion-master-informational?style=flat-square)

A Helm chart for gen3 etl

Expand Down
22 changes: 18 additions & 4 deletions helm/etl/templates/etl-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,13 @@ spec:
- name: etl-mapping
configMap:
name: etl-mapping
- name: fence-yaml
- name: fence-usersync-yaml
configMap:
name: fence
optional: true
- name: fence-useryaml
configMap:
name: useryaml
containers:
- name: gen3-spark
image: {{ .Values.image.spark.repository }}:{{ .Values.image.spark.tag }}
Expand Down Expand Up @@ -180,10 +184,12 @@ spec:
readOnly: true
mountPath: "/gen3/tube/etlMapping.yaml"
subPath: "etlMapping.yaml"
- name: "fence-yaml"
readOnly: true
mountPath: "/gen3/tube/user.yaml"
- name: fence-usersync-yaml
mountPath: /gen3/tube/fence-user.yaml
subPath: user.yaml
- name: fence-useryaml
mountPath: /gen3/tube/useryaml-user.yaml
subPath: useryaml
resources:
requests:
cpu: {{ .Values.resources.tube.requests.cpu }}
Expand All @@ -192,6 +198,14 @@ spec:
args:
- "-c"
- |
if [ -f "/gen3/tube/fence-user.yaml" ]; then
cp /gen3/tube/fence-user.yaml /gen3/tube/user.yaml
echo "Using Fence usersync user.yaml."
else
cp /gen3/tube/useryaml-user.yaml /gen3/tube/user.yaml
echo "Using Fence useryaml."
fi
while ! bash -c "echo >/dev/tcp/localhost/9000"; do
echo "Spark is not ready on port 9000... waiting for 10 seconds."
sleep 10
Expand Down

0 comments on commit e8b8855

Please sign in to comment.