-
Notifications
You must be signed in to change notification settings - Fork 0
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
use templates and config maps to get the settings for sidekiq the way we want #976
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -4,13 +4,9 @@ if ENV['GOOGLE_OAUTH_PRIVATE_KEY_VALUE'] && !ENV['GOOGLE_OAUTH_PRIVATE_KEY_VALUE | |||||
end | ||||||
|
||||||
if ENV['DATABASE_URL'] && !ENV['DATABASE_URL'].empty? | ||||||
ENV['DATABASE_URL'] = ENV['DATABASE_URL'].gsub('pool=5', 'pool=30') | ||||||
ENV['DATABASE_URL'] = ENV['DATABASE_URL'].gsub('pool=5', "pools=#{ENV.fetch('WORKER_CONCURENCY'), 30}") | ||||||
else | ||||||
puts 'DATABASE_URL not set, no pool change needed' | ||||||
end | ||||||
|
||||||
if ENV['SIDEKIQ_CONFIG'] | ||||||
exec "echo $DATABASE_URL && bundle exec sidekiq -C #{ENV['SIDEKIQ_CONFIG']}" | ||||||
else | ||||||
exec "echo $DATABASE_URL && bundle exec sidekiq" | ||||||
end | ||||||
exec "echo $DATABASE_URL && RAILS_MAX_THREADS=$WORKER_CONCURENCY bundle exec sidekiq $WORKER_ARGS" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -187,6 +187,9 @@ worker: | |||||
cpu: "150m" | ||||||
extraVolumeMounts: *volMounts | ||||||
extraEnvVars: *envVars | ||||||
extraEnvFrom: | ||||||
- configMapRef: | ||||||
name: worker-env | ||||||
podSecurityContext: | ||||||
runAsUser: 1001 | ||||||
runAsGroup: 101 | ||||||
|
@@ -204,14 +207,35 @@ workerAuxiliary: | |||||
requests: | ||||||
memory: "4Gi" | ||||||
cpu: "2" | ||||||
extraEnvVars: | ||||||
- name: AUXILIARY_WORKER_THREAD_COUNT | ||||||
value: "1" | ||||||
- name: SIDEKIQ_CONFIG | ||||||
value: "config/sidekiq_auxiliary.yml" | ||||||
extraEnvVars: *envVars | ||||||
extraEnvFrom: | ||||||
- configMapRef: | ||||||
name: auxilary-worker-env | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I hadn't put this back into pals yet, but in adventist we established this pattern:
Suggested change
|
||||||
|
||||||
|
||||||
extraDeploy: | ||||||
- |- | ||||||
--- | ||||||
apiVersion: v1 | ||||||
kind: ConfigMap | ||||||
metadata: | ||||||
name: worker-env | ||||||
labels: | ||||||
{{- include "hyrax.labels" . | nindent 4 }} | ||||||
data: | ||||||
WORKER_CONCURENCY: "5" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
WORKER_ARGS: -q default -q import -q export | ||||||
--- | ||||||
apiVersion: v1 | ||||||
kind: ConfigMap | ||||||
metadata: | ||||||
name: auxiliary-worker-env | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
labels: | ||||||
{{- include "hyrax.labels" . | nindent 4 }} | ||||||
data: | ||||||
WORKER_CONCURENCY: "1" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
WORKER_ARGS: -q auxiliary -q default -q import -q export | ||||||
--- | ||||||
apiVersion: apps/v1 | ||||||
kind: Deployment | ||||||
metadata: | ||||||
|
@@ -241,9 +265,11 @@ extraDeploy: | |||||
name: {{ include "hyrax.fullname" . }}-env | ||||||
- secretRef: | ||||||
name: {{ template "hyrax.fullname" . }} | ||||||
{{- with .Values.workerAuxiliary.extraEnvFrom }} | ||||||
{{- toYaml . | nindent 12 }} | ||||||
{{- end }} | ||||||
env: | ||||||
{{- toYaml .Values.workerAuxiliary.extraEnvVars | nindent 12 }} | ||||||
{{- toYaml .Values.worker.extraEnvVars | nindent 12 }} | ||||||
command: | ||||||
- sh | ||||||
- -c | ||||||
|
@@ -273,12 +299,11 @@ extraDeploy: | |||||
- secretRef: | ||||||
name: {{ .Values.solrExistingSecret }} | ||||||
{{- end }} | ||||||
{{- with .Values.worker.extraEnvFrom }} | ||||||
{{- with .Values.workerAuxiliary.extraEnvFrom }} | ||||||
{{- toYaml . | nindent 12 }} | ||||||
{{- end }} | ||||||
env: | ||||||
{{- toYaml .Values.workerAuxiliary.extraEnvVars | nindent 12 }} | ||||||
{{- toYaml .Values.worker.extraEnvVars | nindent 12 }} | ||||||
{{- if .Values.worker.readinessProbe.enabled }} | ||||||
readinessProbe: | ||||||
exec: | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -203,6 +203,9 @@ worker: | |||||
cpu: "150m" | ||||||
extraVolumeMounts: *volMounts | ||||||
extraEnvVars: *envVars | ||||||
extraEnvFrom: | ||||||
- configMapRef: | ||||||
name: worker-env | ||||||
podSecurityContext: | ||||||
runAsUser: 1001 | ||||||
runAsGroup: 101 | ||||||
|
@@ -220,14 +223,34 @@ workerAuxiliary: | |||||
requests: | ||||||
memory: "4Gi" | ||||||
cpu: "2" | ||||||
extraEnvVars: | ||||||
- name: AUXILIARY_WORKER_THREAD_COUNT | ||||||
value: "1" | ||||||
- name: SIDEKIQ_CONFIG | ||||||
value: "config/sidekiq_auxiliary.yml" | ||||||
extraEnvVars: *envVars | ||||||
extraEnvFrom: | ||||||
- configMapRef: | ||||||
name: auxilary-worker-env | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
extraDeploy: | ||||||
- |- | ||||||
--- | ||||||
apiVersion: v1 | ||||||
kind: ConfigMap | ||||||
metadata: | ||||||
name: worker-env | ||||||
labels: | ||||||
{{- include "hyrax.labels" . | nindent 4 }} | ||||||
data: | ||||||
WORKER_CONCURENCY: "5" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
WORKER_ARGS: -q default -q import -q export | ||||||
--- | ||||||
apiVersion: v1 | ||||||
kind: ConfigMap | ||||||
metadata: | ||||||
name: auxiliary-worker-env | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
labels: | ||||||
{{- include "hyrax.labels" . | nindent 4 }} | ||||||
data: | ||||||
WORKER_CONCURENCY: "1" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
WORKER_ARGS: -q auxiliary -q default -q import -q export | ||||||
--- | ||||||
apiVersion: apps/v1 | ||||||
kind: Deployment | ||||||
metadata: | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo