All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.strimzi.kafka.KubernetesConfigMapConfigProvider Maven / Gradle / Ivy

Go to download

Apache Kafka configuration provider for reading data from Kubernetes Secrets and Config Maps

There is a newer version: 1.2.0
Show newest version
/*
 * Copyright Strimzi authors.
 * License: Apache License 2.0 (see the file LICENSE or http://apache.org/licenses/LICENSE-2.0.html).
 */
package io.strimzi.kafka;

import io.fabric8.kubernetes.api.model.ConfigMap;
import io.fabric8.kubernetes.api.model.ConfigMapList;
import io.fabric8.kubernetes.client.dsl.MixedOperation;
import io.fabric8.kubernetes.client.dsl.Resource;

import java.util.Map;

/**
 * Apache Kafka configuration provider to load configuration from Kubernetes Config Maps
 */
public final class KubernetesConfigMapConfigProvider extends AbstractKubernetesConfigProvider> {
    public KubernetesConfigMapConfigProvider() {
        super("ConfigMap");
    }

    @Override
    protected MixedOperation> operator()    {
        return client.configMaps();
    }

    @Override
    protected Map valuesFromResource(ConfigMap resource) {
        return resource.getData();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy