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

Remove check for presence of secrets #103

Merged
merged 2 commits into from
Dec 11, 2019
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
17 changes: 4 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ FROM golang:1.13.4 as builder
WORKDIR /go/src/github.com/gocardless/theatre
COPY . /go/src/github.com/gocardless/theatre
RUN make VERSION=$(cat VERSION) build
# Clone our fork of envconsul and build it
RUN git clone https://github.com/gocardless/envconsul.git \
&& make -C envconsul linux/amd64 \
&& mv envconsul/pkg/linux_amd64/envconsul bin

# Use ubuntu as our base package to enable generic system tools
FROM ubuntu:bionic-20191029
Expand All @@ -13,22 +17,9 @@ RUN set -x \
&& apt-get update -y \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
unzip \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*

# Install envconsul for theatre-envconsul
ENV ENVCONSUL_VERSION=0.9.1 \
ENVCONSUL_SHA256=b58d032ad61937eca9def17482807124fa1bafac7e7bb5e025ea8a28d9c6ce42

RUN set -x \
&& curl -o /tmp/envconsul.zip -fsL https://releases.hashicorp.com/envconsul/0.9.1/envconsul_${ENVCONSUL_VERSION}_linux_amd64.zip \
&& echo ${ENVCONSUL_SHA256} /tmp/envconsul.zip | sha256sum -c \
&& unzip /tmp/envconsul.zip -d /tmp \
&& mv /tmp/envconsul /usr/local/bin/ \
&& rm /tmp/envconsul.zip

WORKDIR /
COPY --from=builder /go/src/github.com/gocardless/theatre/bin/* /usr/local/bin/
ENTRYPOINT ["/bin/bash"]
4 changes: 0 additions & 4 deletions cmd/theatre-envconsul/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,6 @@ func mainError(ctx context.Context, command string) (err error) {
}
}

if len(secretEnv) == 0 {
return errors.New("no 'vault:' prefix found in config or environment")
}

envconsulConfig := execVaultOptions.EnvconsulConfig(secretEnv, vaultToken, *execTheatreEnvconsulBinary, *execCommand)
configJSONContents, err := json.Marshal(envconsulConfig)
if err != nil {
Expand Down