Class SundrioConfig

  • Direct Known Subclasses:
    Config

    public class SundrioConfig
    extends Object
    To add a new config option:
    1. add a field in this class. Adding getters / setters is optional
    2. add logic in the Config constructor to copy the field. Optionally add auto configuration logic.
    3. no other changes are typically necessary
    This class is necessary to be able to cleanly deserialize the config. It is also used to autogenerate a builder for the Config class using Sundrio while providing specific behavior for the build() method. This way we can extend the default SundrioConfigBuilder, overriding the build method and enabling autoconfiguration only in this case. The builder is also capable of having a state of the Config with null values (no defaults or autoconfigured). The end purpose is for users to actually use the builder to override the default values or autoconfigured ones by providing their values through the builder withXxx accessors
    • Constructor Detail

      • SundrioConfig

        public SundrioConfig()
    • Method Detail

      • getAdditionalProperties

        public Map<String,​Object> getAdditionalProperties()
      • setAdditionalProperty

        public void setAdditionalProperty​(String name,
                                          Object value)
      • setImpersonateGroups

        public void setImpersonateGroups​(String... impersonateGroup)
      • getContexts

        public List<io.fabric8.kubernetes.api.model.NamedContext> getContexts()
        Returns all the NamedContexts that exist in the kube config
        Returns:
        all the contexts
        See Also:
        NamedContext
      • getCurrentContext

        public io.fabric8.kubernetes.api.model.NamedContext getCurrentContext()
        Returns the current context that's defined in the kube config. Returns null if there's none
        Returns:
        the current context
        See Also:
        NamedContext