Closed diverdane closed 2 years ago
Code Climate has analyzed commit 5ed806a6 and detected 0 issues on this pull request.
The test coverage on the diff in this pull request is 85.9% (50% is the threshold).
This pull request will bring the total coverage in the repository to 89.8% (-0.2% change).
View more on Code Climate.
Desired Outcome
/conjur/status/CONJUR_SECRETS_PROVIDED
, but this can be mounted by an application container via a shared volume mount at any arbitrary location in the container's file system./conjur/status/CONJUR_SECRETS_UPDATED
, but this can be mounted by an application container via a shared volume mount at any arbitrary location in the container's file system./usr/local/bin/conjur_secrets_provided
that waits for the.../CONJUR_SECRETS_PROVIDED
to be created. This can be used in apostStart
lifecycle hook definition for the SP container, to defer startup of app container until SP has completed its first round of providing secrets..../CONJUR_SECRETS_UPDATED
file to/conjur/status/conjur_secrets_unchanged
. This script returns a non-zero exit status whenever secret files or Kubernetes Secrets have changed. This can be used in alivenessProbe
orreadinessProbe
definition for an application container to force Kubernetes/kubelet to restart this container when secrets have been updated. The Deployment manifest would need to include avolumeMount
to mount this directory/file in the application container, along with thelivenessProbe
/readinessProbe
definition.With the above changes, a
postStart
lifecycle hook for the Secrets Provider container would look like this:And a
livenessProbe
for an application container that would serve as a "file watcher" can potentially look something like this (assuming thelivenessProbe
is not already being used by the container as a health probe):Where the application container (and SP container) would need to include volumeMounts similar to this:
and the Pod would need a Volume defined:
Implemented Changes
/conjur/status/CONJUR_SECRETS_PROVIDED
file after initial round of providing secrets./conjur/status/CONJUR_SECRETS_UPDATED
file whenever secret files or Kubernetes Secrets have been updated**.conjur_secrets_unchanged
script to/conjur/status
in it file system. This directory can be volume mounted by the application container at any arbitrary path in the application container's file system.pkt/secrets
. Provider configuration was split up into separate embedded structs for:.../CONJUR_SECRETS_UPDATED
file when appropriate.Connected Issue/Story
CyberArk internal issue link: ONYX-17885
Definition of Done
Changelog
Test coverage
Documentation
README
s) were updated in this PRBehavior
Security