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

Increase ingress timeout for web api and db api configmap #336

Merged
merged 4 commits into from
Jul 18, 2024
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
14 changes: 14 additions & 0 deletions osm-seed/templates/db/db-mapconfig.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- if .Values.db.enabled -}}
{{- if .Values.db.postgresqlConfig.enabled -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-db-postgresql-config
labels:
app: {{ template "osm-seed.name" . }}
release: {{ .Release.Name }}
data:
postgresql.conf: |
{{ .Values.db.postgresqlConfig.values | indent 4 }}
{{- end }}
{{- end }}
19 changes: 16 additions & 3 deletions osm-seed/templates/db/db-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,12 @@ spec:
value: {{ .Values.db.persistenceDisk.mountPath }}
- name: POD_IP
valueFrom: { fieldRef: { fieldPath: status.podIP } }
- name: LOG_STATEMENT
value: {{ default "none" .Values.db.env.LOG_STATEMENT | quote }}
{{- if .Values.db.postgresqlConfig.enabled }}
command:
- "sh"
- "-c"
- "su postgres -c 'postgres -c config_file=/etc/postgresql/postgresql.conf'"
{{- end }}
livenessProbe:
exec:
command:
Expand All @@ -71,10 +75,14 @@ spec:
periodSeconds: 5
volumeMounts:
- name: postgres-storage
mountPath: {{ .Values.db.persistenceDisk.mountPath }}
mountPath: /var/lib/postgresql/data
subPath: {{ .Values.db.persistenceDisk.subPath }}
- name: shared-memory
mountPath: /dev/shm
{{- if .Values.db.postgresqlConfig.enabled }}
- name: db-postgresql-config
mountPath: /etc/postgresql/
{{- end }}
{{- if .Values.db.resources.enabled }}
resources:
requests:
Expand All @@ -96,6 +104,11 @@ spec:
emptyDir:
medium: Memory
sizeLimit: {{ .Values.db.sharedMemorySize }}
{{- if .Values.db.postgresqlConfig.enabled }}
- name: db-postgresql-config
configMap:
name: {{ .Release.Name }}-db-postgresql-config
{{- end }}
{{- if .Values.db.nodeSelector.enabled }}
nodeSelector:
{{ .Values.db.nodeSelector.label_key }} : {{ .Values.db.nodeSelector.label_value }}
Expand Down
8 changes: 4 additions & 4 deletions osm-seed/templates/web/web-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ metadata:
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: letsencrypt-prod-issuer
nginx.ingress.kubernetes.io/proxy-body-size: 100m
nginx.ingress.kubernetes.io/proxy-connect-timeout: "600"
nginx.ingress.kubernetes.io/proxy-read-timeout: "600"
nginx.ingress.kubernetes.io/proxy-send-timeout: "600"
nginx.ingress.kubernetes.io/proxy-body-size: 200m
nginx.ingress.kubernetes.io/proxy-connect-timeout: "1200"
nginx.ingress.kubernetes.io/proxy-read-timeout: "1200"
nginx.ingress.kubernetes.io/proxy-send-timeout: "1200"
spec:
ingressClassName: nginx
tls:
Expand Down
30 changes: 25 additions & 5 deletions osm-seed/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ db:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: "1234"
ENVIRONMENT: "production"
LOG_STATEMENT: "all"
persistenceDisk:
enabled: false
mountPath: /var/lib/postgresql/data
Expand All @@ -85,8 +84,8 @@ db:
localVolumeHostPath: /mnt/db-data
localVolumeSize: 10Gi
# AWS
AWS_ElasticBlockStore_volumeID: vol-1234bcd
AWS_ElasticBlockStore_size: 500Gi
AWS_ElasticBlockStore_volumeID: vol-06a278f66b15d4b3c
AWS_ElasticBlockStore_size: 50Gi
# GCP
GCP_gcePersistentDisk_pdName: osmseed-disk-db-v1
GCP_gcePersistentDisk_size: 50Gi
Expand All @@ -105,11 +104,32 @@ db:
nodeSelector:
enabled: false
sharedMemorySize: 64Mi
# To use postgresqlConfig, you need to have already $PGDATA set up
postgresqlConfig:
enabled: false
values: |
listen_addresses = '*'
max_connections = 100
shared_buffers = 128MB
effective_cache_size = 256MB
maintenance_work_mem = 64MB
checkpoint_completion_target = 0.7
wal_buffers = 16MB
default_statistics_target = 100
random_page_cost = 1.1
effective_io_concurrency = 200
work_mem = 4MB
min_wal_size = 80MB
max_wal_size = 1GB
max_worker_processes = 4
max_parallel_workers_per_gather = 2
max_parallel_workers = 4

# ====================================================================================================
# Variables for osm-seed website
# ====================================================================================================
web:
enabled: true
enabled: false
image:
name: ""
tag: ""
Expand Down Expand Up @@ -152,7 +172,7 @@ web:
# Variables for memcached. Memcached is used to store session cookies
# ====================================================================================================
memcached:
enabled: true
enabled: false
nodeSelector:
enabled: false
label_key: nodegroup_type
Expand Down
Loading