DEVOPS-3213 Add customerPortal Lint rules and update quip links #120
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
During testing of changes, a number of tenants triggered the customerPortal lint rules:ERROR <tenant>: WEB_SITE_KEY and GATEWAY_WEB_CLIENT_TOKEN must be present if customerPortal is enabled. Please refer to https://github.com/Ridecell/comp-customer-portal#required-kubernetes-config-for-successful-deployment for help.
Logic adjusted to just check for
GATEWAY_WEB_CLIENT_TOKEN
.Additional changes made for having detailed message for
no instance found
error are repetitive. It would be better to re-organize the code as a function (something likecheckInstanceExists
that could be re-used in all these locations, but considering to leave that work for a separate PR)Dec 8:
Created new function called DecryptSecretValue to assist in checking fernet key value is not an empty string during linting.
However, the setup process for decrypting a secret value in the lint check adds 1 minute to the run time.
(Previously,
ridectl lint
would only take 1 second. With the extra check on the decrypted secret value, it takes 54- 55 seconds in total.)