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

skip cert writing and variable setting if concat certs starts with ; #24

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

msarahan
Copy link
Contributor

The problem being approached here is how to handle the absence of certificates. The input of certificates looks like:

        with:
          cert_concat: "${{ secrets.OTEL_EXPORTER_OTLP_CA_CERTIFICATE }};${{ secrets.OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE }};${{ secrets.OTEL_EXPORTER_OTLP_CLIENT_KEY }}"

If these secrets are not set, they'll just evaluate as empty, so our cert_concat value should come out looking like ;;. This startsWith test should work, as should many other simple string comparisons. The cleanest way is probably to try a different way of setting the input to cert_concat, such that it is an empty string when the variables are not set. That is left for a future exercise, because this cert code is likely to go away soon anyway. We don't really want to be using certs.

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