Closed jspaleta closed 4 years ago
Could you provide a little more context about the requirement for developing/testing/debugging sensuctl commands and plugins? The sdk will be responsible for checking the presence of the env var and the validity of the license.
Exposing the sensu license as an env var for testing can simply be done with the following command:
SENSU_LICENSE_FILE=$(sensuctl license info --format json)
You can also set and retrieve env vars in go programs and tests by using the os package.
Given @nikkictl's fantastic suggestion, I am going to close this issue. It feels unnecessary to expose the license file on operator hosts unless specifically required for commercial handler asset development (likely just Sensu Inc.).
Feature Suggestion
Expose sensu license as part of sensuctl env as SENSU_LICENSE_FILE into sensuctl has ability to read the license key
Possible Implementation
Context
This would lower the bar a little bit to develop/test/debug sensuctl commands and other sensu plugins that will be making use of the sensu-plugin-sdk feature that requires this envvar to be set and valid.