Class KubernetesCachingAgent
java.lang.Object
com.netflix.spinnaker.clouddriver.kubernetes.caching.agent.KubernetesCachingAgent
- All Implemented Interfaces:
com.netflix.spinnaker.cats.agent.AccountAware,com.netflix.spinnaker.cats.agent.Agent,com.netflix.spinnaker.cats.agent.AgentIntervalAware,com.netflix.spinnaker.cats.agent.CachingAgent
- Direct Known Subclasses:
KubernetesCoreCachingAgent,KubernetesUnregisteredCustomResourceCachingAgent
public abstract class KubernetesCachingAgent
extends Object
implements com.netflix.spinnaker.cats.agent.AgentIntervalAware, com.netflix.spinnaker.cats.agent.CachingAgent, com.netflix.spinnaker.cats.agent.AccountAware
A kubernetes caching agent is a class that caches part of the kubernetes infrastructure. Every
instance of a caching agent is responsible for caching only one account, and only some (but not
all) kubernetes kinds of that account.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.netflix.spinnaker.cats.agent.CachingAgent
com.netflix.spinnaker.cats.agent.CachingAgent.CacheExecution -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Stringprotected final intprotected final intprotected final Longprotected final KubernetesConfigurationPropertiesprotected final KubernetesCredentialsprotected KubectlJobExecutorprotected final KubernetesSpinnakerKindMapprotected final com.fasterxml.jackson.databind.ObjectMapperprotected Stringprotected final com.netflix.spectator.api.Registrystatic final List<SpinnakerKind> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedKubernetesCachingAgent(KubernetesNamedAccountCredentials namedAccountCredentials, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.netflix.spectator.api.Registry registry, int agentIndex, int agentCount, Long agentInterval, KubernetesConfigurationProperties configurationProperties, KubernetesSpinnakerKindMap kubernetesSpinnakerKindMap, Front50ApplicationLoader front50ApplicationLoader) -
Method Summary
Modifier and TypeMethodDescriptionprotected com.netflix.spinnaker.cats.agent.CacheResultbuildCacheResult(KubernetesManifest resource) protected com.netflix.spinnaker.cats.agent.CacheResultbuildCacheResult(Map<KubernetesKind, List<KubernetesManifest>> resources) protected List<KubernetesKind>Filters the list of kinds returned from primaryKinds according to configuration.protected com.google.common.collect.ImmutableList<String>protected booleanShould this caching agent be responsible for caching cluster-scoped resources (ie, those that do not live in a particular namespace)?com.netflix.spinnaker.cats.agent.CacheResultloadData(com.netflix.spinnaker.cats.provider.ProviderCache providerCache) protected KubernetesManifestloadPrimaryResource(KubernetesCoordinates coordinates) protected KubernetesManifestloadPrimaryResource(KubernetesKind kind, String namespace, String name) Deprecated.protected Map<KubernetesKind,List<KubernetesManifest>> protected Map<KubernetesManifest,List<KubernetesManifest>> loadSecondaryResourceRelationships(Map<KubernetesKind, List<KubernetesManifest>> allResources) protected abstract List<KubernetesKind>Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.netflix.spinnaker.cats.agent.AccountAware
getAccountNameMethods inherited from interface com.netflix.spinnaker.cats.agent.Agent
getProviderName, handlesAccountMethods inherited from interface com.netflix.spinnaker.cats.agent.AgentIntervalAware
getAgentErrorInterval, getAgentIntervalMethods inherited from interface com.netflix.spinnaker.cats.agent.CachingAgent
getAgentExecution, getCacheKeyPatterns, getProvidedDataTypes
-
Field Details
-
SPINNAKER_UI_KINDS
-
accountName
-
registry
protected final com.netflix.spectator.api.Registry registry -
credentials
-
objectMapper
protected final com.fasterxml.jackson.databind.ObjectMapper objectMapper -
agentIndex
protected final int agentIndex -
agentCount
protected final int agentCount -
jobExecutor
-
providerName
-
agentInterval
-
configurationProperties
-
kubernetesSpinnakerKindMap
-
-
Constructor Details
-
KubernetesCachingAgent
protected KubernetesCachingAgent(KubernetesNamedAccountCredentials namedAccountCredentials, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.netflix.spectator.api.Registry registry, int agentIndex, int agentCount, Long agentInterval, KubernetesConfigurationProperties configurationProperties, KubernetesSpinnakerKindMap kubernetesSpinnakerKindMap, @Nullable Front50ApplicationLoader front50ApplicationLoader)
-
-
Method Details
-
defaultIntrospectionDetails
-
-
filteredPrimaryKinds
Filters the list of kinds returned from primaryKinds according to configuration.- Returns:
- filtered list of primaryKinds.
-
loadPrimaryResourceList
-
loadPrimaryResource
@Deprecated protected KubernetesManifest loadPrimaryResource(KubernetesKind kind, String namespace, String name) Deprecated.Deprecated in favorloadPrimaryResource(KubernetesCoordinates). -
loadPrimaryResource
-
loadData
public com.netflix.spinnaker.cats.agent.CacheResult loadData(com.netflix.spinnaker.cats.provider.ProviderCache providerCache) - Specified by:
loadDatain interfacecom.netflix.spinnaker.cats.agent.CachingAgent
-
buildCacheResult
protected com.netflix.spinnaker.cats.agent.CacheResult buildCacheResult(KubernetesManifest resource) -
buildCacheResult
protected com.netflix.spinnaker.cats.agent.CacheResult buildCacheResult(Map<KubernetesKind, List<KubernetesManifest>> resources) -
loadSecondaryResourceRelationships
protected Map<KubernetesManifest,List<KubernetesManifest>> loadSecondaryResourceRelationships(Map<KubernetesKind, List<KubernetesManifest>> allResources) -
getNamespaces
-
handleClusterScopedResources
protected boolean handleClusterScopedResources()Should this caching agent be responsible for caching cluster-scoped resources (ie, those that do not live in a particular namespace)? -
getAgentType
- Specified by:
getAgentTypein interfacecom.netflix.spinnaker.cats.agent.Agent
-