feat(clouddriver): add a new task that checks if the application specified in the moniker or cluster keys exists in front50 and/or clouddriver #4788
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.
Introduces a new CheckIfApplicationExists task that is meant to be added to various pipeline stages. This task performs the following actions:
checks if the application defined in the pipeline stage context is known to front50 and/or clouddriver. If it isn't, this stage throws an exception. Without this task, clouddriver ends up creating a new synthetic application that is not known to front50 and it causes a whole lot of problems for us, as this application does not have any permissions, doesn't have account rbac etc.
There are three main types of pipeline stages where this task needs to be added:
Servergroup, cluster and manifests stages obtain an application name in different ways. Hence, a separate CheckIfApplicationExists exists for all of them which extend a common AbstractCheckIfApplicationExistsTask
Config knobs are provided at each stage so that all of these stages can be individually configured to not perform this check if needed. These configs are by default set to false, so this is an opt-in capability. The complete list of configs are: