cyberark / secrets-provider-for-k8s

Cyberark secrets provider for k8s
Apache License 2.0
26 stars 11 forks source link

Check for CONTAINER_MODE environmental variable for rotation #467

Closed rpothier closed 2 years ago

rpothier commented 2 years ago

Desired Outcome

If using environmental variables to configure secrets provider and you add secrets rotation, you should be able to set the container mode with environmental variable.

Implemented Changes

Add a check for the CONTAINER_MODE environmental variable. In main.go just added a check to read the environmental variable to keep the changes to a minimum as these changes will be removed when we depreciate env variables.

Connected Issue/Story

Resolves #N/A

Definition of Done

At least 1 todo must be completed in the sections below for the PR to be merged.

Changelog

Test coverage

Documentation

Behavior

Security

jtuttle commented 2 years ago

I'm not quite as familiar with Go testing, but is there an easy way to slip in a test for this change? Seems like a good candidate for a bug the automated tests could have caught.

codeclimate[bot] commented 2 years ago

Code Climate has analyzed commit 45a986e8 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 89.2% (0.0% change).

View more on Code Climate.