Skip to content

Fix skip_template & skip_secret_template options. Reorder manifest apply #222

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alexwilkerson
Copy link

@alexwilkerson alexwilkerson commented Mar 5, 2025

This PR is to make the skip_template and skip_secret_template options functional. They currently do not work and still attempt to run when they are set to true.

The application order of the two manifest files was also changes so that the secret_template manifest is applied prior to the template manifest since the resources in the template manifest may need to use the secrets added by the secret_template.

Changes:

  • Add check for when skip_template is set to true in the applyManifests function to skip the k8s manifest set in template. This will also skip dry runs
  • Add check in applyManifests function to check if the template variable is empty prior to applying changes
  • Add check for when skip_secret_template is set to true in the applyManifests function to skip the k8s manifest set in secret_template. This will also skip dry runs
  • Add check in applyManifests function to check if the secret_template variable is empty prior to applying changes
  • Reverse the order of k8s manifest applications so that the secret_template manifest is applied before the template manifest. This is a dependency issue where some of the k8s resources from the template manifest will need to have access to the secrets from the secret_template manifest
  • Add test for skip_template: true
  • Add test for skip_secret_template: true
  • Add test for skip_template: true, skip_secret_template: true
  • Add test for skip_template: true, dry_run: true
  • Add test for skip_secret_template: true, dry_run: true
  • Add test for skip_template: true, skip_secret_template: true, dry_run: true
  • Update DOCS.md to be more explicit about above changes

If this is a change to the core functionality, did you make a corresponding PR to drone-eks?

  • yes
  • no
  • n/a

Did you update the tests?

  • yes
  • no
  • n/a

Did you update the docs?

  • yes
  • no
  • n/a

…ply secrets template first, since secrets may be dependencies for the main kube manifest
@alexwilkerson alexwilkerson marked this pull request as ready for review March 5, 2025 15:58
@alexwilkerson alexwilkerson requested a review from a team as a code owner March 5, 2025 15:58
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.

1 participant