Skip to content

Commit

Permalink
perf(kubernetes): Remove cluster relationship from pod kind (#3758)
Browse files Browse the repository at this point in the history
Pods are currently set as having a cluster relationship; this
means that we create a cluster (and associated relationship to
the pod) for every pod in a kubernetes deployment.

This is not necessary, and doesn't match the definition of cluster
used by other providers.  These clusters and relationships are
also not used when we construct the server group model for
a Kubernetes application; we end up ignoring any cluster that
does not map to a server group (which pods do not).

This change will significantly improve the efficiency of both
the caching logic, and the logic to return server groups for
kubernetes (which now will not need to process each pod individually).
  • Loading branch information
ezimanyi authored Jun 6, 2019
1 parent b1dec34 commit 900a257
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public final class KubernetesKind {
public static KubernetesKind PERSISTENT_VOLUME_CLAIM =
new KubernetesKind("persistentVolumeClaim", KubernetesApiGroup.CORE, "pvc", true, false);
public static KubernetesKind POD =
new KubernetesKind("pod", KubernetesApiGroup.CORE, "po", true, true);
new KubernetesKind("pod", KubernetesApiGroup.CORE, "po", true, false);
public static KubernetesKind POD_PRESET =
new KubernetesKind("podPreset", KubernetesApiGroup.SETTINGS_K8S_IO, null, true, false);
public static KubernetesKind POD_SECURITY_POLICY =
Expand Down

0 comments on commit 900a257

Please sign in to comment.