diff --git a/Dockerfile.sidecar b/Dockerfile.sidecar index 8c6593a03..ce659400a 100644 --- a/Dockerfile.sidecar +++ b/Dockerfile.sidecar @@ -26,8 +26,8 @@ RUN apt-get update \ COPY hack/docker/rclone.gpg /root/rclone.gpg RUN gpg --import /root/rclone.gpg -RUN wget -nv https://github.com/ncw/rclone/releases/download/v1.46/rclone-v1.46-linux-amd64.zip \ - && wget -nv https://github.com/ncw/rclone/releases/download/v1.46/SHA256SUMS \ +RUN wget -nv https://github.com/ncw/rclone/releases/download/v1.48.0/rclone-v1.48.0-linux-amd64.zip \ + && wget -nv https://github.com/ncw/rclone/releases/download/v1.48.0/SHA256SUMS \ && gpg --verify --output=- SHA256SUMS > sums \ && sha256sum -c --ignore-missing sums \ && unzip rclone-*-linux-amd64.zip \ diff --git a/hack/docker/sidecar-entrypoint.sh b/hack/docker/sidecar-entrypoint.sh index d0fe59b8e..8bda06fad 100755 --- a/hack/docker/sidecar-entrypoint.sh +++ b/hack/docker/sidecar-entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e echo "Create rclone.conf file." @@ -30,10 +30,14 @@ account = ${AZUREBLOB_ACCOUNT} key = ${AZUREBLOB_KEY} EOF -echo "Create google-credentials.json file." -cat < /tmp/google-credentials.json -${GCS_SERVICE_ACCOUNT_JSON_KEY} +if [[ -n "${GCS_SERVICE_ACCOUNT_JSON_KEY:-}" ]]; then + echo "Create google-credentials.json file." + cat < /tmp/google-credentials.json + ${GCS_SERVICE_ACCOUNT_JSON_KEY} EOF +else + touch /tmp/google-credentials.json +fi SIDECAR_BIN=mysql-operator-sidecar VERBOSE="--debug" diff --git a/pkg/controller/mysqlbackup/internal/syncer/job.go b/pkg/controller/mysqlbackup/internal/syncer/job.go index 13d768064..218f09a06 100644 --- a/pkg/controller/mysqlbackup/internal/syncer/job.go +++ b/pkg/controller/mysqlbackup/internal/syncer/job.go @@ -133,6 +133,14 @@ func (s *jobSyncer) ensurePodSpec(in core.PodSpec) core.PodSpec { s.backup.GetBackupURL(s.cluster), } + in.ServiceAccountName = s.cluster.Spec.PodSpec.ServiceAccountName + + in.Affinity = s.cluster.Spec.PodSpec.Affinity + in.ImagePullSecrets = s.cluster.Spec.PodSpec.ImagePullSecrets + in.NodeSelector = s.cluster.Spec.PodSpec.NodeSelector + in.PriorityClassName = s.cluster.Spec.PodSpec.PriorityClassName + in.Tolerations = s.cluster.Spec.PodSpec.Tolerations + boolTrue := true in.Containers[0].Env = []core.EnvVar{ {