cyberark / secrets-provider-for-k8s

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

Adds creation of sentinel files for checking provider status #450

Closed diverdane closed 2 years ago

diverdane commented 2 years ago

Desired Outcome

With the above changes, a postStart lifecycle hook for the Secrets Provider container would look like this:

        lifecycle:
          postStart:
            exec:
              command:
              - /usr/local/bin/conjur-secrets-provided

And a livenessProbe for an application container that would serve as a "file watcher" can potentially look something like this (assuming the livenessProbe is not already being used by the container as a health probe):

        livenessProbe:
          exec:
            command:
            - /mounted/status/conjur-secrets-unchanged
          failureThreshold: 1
          initialDelaySeconds: 5
          periodSeconds: 5
          successThreshold: 1
          timeoutSeconds: 1

Where the application container (and SP container) would need to include volumeMounts similar to this:

        volumeMounts:
        - mountPath: /mounted/status
          name: conjur-status

and the Pod would need a Volume defined:

      volumes:
      - name: conjur-status
        emptyDir:
          medium: Memory

Implemented Changes

Connected Issue/Story

CyberArk internal issue link: ONYX-17885

Definition of Done

Changelog

Test coverage

Documentation

Behavior

Security

codeclimate[bot] commented 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.