Disable Athenz ssl keystore configurator in main
@@ -3,6 +3,7 @@ package com.yahoo.vespa.hosted.athenz.instanceproviderservice;
import com.google.inject.Inject;
import com.yahoo.component.AbstractComponent;
+import com.yahoo.config.provision.SystemName;
import com.yahoo.config.provision.Zone;
import com.yahoo.jdisc.http.SecretStore;
import com.yahoo.jdisc.http.ssl.SslKeyStoreConfigurator;
@@ -39,6 +40,7 @@ public class AthenzSslKeyStoreConfigurator extends AbstractComponent implements
private final SecretStoreKeyProvider keyProvider;
private final AthenzProviderServiceConfig.Zones zoneConfig;
private final AtomicBoolean alreadyConfigured = new AtomicBoolean();
+ private final Zone zone;
@Inject
public AthenzSslKeyStoreConfigurator(SecretStore secretStore,
@@ -48,10 +50,15 @@ public class AthenzSslKeyStoreConfigurator extends AbstractComponent implements
this.certificateClient = new AthenzCertificateClient(config, zoneConfig);
this.keyProvider = new SecretStoreKeyProvider(secretStore, zoneConfig.secretName());
this.zoneConfig = zoneConfig;
+ this.zone = zone;
}
@Override
public void configure(SslKeyStoreContext sslKeyStoreContext) {
+ // TODO Remove this when main is ready
+ if (zone.system() != SystemName.cd) {
+ return;
+ }
if (alreadyConfigured.getAndSet(true)) { // For debugging purpose of SslKeyStoreConfigurator interface
throw new IllegalStateException("Already configured. configure() can only be called once.");
}
