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

fix: security-secretstore-setup volume init semantics #4092

Merged
merged 3 commits into from
Jul 14, 2022
Merged
Show file tree
Hide file tree
Changes from 2 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
6 changes: 2 additions & 4 deletions cmd/security-secretstore-setup/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ----------------------------------------------------------------------------------
# Copyright 2019 Dell Technologies, Inc.
# Copyright 2020 Intel Corp.
# Copyright 2022 Intel Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -52,8 +52,6 @@ COPY --from=builder /edgex-go/cmd/security-secretstore-setup/security-secretstor
# Setup the entry point script, create token dir, and assign perms
COPY --from=builder /edgex-go/cmd/security-secretstore-setup/entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/entrypoint.sh \
&& ln -s /usr/local/bin/entrypoint.sh / \
&& mkdir -p /vault/config/assets \
&& chown -Rh 100:1000 /vault/
&& ln -s /usr/local/bin/entrypoint.sh /
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the comment in line 52 to fit the real implementation


ENTRYPOINT ["entrypoint.sh"]
5 changes: 4 additions & 1 deletion cmd/security-secretstore-setup/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/dumb-init /bin/sh
# ----------------------------------------------------------------------------------
# Copyright (c) 2020 Intel Corporation
# Copyright (c) 2022 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -21,6 +21,9 @@ set -e

# env settings are populated from env files of docker-compose

mkdir -p /vault/config/assets
chown -Rh 100:1000 /vault/

echo "Initializing secret store..."
/security-secretstore-setup --vaultInterval=10

Expand Down