Annotation Type FromConfigMap


@Target(FIELD) @Retention(RUNTIME) public @interface FromConfigMap
Injecting resources by reading from ConfigMap.

The annotations has to be be applied to member field of type Map<String, String>.

The content of the map will be automatically updated at the interval specified by the property "kubernetes.manifests.refreshInterval".

If the given configmap, is not present in the cluster, the content of the map will stay empty.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Name of the configmap
    Namespace of the configmap.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Config map getter class.
  • Element Details

    • namespace

      String namespace
      Namespace of the configmap.
      Returns:
      the string
    • name

      String name
      Name of the configmap
      Returns:
      the string
    • configMapGetter

      Class<? extends ConfigMapGetter> configMapGetter
      Config map getter class.
      Returns:
      the class
      Default:
      io.kubernetes.client.spring.extended.manifests.configmaps.PollingConfigMapGetter.class