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

Adds Helm option to use independently installed Conjur connect ConfigMap #349

Merged
merged 2 commits into from
Aug 10, 2021

Conversation

diverdane
Copy link
Contributor

@diverdane diverdane commented Aug 2, 2021

What does this PR do?

This change adds the following for the Secrets Provider stand-alone mode
Helm chart:

  • A Helm chart value for allowing the Secrets Provider to get its Conjur
    connection information via an independently installed (i.e. outside of this Helm
    chart) Conjur connection info ConfigMap, instead of using Pod environment variables.
    This will allow this Helm chart to be used in conjunction with the Kubernetes cluster
    prep Helm chart and the application Namespace prep Helm chart as described here:

    If the Conjur connection ConfigMap is configured, the other Conjur connect
    Helm chart settings are ignored.

  • Adds Helm unit tests that make use of the 'helm-unittest' plugin. See:
    https://github.com/quintush/helm-unittest/blob/master/DOCUMENT.md

  • Adds Helm schema validation tests based upon helm lint ....

  • In values.yaml, the required settings are commented out. This is done
    in order for the required settings in values.schema.json to take
    effect, so that the error message that is generated when a required
    setting is not provided is abundantly clear that a the required setting
    is missing. Without commenting out these settings in values.yaml, the
    Helm values.schema.json validation interprets these settings as always
    being "set".

  • In values.schema.json, for any settings that have default values
    defined in values.yaml, the required settings in
    values.schema.json are deleted, since these settings will never
    be unset due to their default settings.

  • Adds a GitHub action for running the Helm unittest and the Helm
    schema validation test.

What ticket does this PR close?

This PR is a pre-requisite change for a couple of issues in the cyberark/conjur-authn-k8s-client repository:

Checklists

Change log

  • The CHANGELOG has been updated, or
  • This PR does not include user-facing changes and doesn't require a CHANGELOG update

Test coverage

  • This PR includes new unit and integration tests to go with the code changes, or
  • The changes in this PR do not require tests

Documentation

  • Docs (e.g. READMEs) were updated in this PR, and/or there is a follow-on issue to update docs, or
  • This PR does not require updating any documentation

@diverdane diverdane self-assigned this Aug 2, 2021
@diverdane diverdane requested review from a team as code owners August 2, 2021 23:00
@diverdane diverdane force-pushed the helm-use-conjur-conn-configmap branch from 9330e09 to 6ac1a6b Compare August 2, 2021 23:14
This change adds the following for the Secrets Provider stand-alone mode
Helm chart:

- A Helm chart value for allowing the Secrets Provider to get its Conjur
  connection information via an independently (i.e. outside of this Helm
  chart), instead of using Pod environment variables. This will allow
  this Helm chart in conjunction with the Kubernetes cluster prep Helm chart
  and the application Namespace prep Helm chart as described here:
  - https://github.com/cyberark/conjur-authn-k8s-client/tree/master/helm/conjur-config-namespace-prep
  - https://github.com/cyberark/conjur-authn-k8s-client/tree/master/helm/conjur-config-cluster-prep
  If the Conjur connection ConfigMap is configured, the other Conjur connect
  Helm chart settings are ignored.

- Adds Helm unit tests that make use of the 'helm-unittest' plugin. See:
  https://github.com/quintush/helm-unittest/blob/master/DOCUMENT.md

- Adds Helm schema validation tests based upon `helm lint ...`.

- In `values.yaml`, the required settings are commented out. This is done
  in order for the `required` settings in `values.schema.json` to take
  effect. Without commenting out these settings in `values.yaml`, the
  Helm schema validation interprets these settings as being "set",
  even if they are left as is, without overriding with explicit values.

- In `values.schema.json`, for any settings that have default values
  defined in `values.yaml`, the `required` settings in
  `values.schema.json` are deleted, since these settings will never
  be unset due to their default settings.

- Added a GitHub action for running the Helm unittest and the Helm
  schema validation tests.
@diverdane diverdane force-pushed the helm-use-conjur-conn-configmap branch from 6ac1a6b to fbb6d26 Compare August 3, 2021 13:17
Copy link
Contributor

@imheresamir imheresamir left a comment

Choose a reason for hiding this comment

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

LGTM!

@codeclimate
Copy link

codeclimate bot commented Aug 6, 2021

Code Climate has analyzed commit f0594e5 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 87.5% (0.0% change).

View more on Code Climate.

@imheresamir imheresamir merged commit 7dbe274 into main Aug 10, 2021
@imheresamir imheresamir deleted the helm-use-conjur-conn-configmap branch August 10, 2021 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants