blob: 8ebb449ceda01330ade36e5373278cf0b73d2ed1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.config.model.api;
import com.yahoo.component.Version;
import com.yahoo.config.application.api.ApplicationPackage;
import com.yahoo.config.application.api.DeployLogger;
import com.yahoo.config.application.api.FileRegistry;
import com.yahoo.config.provision.ApplicationId;
import com.yahoo.config.provision.AthenzDomain;
import com.yahoo.config.provision.HostName;
import com.yahoo.config.provision.Zone;
import java.io.File;
import java.net.URI;
import java.util.List;
import java.util.Optional;
import java.util.Set;
/**
* Model context containing state provided to model factories.
*
* @author Ulf Lilleengen
*/
public interface ModelContext {
ApplicationPackage applicationPackage();
Optional<Model> previousModel();
Optional<ApplicationPackage> permanentApplicationPackage();
Optional<HostProvisioner> hostProvisioner();
Provisioned provisioned();
DeployLogger deployLogger();
ConfigDefinitionRepo configDefinitionRepo();
FileRegistry getFileRegistry();
Properties properties();
default Optional<File> appDir() { return Optional.empty();}
/** The Docker image repo we want to use for images for this deployment (optional, will use default if empty) */
default Optional<String> wantedDockerImageRepository() { return Optional.empty(); }
/** The Vespa version this model is built for */
Version modelVespaVersion();
/** The Vespa version we want nodes to become */
Version wantedNodeVespaVersion();
/** Warning: As elsewhere in this package, do not make backwards incompatible changes that will break old config models! */
interface Properties {
boolean multitenant();
ApplicationId applicationId();
List<ConfigServerSpec> configServerSpecs();
HostName loadBalancerName();
URI ztsUrl();
String athenzDnsSuffix();
boolean hostedVespa();
Zone zone();
Set<ContainerEndpoint> endpoints();
boolean isBootstrap();
boolean isFirstTimeDeployment();
// TODO: Only needed for LbServicesProducerTest
default boolean useDedicatedNodeForLogserver() { return true; }
// TODO Revisit in May or June 2020
boolean useAdaptiveDispatch();
// TODO: Remove after April 2020
default Optional<TlsSecrets> tlsSecrets() { return Optional.empty(); }
default Optional<EndpointCertificateSecrets> endpointCertificateSecrets() { return Optional.empty(); }
// TODO Revisit in May or June 2020
double defaultTermwiseLimit();
// TODO Revisit in May or June 2020
double defaultSoftStartSeconds();
// TODO Revisit in May or June 2020
double defaultTopKProbability();
// TODO: Remove once there are no Vespa versions below 7.170
boolean useBucketSpaceMetric();
default boolean useNewAthenzFilter() { return true; } // TODO bjorncs: Remove after end of April
// TODO: Remove after April 2020
default boolean usePhraseSegmenting() { return false; }
default String proxyProtocol() { return "https-only"; }
default Optional<AthenzDomain> athenzDomain() { return Optional.empty(); }
// TODO(mpolden): Remove after May 2020
default boolean useDedicatedNodesWhenUnspecified() { return true; }
}
}
|