Class KubernetesConfigMapRemoteConfigurationSource<T>
java.lang.Object
io.confluent.remote.config.poller.PollingRemoteConfigurationSource<T>
io.confluent.remote.config.poller.kubernetes.KubernetesConfigMapRemoteConfigurationSource<T>
- All Implemented Interfaces:
RemoteConfigurationSource<T>,org.apache.kafka.common.security.oauthbearer.internals.secured.Retryable<T>
public class KubernetesConfigMapRemoteConfigurationSource<T>
extends PollingRemoteConfigurationSource<T>
implements org.apache.kafka.common.security.oauthbearer.internals.secured.Retryable<T>
This RemoteConfigurationSource will continuously poll the Kubernetes API for a ConfigMap containing the
RemoteConfiguration object. It will do this by first querying for a ConfigMap with the same name as the cluster.
If that ConfigMap does not exist, then it will use the one configured by CONFIG_MAP_NAME_CONFIG.
We do this in break glass scenarios (incident remediation) where we need to remotely configure a single cluster
-
Constructor Summary
ConstructorsConstructorDescriptionKubernetesConfigMapRemoteConfigurationSource(KubernetesConfigMapRemoteConfigurationConfig config, Optional<String> physicalClusterId, Consumer<T> callback, Class<T> typeParameterClass) -
Method Summary
Modifier and TypeMethodDescriptioncall()static Stringstatic StringcreateEndpointFromEnv(KubernetesConfigMapRemoteConfigurationConfig config, String configMapName) static com.fasterxml.jackson.databind.ObjectMapperMethods inherited from class io.confluent.remote.config.poller.PollingRemoteConfigurationSource
getConfig, setConfigurationChangeCallback, start, stop
-
Constructor Details
-
KubernetesConfigMapRemoteConfigurationSource
public KubernetesConfigMapRemoteConfigurationSource(KubernetesConfigMapRemoteConfigurationConfig config, Optional<String> physicalClusterId, Consumer<T> callback, Class<T> typeParameterClass) throws CertificateException, NoSuchAlgorithmException, KeyStoreException, IOException, KeyManagementException
-
-
Method Details
-
call
public T call() throws ExecutionException, org.apache.kafka.common.security.oauthbearer.internals.secured.UnretryableException- Specified by:
callin interfaceorg.apache.kafka.common.security.oauthbearer.internals.secured.Retryable<T>- Throws:
ExecutionExceptionorg.apache.kafka.common.security.oauthbearer.internals.secured.UnretryableException
-
createEndpointFromEnv
public static String createEndpointFromEnv(KubernetesConfigMapRemoteConfigurationConfig config, String configMapName) -
createDefaultEndpointFromEnv
public static String createDefaultEndpointFromEnv(KubernetesConfigMapRemoteConfigurationConfig config) -
getObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
-