Skip to content

Commit

Permalink
3540 remove set-env-secrets.src and references (#3632)
Browse files Browse the repository at this point in the history
<!-- Ensure the PR title reflects the feature or bug name -->

## What was the problem?
ArgoCD secrets migration made the bundled secret previously used to
inject environment variables into a pod redundant; the unpacking code
and references to it have been removed. Keeping the script meant the
legacy bundled secrets which were kept around for legacy reasons were
overwriting secrets provided by Vault, and so it needed to be removed.
The bundled secrets are to be removed in the argocd-applications-vault
repo.

Associated tickets or Slack threads:
- #3540 

## How does this fix it?[^1]
Not performing the `set-env-secrets.src` steps means secrets injected
from Vault will not be overwritten by old versions of the secrets.

[^1]: [Pull-Requests
guidelines](https://github.com/department-of-veterans-affairs/abd-vro/wiki/Pull-Requests).
If PR is significant, update [Current Software
State](https://github.com/department-of-veterans-affairs/abd-vro/wiki/Current-Software-State)
wiki page.
[^secrel]: To check if a PR will succeed in the SecRel workflow, [test
PRs in the SecRel
pipeline](https://github.com/department-of-veterans-affairs/abd-vro-internal/wiki/Secure-Release-process#to-test-prs-in-the-secrel-pipeline).
  • Loading branch information
brostk authored Oct 30, 2024
2 parents 176b71a + 483f3d4 commit 237c745
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ docker {
// Specify files to copy into Docker build context
files "docker-entryprep.sh", "docker-entrypoint.sh"
copyFromResources(copySpec, [
'/docker/set-env-secrets.src',
'/docker/entrypoint-wrapper.sh'
])
}
Expand Down
2 changes: 1 addition & 1 deletion gradle-plugins/src/main/resources/docker/Dockerfile-java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ WORKDIR /app

# https://stackoverflow.com/a/46801962
# Copy script that runs docker-entrypoint.sh if it exists, otherwise run jar file
COPY set-env-secrets.src entrypoint-wrapper.sh docker-entry*.sh ./
COPY entrypoint-wrapper.sh docker-entry*.sh ./

ARG JAR_FILE
ENV JAR_FILENAME=${JAR_FILE}
Expand Down
2 changes: 1 addition & 1 deletion gradle-plugins/src/main/resources/docker/Dockerfile-python
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RUN pip install --default-timeout=100 --no-cache-dir -r requirements.txt

# https://stackoverflow.com/a/46801962
# Copy script that runs docker-entrypoint.sh if it exists
COPY set-env-secrets.src entrypoint-wrapper.sh docker-entry*.sh ./
COPY entrypoint-wrapper.sh docker-entry*.sh ./

# Copy application code, which changes more often,
# along with files specified in local.python.container-service-convention
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
# and local.python.container-service-convention.
# To run your own script, create docker-entrypoint.sh in your Gradle module.

# Sets environment variable secrets
[ -e set-env-secrets.src ] && . ./set-env-secrets.src

if [ -e /app/docker-entryprep.sh ]; then
. /app/docker-entryprep.sh "$@"
fi
Expand Down
2 changes: 1 addition & 1 deletion svc-bgs-api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN gem install bundler:2.5.4 --no-document && \

# https://stackoverflow.com/a/46801962
# Copy script that runs docker-entrypoint.sh if it exists
COPY set-env-secrets.src entrypoint-wrapper.sh docker-entry*.sh ./
COPY entrypoint-wrapper.sh docker-entry*.sh ./

# === Image layers above this line are general and will be reused as cache when building the image.
# Put commands that produce project-specific image layers below this line.
Expand Down
2 changes: 1 addition & 1 deletion vro-streamlit/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ RUN pip install --default-timeout=100 --no-cache-dir -r requirements.txt

# https://stackoverflow.com/a/46801962
# Copy script that runs docker-entrypoint.sh if it exists
COPY set-env-secrets.src entrypoint-wrapper.sh docker-entry*.sh ./
COPY entrypoint-wrapper.sh docker-entry*.sh ./

# Copy application code, which changes more often,
# along with files specified in local.python.container-service-convention
Expand Down

0 comments on commit 237c745

Please sign in to comment.