Skip to content
This repository has been archived by the owner on Mar 12, 2023. It is now read-only.

Commit

Permalink
Add postgres (rdb) arg logcollector=off. (#2)
Browse files Browse the repository at this point in the history
This makes init.sh script redundant and it has been removed.
  • Loading branch information
ChrisEke authored Feb 10, 2021
1 parent 70c9eac commit d643575
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 302 deletions.
139 changes: 0 additions & 139 deletions lib/talkyard/files/init.sh

This file was deleted.

8 changes: 2 additions & 6 deletions lib/talkyard/talkyard.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
+ container.withEnv([
container.envType.fromSecretRef('POSTGRES_PASSWORD', 'talkyard-rdb-secrets', 'postgres-password'),
])
+ container.withArgs('--logging_collector=off')
+ container.mixin.readinessProbe.exec.withCommand($._probe.rdb.readiness.execCommand)
+ container.mixin.readinessProbe.withInitialDelaySeconds(10)
+ container.mixin.readinessProbe.withTimeoutSeconds(6)
Expand All @@ -70,13 +71,8 @@
+ container.mixin.livenessProbe.withTimeoutSeconds(6),
],
)
+ deployment.mixin.metadata.withLabels(commonLabels + c.rdb.labels)
+ $.util.configMapVolumeMount(self.initShOverrideConfigMap, '/docker-entrypoint-initdb.d'),
+ deployment.mixin.metadata.withLabels(commonLabels + c.rdb.labels),
service: $.util.serviceFor(self.deployment),
initShOverrideConfigMap: configMap.new(c.rdb.name + '-init-sh-override')
+ configMap.withData({
'init.sh': importstr 'files/init.sh',
}),
},
cache: {
deployment: deployment.new(
Expand Down
1 change: 0 additions & 1 deletion manifests/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ resources:
- cache-Deployment.yaml
- cache-Service.yaml
- rdb-Deployment.yaml
- rdb-init-sh-override-ConfigMap.yaml
- rdb-Service.yaml
- search-Deployment.yaml
- search-environment-vars-ConfigMap.yaml
Expand Down
13 changes: 3 additions & 10 deletions manifests/rdb-Deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ spec:
name: rdb
template:
metadata:
annotations:
rdb-init-sh-override-hash: 7c3cde4a1adfa2344a4bbab371fafcce
labels:
name: rdb
spec:
containers:
- env:
- args:
- --logging_collector=off
env:
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
Expand Down Expand Up @@ -52,10 +52,3 @@ spec:
initialDelaySeconds: 10
periodSeconds: 30
timeoutSeconds: 6
volumeMounts:
- mountPath: /docker-entrypoint-initdb.d
name: rdb-init-sh-override
volumes:
- configMap:
name: rdb-init-sh-override
name: rdb-init-sh-override
146 changes: 0 additions & 146 deletions manifests/rdb-init-sh-override-ConfigMap.yaml

This file was deleted.

0 comments on commit d643575

Please sign in to comment.