Skip to content

Commit

Permalink
Merge pull request #158 from uc-cdis/feat/GPE-1032-portal-images
Browse files Browse the repository at this point in the history
Add extraImages configuration
  • Loading branch information
EliseCastle23 authored Mar 14, 2024
2 parents 2676d80 + 4cdc478 commit 67367e2
Show file tree
Hide file tree
Showing 10 changed files with 68 additions and 18 deletions.
10 changes: 5 additions & 5 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -496,35 +496,35 @@
"hashed_secret": "eb9739c6625f06b4ab73035223366dda6262ae77",
"is_secret": false,
"is_verified": false,
"line_number": 37,
"line_number": 38,
"type": "Base64 High Entropy String"
},
{
"hashed_secret": "08eeb737b239bdb7362a875b90e22c10b8826b20",
"is_secret": false,
"is_verified": false,
"line_number": 41,
"line_number": 42,
"type": "Base64 High Entropy String"
},
{
"hashed_secret": "d84ce25b0f9bc2cc263006ae39453efb22cc2900",
"is_secret": false,
"is_verified": false,
"line_number": 60,
"line_number": 61,
"type": "Secret Keyword"
}
],
"helm/portal/values.yaml": [
{
"hashed_secret": "08eeb737b239bdb7362a875b90e22c10b8826b20",
"is_verified": false,
"line_number": 472,
"line_number": 478,
"type": "Base64 High Entropy String"
},
{
"hashed_secret": "eb9739c6625f06b4ab73035223366dda6262ae77",
"is_verified": false,
"line_number": 475,
"line_number": 481,
"type": "Base64 High Entropy String"
}
],
Expand Down
2 changes: 1 addition & 1 deletion helm/fence/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.16
version: 0.1.17

# 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
8 changes: 5 additions & 3 deletions helm/fence/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# fence

![Version: 0.1.16](https://img.shields.io/badge/Version-0.1.16-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.17](https://img.shields.io/badge/Version-0.1.17-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 Fence

Expand Down Expand Up @@ -89,8 +89,10 @@ A Helm chart for gen3 Fence
| datadogProfilingEnabled | bool | `true` | If enabled, the Datadog Agent will collect profiling data for your application using the Continuous Profiler. This data can be used to identify performance bottlenecks and optimize your application. |
| datadogTraceSampleRate | int | `1` | A value between 0 and 1, that represents the percentage of requests that will be traced. For example, a value of 0.5 means that 50% of requests will be traced. |
| env | list | `[{"name":"GEN3_UWSGI_TIMEOUT","valueFrom":{"configMapKeyRef":{"key":"uwsgi-timeout","name":"manifest-global","optional":true}}},{"name":"DD_AGENT_HOST","valueFrom":{"fieldRef":{"fieldPath":"status.hostIP"}}},{"name":"AWS_STS_REGIONAL_ENDPOINTS","value":"regional"},{"name":"PYTHONPATH","value":"/var/www/fence"},{"name":"GEN3_DEBUG","value":"False"},{"name":"FENCE_PUBLIC_CONFIG","valueFrom":{"configMapKeyRef":{"key":"fence-config-public.yaml","name":"manifest-fence","optional":true}}},{"name":"PGHOST","valueFrom":{"secretKeyRef":{"key":"host","name":"fence-dbcreds","optional":false}}},{"name":"PGUSER","valueFrom":{"secretKeyRef":{"key":"username","name":"fence-dbcreds","optional":false}}},{"name":"PGPASSWORD","valueFrom":{"secretKeyRef":{"key":"password","name":"fence-dbcreds","optional":false}}},{"name":"PGDB","valueFrom":{"secretKeyRef":{"key":"database","name":"fence-dbcreds","optional":false}}},{"name":"DBREADY","valueFrom":{"secretKeyRef":{"key":"dbcreated","name":"fence-dbcreds","optional":false}}},{"name":"DB","value":"postgresql://$(PGUSER):$(PGPASSWORD)@$(PGHOST):5432/$(PGDB)"},{"name":"INDEXD_PASSWORD","valueFrom":{"secretKeyRef":{"key":"fence","name":"indexd-service-creds"}}},{"name":"gen3Env","valueFrom":{"configMapKeyRef":{"key":"hostname","name":"manifest-global"}}}]` | Environment variables to pass to the container |
| externalSecrets | map | `{"createK8sFenceSecrets":false,"dbcreds":null,"fenceConfig":null,"fenceGoogleAppCredsSecret":null,"fenceGoogleStorageCredsSecret":null,"fenceJwtKeys":null}` | External Secrets settings. |
| externalSecrets.createK8sFenceSecrets | string | `false` | Will create the Helm "fence-config", "fence-google-app-creds-secret", "fence-google-storage-creds-secret", and "fence-jwt-keys" secrets even if Secrets Manager is enabled. This is helpful if you are wanting to use External Secrets for some, but not all secrets. |
| externalSecrets | map | `{"createK8sFenceConfigSecret":false,"createK8sGoogleAppSecrets":false,"createK8sJwtKeysSecret":false,"dbcreds":null,"fenceConfig":null,"fenceGoogleAppCredsSecret":null,"fenceGoogleStorageCredsSecret":null,"fenceJwtKeys":null}` | External Secrets settings. |
| externalSecrets.createK8sFenceConfigSecret | string | `false` | Will create the Helm "fence-config" secret even if Secrets Manager is enabled. This is helpful if you are wanting to use External Secrets for some, but not all secrets. |
| externalSecrets.createK8sGoogleAppSecrets | string | `false` | Will create the Helm "fence-google-app-creds-secret" and "fence-google-storage-creds-secret" secrets even if Secrets Manager is enabled. This is helpful if you are wanting to use External Secrets for some, but not all secrets. |
| externalSecrets.createK8sJwtKeysSecret | string | `false` | Will create the Helm "fence-jwt-keys" secret even if Secrets Manager is enabled. This is helpful if you are wanting to use External Secrets for some, but not all secrets. |
| externalSecrets.dbcreds | string | `nil` | Will override the name of the aws secrets manager secret. Default is "Values.global.environment-.Chart.Name-creds" |
| externalSecrets.fenceConfig | string | `nil` | Will override the name of the aws secrets manager secret. Default is "fence-config" |
| externalSecrets.fenceGoogleAppCredsSecret | string | `nil` | Will override the name of the aws secrets manager secret. Default is "fence-google-app-creds-secret" |
Expand Down
6 changes: 3 additions & 3 deletions helm/gen3/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies:
repository: file://../etl
condition: etl.enabled
- name: fence
version: 0.1.16
version: 0.1.17
repository: "file://../fence"
condition: fence.enabled
- name: guppy
Expand Down Expand Up @@ -64,7 +64,7 @@ dependencies:
repository: "file://../pidgin"
condition: pidgin.enabled
- name: portal
version: 0.1.9
version: 0.1.10
repository: "file://../portal"
condition: portal.enabled
- name: requestor
Expand Down Expand Up @@ -115,7 +115,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.23
version: 0.1.24

# 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
6 changes: 3 additions & 3 deletions helm/gen3/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# gen3

![Version: 0.1.23](https://img.shields.io/badge/Version-0.1.23-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.24](https://img.shields.io/badge/Version-0.1.24-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)

Helm chart to deploy Gen3 Data Commons

Expand All @@ -25,15 +25,15 @@ Helm chart to deploy Gen3 Data Commons
| file://../aws-es-proxy | aws-es-proxy | 0.1.8 |
| file://../common | common | 0.1.9 |
| file://../etl | etl | 0.1.0 |
| file://../fence | fence | 0.1.16 |
| file://../fence | fence | 0.1.17 |
| file://../guppy | guppy | 0.1.10 |
| file://../hatchery | hatchery | 0.1.8 |
| file://../indexd | indexd | 0.1.13 |
| file://../manifestservice | manifestservice | 0.1.12 |
| file://../metadata | metadata | 0.1.10 |
| file://../peregrine | peregrine | 0.1.11 |
| file://../pidgin | pidgin | 0.1.9 |
| file://../portal | portal | 0.1.9 |
| file://../portal | portal | 0.1.10 |
| file://../requestor | requestor | 0.1.10 |
| file://../revproxy | revproxy | 0.1.13 |
| file://../sheepdog | sheepdog | 0.1.12 |
Expand Down
2 changes: 1 addition & 1 deletion helm/portal/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.9
version: 0.1.10

# 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
3 changes: 2 additions & 1 deletion helm/portal/README.md

Large diffs are not rendered by default.

32 changes: 31 additions & 1 deletion helm/portal/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,33 @@ spec:
secretName: "portal-sponsor-config"
- name: privacy-policy
configMap:
name: "privacy-policy"
name: "privacy-policy"
optional: true
{{- if .Values.extraImages }}
- name: extra-images-config
configMap:
name: portal-extra-images
- name: extra-images
emptyDir: {}
initContainers:
- name: init
# image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
image: "quay.io/prometheus/busybox:latest"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- name: extra-images-config
mountPath: /data-portal/custom/config.txt
subPath: config.txt
- name: extra-images
mountPath: /data-portal/custom/images
command:
- sh
- -c
- |
cd /data-portal/custom/images/;
cat /data-portal/custom/config.txt;
xargs -a /data-portal/custom/config.txt -I {} wget {}
{{- end }}
containers:
- name: portal
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
Expand Down Expand Up @@ -171,6 +197,10 @@ spec:
#GEN3_DATA_UPLOAD_BUCKET|-value: ""-|
# - name: BASENAME
volumeMounts:
{{- if .Values.extraImages }}
- name: extra-images
mountPath: /data-portal/custom/images
{{- end }}
- name: "config-volume"
mountPath: "/data-portal/data/config/gitops.json"
subPath: "gitops.json"
Expand Down
11 changes: 11 additions & 0 deletions helm/portal/templates/extra-images-conf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{- with .Values.extraImages }}
apiVersion: v1
kind: ConfigMap
metadata:
name: portal-extra-images
data:
config.txt:
{{- range . }}
{{ .url }}
{{ end }}
{{- end }}
6 changes: 6 additions & 0 deletions helm/portal/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@ datadogProfilingEnabled: true
# -- (int) A value between 0 and 1, that represents the percentage of requests that will be traced. For example, a value of 0.5 means that 50% of requests will be traced.
datadogTraceSampleRate: 1


# -- (map) Extra images to be mounted in the deployment.
extraImages:
# - url: https://raw.githubusercontent.com/uc-cdis/gen3-helm/master/docs/images/gen3-blue-dark.png


# -- (map) GitOps configuration for portal
gitops:
# -- (string) multiline string - gitops.json
Expand Down

0 comments on commit 67367e2

Please sign in to comment.