Skip to content

Commit

Permalink
Workaround for API_REQUESTS_PER_HOUR (#59)
Browse files Browse the repository at this point in the history
* Workaround for API_REQUESTS_PER_HOUR

- Need refactorying env config later

Signed-off-by: Ji Bin <[email protected]>

* Update Chart.yaml

* Update values.yaml

Signed-off-by: Ji Bin <[email protected]>
Co-authored-by: Warren Chen <[email protected]>
  • Loading branch information
matrixji and warren830 authored Dec 1, 2022
1 parent 6529fca commit dddc373
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 5 deletions.
4 changes: 2 additions & 2 deletions charts/devlake/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type: application


# Chart version
version: v0.14.6
version: v0.14.7

# devlake version
appVersion: "v0.14.3"
appVersion: "v0.14.6"
1 change: 1 addition & 0 deletions charts/devlake/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ Some useful parameters for the chart, you could also check them in values.yaml
| lake.image.pullPolicy | pullPolicy for lake's image | Always |
| lake.loggingDir | log dir for the lake server | /app/logs |
| lake.loggingLevel | log level for the lake server | info |
| lake.dotenv | initial configurations for injecting to lake's .env | see Values.yaml |
| ui.image.repository | repository for ui's image | mericodev/config-ui |
| ui.image.tag | image tag for ui's image | latest |
| ui.image.pullPolicy | pullPolicy for ui's image | Always |
Expand Down
25 changes: 25 additions & 0 deletions charts/devlake/templates/statefulsets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,31 @@ spec:
spec:
initContainers:
{{- include "common.initContainerWaitDatabase" . | nindent 8 }}
- name: patch-env
image: "{{ .Values.alpine.image.repository }}:{{ .Values.alpine.image.tag }}"
imagePullPolicy: {{ .Values.alpine.image.pullPolicy }}
command:
- 'sh'
- '-c'
- |
touch /app/config/.env
function patch_env() {
if grep -w ${key}= /app/config/.env ; then
echo ${key} already set
else
echo >> /app/config/.env
echo ${key}=${val} >> /app/config/.env
echo ${key}=${val} patched
grep -w ${key}= /app/config/.env
fi
}
{{- range $k, $v := .Values.lake.dotenv }}
key={{ $k }} val={{ $v }} patch_env
{{- end }}
exit 0
volumeMounts:
- mountPath: /app/config
name: {{ include "devlake.fullname" . }}-lake-config
containers:
- name: lake
image: "{{ .Values.lake.image.repository }}:{{ .Values.lake.image.tag }}"
Expand Down
12 changes: 9 additions & 3 deletions charts/devlake/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ grafana:
# image for grafana
image:
repository: apache/devlake-dashboard
tag: v0.14.3
tag: v0.14.6
pullPolicy: Always

resources: {}
Expand All @@ -128,13 +128,19 @@ grafana:
lake:
image:
repository: apache/devlake
tag: v0.14.3
tag: v0.14.6
pullPolicy: Always
# storage for config
storage:
# the storage class for pv, leave empty will using default
class: ""
size: 100Mi
dotenv:
API_TIMEOUT: "120s"
API_RETRY: "3"
API_REQUESTS_PER_HOUR: "10000"
PIPELINE_MAX_PARALLEL: "1"
IN_SECURE_SKIP_VERIFY: "false"

# If hostNetwork is true, then dnsPolicy is set to ClusterFirstWithHostNet
hostNetwork: false
Expand All @@ -154,7 +160,7 @@ lake:
ui:
image:
repository: apache/devlake-config-ui
tag: v0.14.3
tag: v0.14.6
pullPolicy: Always

resources: {}
Expand Down

0 comments on commit dddc373

Please sign in to comment.