From 7452be9b1c19c73be0831af26b9d5175bbae73f8 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Wed, 27 May 2020 23:48:26 -0400 Subject: [PATCH] This change to deployment.yaml results in 3 healthy nodes --- deployment.yaml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/deployment.yaml b/deployment.yaml index e996ae1158..7868d60d2c 100644 --- a/deployment.yaml +++ b/deployment.yaml @@ -22,7 +22,7 @@ metadata: labels: app: tts spec: - replicas: 5 + replicas: 3 selector: matchLabels: app: tts @@ -43,21 +43,29 @@ spec: - name: mntdatas3fs # NB: Doesn't set an explicit hostpath because: # error while creating mount source path '...': mkdir ...: file exists - emptyDir: {} + #emptyDir: {} + # NB: *ACTUALLY*, the above error happened with emptyDir too. I don't know + # what the problem is. Additionally, I had to introduce '-o nonempty' as + # described in the env vars section below. + hostPath: + path: /dev/fuse_data_mountpt + type: DirectoryOrCreate containers: - name: s3fs securityContext: privileged: true allowPrivilegeEscalation: true # TODO: Find a pinned tag for this. `latest` is dangerous + # This is ancient (2~3 years old): https://github.com/panubo/docker-s3fs + # This is what it wraps, and it is very recent: https://github.com/s3fs-fuse/s3fs-fuse image: panubo/s3fs:latest # NB: This container spews logs, making Graphana hard to read. I can't figure # out how to filter out by sidecar, label, app, whatever, so I'm disabling these # logs outright. I do not anticipate a problem with s3fs that I'll need logs for. # If I change my mind, I can remove the override setting in the future, because # Docker has the correct entrypoint. - command: ["/bin/sh"] - args: ["-c", "echo 'Disabled s3fs logging in k8s deployment for Graphana' && ./entry.sh 2> /dev/null"] + #command: ["/bin/sh"] + #args: ["-c", "echo 'Disabled s3fs logging in k8s deployment for Graphana' && ./entry.sh 2> /dev/null"] volumeMounts: - name: devfuse mountPath: /dev/fuse @@ -82,6 +90,12 @@ spec: value: "/data" - name: DEBUG value: "true" + # Per this message, + # "s3fs: MOUNTPOINT directory /data is not empty. if you are sure this is safe, can use + # the 'nonempty' mount option" + # To appease 'hostMount' volume, I think this will work: + - name: S3FS_ARGS + value: "-o nonempty" - name: tts # NB: Container builds are triggered by Github Actions #image: docker.pkg.github.com/echelon/voder/tts-service:374e1a477d90