Class ConfigHelper
java.lang.Object
com.redhat.devtools.intellij.common.utils.ConfigHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanareEqual(io.fabric8.kubernetes.client.Config thisConfig, io.fabric8.kubernetes.client.Config thatConfig) Returnstrueif the givenConfigs are equal.static booleanareEqualAuthInfo(io.fabric8.kubernetes.client.Config thisConfig, io.fabric8.kubernetes.client.Config thatConfig) Returnstrueif both givenConfigare equal in auth info client cert file client cert data client key file client key data client key algo username password proxies tokenstatic booleanareEqualCluster(io.fabric8.kubernetes.client.Config thisConfig, io.fabric8.kubernetes.client.Config thatConfig) Returnstrueif both givenConfigare equal in master url (blindly) trust certificates proxies auth infostatic booleanareEqualContext(io.fabric8.kubernetes.api.model.NamedContext thisContext, io.fabric8.kubernetes.api.model.NamedContext thatContext) Returnstrueif both givenNamedContextare equal in name cluster user current namespacestatic booleanareEqualContexts(io.fabric8.kubernetes.client.Config thisConfig, io.fabric8.kubernetes.client.Config thatConfig) Returnstrueif both givenConfigare equal in contexts.static booleanareEqualCurrentContext(io.fabric8.kubernetes.client.Config thisConfig, io.fabric8.kubernetes.client.Config thatConfig) Returnstrueif the givenConfigs are equal in current context.static booleanareEqualToken(io.fabric8.kubernetes.client.Config thisConfig, io.fabric8.kubernetes.client.Config thatConfig) Returnstrueif the (authentication) token in the givenConfigand the one in the other config are equal.
-
Constructor Details
-
ConfigHelper
public ConfigHelper()
-
-
Method Details
-
areEqual
public static boolean areEqual(io.fabric8.kubernetes.client.Config thisConfig, io.fabric8.kubernetes.client.Config thatConfig) Returnstrueif the givenConfigs are equal. They are considered equal if they're equal in- current context (cluster, user, current namespace)
- auth info
- Parameters:
thisConfig- the first config to comparethatConfig- the second config to compare- Returns:
- true if both configs are equal in context, contexts and token
- See Also:
-
areEqualCurrentContext
public static boolean areEqualCurrentContext(io.fabric8.kubernetes.client.Config thisConfig, io.fabric8.kubernetes.client.Config thatConfig) Returnstrueif the givenConfigs are equal in current context. They are considered equal if they're equal in- name
- cluster
- user
- current namespace
- Parameters:
thisConfig- the first config to comparethatConfig- the second config to compare- Returns:
- true if both configs are equal in context, existing contexts and token
- See Also:
-
Config.getCurrentContext()areEqualContext(NamedContext, NamedContext)
-
areEqualContext
public static boolean areEqualContext(io.fabric8.kubernetes.api.model.NamedContext thisContext, io.fabric8.kubernetes.api.model.NamedContext thatContext) Returnstrueif both givenNamedContextare equal in- name
- cluster
- user
- current namespace
- Parameters:
thisContext- the first context to comparethatContext- the second context to compare- Returns:
- true if both contexts are equal
- See Also:
-
areEqualContext(Context, Context)NamedContextContext
-
areEqualCluster
public static boolean areEqualCluster(io.fabric8.kubernetes.client.Config thisConfig, io.fabric8.kubernetes.client.Config thatConfig) Returnstrueif both givenConfigare equal in- master url
- (blindly) trust certificates
- proxies
- auth info
- Parameters:
thisConfig- the first config to comparethatConfig- the second config to compare- Returns:
- true if both configs are equal in master url, trust certs, proxies and auth info
- See Also:
-
Config
-
areEqualAuthInfo
public static boolean areEqualAuthInfo(io.fabric8.kubernetes.client.Config thisConfig, io.fabric8.kubernetes.client.Config thatConfig) Returnstrueif both givenConfigare equal in auth info- client cert file
- client cert data
- client key file
- client key data
- client key algo
- username
- password
- proxies
- token
- Parameters:
thisConfig- the first config to comparethatConfig- the second config to compare- Returns:
- true if both configs are equal in client cert file/data, key file/data/algo, username, password proxies and token
- See Also:
-
Config
-
areEqualContexts
public static boolean areEqualContexts(io.fabric8.kubernetes.client.Config thisConfig, io.fabric8.kubernetes.client.Config thatConfig) Returnstrueif both givenConfigare equal in contexts. They are considered equal if they're equal in the number of contexts are these are equal individually.- cluster
- user
- current namespace
- extensions
- Parameters:
thisConfig- the first context to comparethatConfig- the second context to compare- Returns:
- true if both contexts are equal
- See Also:
-
NamedContextContextConfig.getContexts()
-
areEqualToken
public static boolean areEqualToken(io.fabric8.kubernetes.client.Config thisConfig, io.fabric8.kubernetes.client.Config thatConfig) Returnstrueif the (authentication) token in the givenConfigand the one in the other config are equal. Returnsfalseotherwise.- Parameters:
thisConfig- the config to compare the active token ofthatConfig- the other config to compare the active token of- Returns:
- true if both tokens are equal, false otherwise
-