-
Notifications
You must be signed in to change notification settings - Fork 805
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(clouddriver): add a new task that checks if the application spec…
…ified in the moniker or cluster keys exists in front50 and/or clouddriver (#4788) * feat(clouddriver): introduce a 'checkIfApplicationExists' task that checks if the application defined in the stage context is known to front50 and/or clouddriver * also refactor the task configuration properties to make it more manageable as we go ahead and add more task specific config properties. * also make it easy to reuse common properties like RetryConfig * feat(clouddriver): add a 'check if application exists' task for server group workflows * chore(clouddriver): simplify get application name logic in determineHealthProvidersTask * feat(clouddriver): update server group stages to include 'check if application exists' task * feat(clouddriver): add a 'check if application exists' task for cluster based workflows * feat(clouddriver): update cluster based stages to include 'check if application exists' task * feat(clouddriver): add a 'check if application exists' task for k8s manifest workflows * feat(clouddriver): update k8s manifest stages to include 'check if application exists' task * chore(clouddriver): use simpler presence check * feat(clouddriver): enable audit mode for checking if application exists in front50 --------- Co-authored-by: Apoorv Mahajan <[email protected]>
- Loading branch information
1 parent
3e98d0a
commit 51a9acf
Showing
24 changed files
with
1,160 additions
and
49 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
...m/netflix/spinnaker/orca/clouddriver/config/tasks/CheckIfApplicationExistsTaskConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright 2022 Salesforce.com, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.netflix.spinnaker.orca.clouddriver.config.tasks; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class CheckIfApplicationExistsTaskConfig { | ||
// controls whether clouddriver should be queried for an application or not. Defaults to true | ||
boolean checkClouddriver = true; | ||
|
||
// controls whether the task should fail or simply log a warning | ||
boolean auditModeEnabled = true; | ||
|
||
// front50 specific retry config. This is only applicable when services.front50.enabled: true | ||
private RetryConfig front50Retries = new RetryConfig(); | ||
|
||
// clouddriver specific retry config. This is only applicable when checkClouddriver: true | ||
private RetryConfig clouddriverRetries = new RetryConfig(); | ||
} |
31 changes: 31 additions & 0 deletions
31
...iver/src/main/groovy/com/netflix/spinnaker/orca/clouddriver/config/tasks/RetryConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright 2022 Salesforce.com, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.netflix.spinnaker.orca.clouddriver.config.tasks; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class RetryConfig { | ||
// total number of attempts | ||
int maxAttempts = 6; | ||
|
||
// time in ms to wait before subsequent retry attempts | ||
long backOffInMs = 5000; | ||
|
||
// flag to enable exponential backoff | ||
boolean exponentialBackoffEnabled = false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.