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

Bypass SOPS by adding dry run mode #46

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

maorohana-redis
Copy link

This PR is providing an option to bypass SOPS runs when verifying only the kustomize overlay in CI workflows, enabled via an environment variable (SOPS_DRY_RUN).

@jcassee
Copy link
Contributor

jcassee commented Apr 10, 2024

Hi @maorohana-redis, thank you for the PR. I see the value in being able to verify the structure of the kustomization result without access to the SOPS keys.

A few questions:

  • Is SOPS_DRY_RUN the best variable name? I'm not sure we are dry-running sops as such.
  • Is leaving the sops-encrypted data the right approach? A static string like "sops-encrypted data omitted" might be clearer.
  • You only touched the decryption of files. Could you also handle envs?
  • Could you write some tests for this functionality?
  • Could you add documentation to the README?

@maorohana-redis
Copy link
Author

maorohana-redis commented Apr 11, 2024

Hi @jcassee thanks for your fast response:

  1. I'm not sure it's the best name , maybe "SKIP_SOPS_DECRYPTION"?
  2. Now basically when we parse envs or file sources i set each key value to a placeholder value.
  3. Added
  4. Added test for handling envs + files.
  5. Added

@maorohana-redis
Copy link
Author

@jcassee can you review ?

@maorohana-redis
Copy link
Author

@jcassee waiting for your input

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants