summaryrefslogtreecommitdiffstats
path: root/controller-api
diff options
context:
space:
mode:
authorHarald Musum <musum@yahooinc.com>2021-09-28 14:49:56 +0200
committerHarald Musum <musum@yahooinc.com>2021-09-28 14:49:56 +0200
commitb9a11e9c3d78562fc2e6b433fd9196c5255eac8f (patch)
tree7a456201539969de8ebe2f13aef0c8a0c90c565c /controller-api
parent731a1b3aed770e34c2ec1f2941573f5c7ec11b49 (diff)
Wire in dryRun deployment option
Diffstat (limited to 'controller-api')
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/application/v4/model/DeploymentData.java22
1 files changed, 20 insertions, 2 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/application/v4/model/DeploymentData.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/application/v4/model/DeploymentData.java
index 1608e72b0b6..1f1f8577a32 100644
--- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/application/v4/model/DeploymentData.java
+++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/application/v4/model/DeploymentData.java
@@ -1,4 +1,4 @@
-// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.controller.api.application.v4.model;
import com.yahoo.component.Version;
@@ -6,7 +6,6 @@ import com.yahoo.config.provision.ApplicationId;
import com.yahoo.config.provision.DockerImage;
import com.yahoo.config.provision.zone.ZoneId;
import com.yahoo.vespa.athenz.api.AthenzDomain;
-import com.yahoo.vespa.hosted.controller.api.integration.aws.TenantRoles;
import com.yahoo.vespa.hosted.controller.api.integration.billing.Quota;
import com.yahoo.vespa.hosted.controller.api.integration.certificates.EndpointCertificateMetadata;
import com.yahoo.vespa.hosted.controller.api.integration.configserver.ContainerEndpoint;
@@ -37,7 +36,9 @@ public class DeploymentData {
private final Quota quota;
private final List<TenantSecretStore> tenantSecretStores;
private final List<X509Certificate> operatorCertificates;
+ private final boolean dryRun;
+ // TODO: Remove when users have been updated to use constructor below
public DeploymentData(ApplicationId instance, ZoneId zone, byte[] applicationPackage, Version platform,
Set<ContainerEndpoint> containerEndpoints,
Optional<EndpointCertificateMetadata> endpointCertificateMetadata,
@@ -46,6 +47,19 @@ public class DeploymentData {
Quota quota,
List<TenantSecretStore> tenantSecretStores,
List<X509Certificate> operatorCertificates) {
+ this(instance, zone, applicationPackage, platform, containerEndpoints, endpointCertificateMetadata,
+ dockerImageRepo, athenzDomain, quota, tenantSecretStores, operatorCertificates, false);
+ }
+
+ public DeploymentData(ApplicationId instance, ZoneId zone, byte[] applicationPackage, Version platform,
+ Set<ContainerEndpoint> containerEndpoints,
+ Optional<EndpointCertificateMetadata> endpointCertificateMetadata,
+ Optional<DockerImage> dockerImageRepo,
+ Optional<AthenzDomain> athenzDomain,
+ Quota quota,
+ List<TenantSecretStore> tenantSecretStores,
+ List<X509Certificate> operatorCertificates,
+ boolean dryRun) {
this.instance = requireNonNull(instance);
this.zone = requireNonNull(zone);
this.applicationPackage = requireNonNull(applicationPackage);
@@ -57,6 +71,7 @@ public class DeploymentData {
this.quota = quota;
this.tenantSecretStores = tenantSecretStores;
this.operatorCertificates = operatorCertificates;
+ this.dryRun = dryRun;
}
public ApplicationId instance() {
@@ -102,4 +117,7 @@ public class DeploymentData {
public List<X509Certificate> operatorCertificates() {
return operatorCertificates;
}
+
+ public boolean isDryRun() { return dryRun; }
+
}