Dedupe extensions HPAs

parent 079315d4
...@@ -499,7 +499,7 @@ angular.module('openshiftCommonServices') ...@@ -499,7 +499,7 @@ angular.module('openshiftCommonServices')
// Exclude duplicate kinds we know about that map to the same storage as another group/kind // Exclude duplicate kinds we know about that map to the same storage as another group/kind
// This is unusual, so we are special casing these // This is unusual, so we are special casing these
if (group.name === "autoscaling" && resource.kind === "HorizontalPodAutoscaler" || if (group.name === "extensions" && resource.kind === "HorizontalPodAutoscaler" ||
group.name === "batch" && resource.kind === "Job" group.name === "batch" && resource.kind === "Job"
) { ) {
return; return;
......
...@@ -1792,7 +1792,7 @@ angular.module('openshiftCommonServices') ...@@ -1792,7 +1792,7 @@ angular.module('openshiftCommonServices')
// Exclude duplicate kinds we know about that map to the same storage as another group/kind // Exclude duplicate kinds we know about that map to the same storage as another group/kind
// This is unusual, so we are special casing these // This is unusual, so we are special casing these
if (group.name === "autoscaling" && resource.kind === "HorizontalPodAutoscaler" || if (group.name === "extensions" && resource.kind === "HorizontalPodAutoscaler" ||
group.name === "batch" && resource.kind === "Job" group.name === "batch" && resource.kind === "Job"
) { ) {
return; return;
......
...@@ -737,7 +737,7 @@ kind:resource.kind ...@@ -737,7 +737,7 @@ kind:resource.kind
}), _.each(APIS_CFG.groups, function(group) { }), _.each(APIS_CFG.groups, function(group) {
var preferredVersion = defaultVersion[group.name] || group.preferredVersion; var preferredVersion = defaultVersion[group.name] || group.preferredVersion;
_.each(group.versions[preferredVersion].resources, function(resource) { _.each(group.versions[preferredVersion].resources, function(resource) {
resource.name.indexOf("/") >= 0 || _.contains(rejectedKinds, resource.kind) || "autoscaling" === group.name && "HorizontalPodAutoscaler" === resource.kind || "batch" === group.name && "Job" === resource.kind || (resource.namespaced || includeClusterScoped) && kinds.push({ resource.name.indexOf("/") >= 0 || _.contains(rejectedKinds, resource.kind) || "extensions" === group.name && "HorizontalPodAutoscaler" === resource.kind || "batch" === group.name && "Job" === resource.kind || (resource.namespaced || includeClusterScoped) && kinds.push({
kind:resource.kind, kind:resource.kind,
group:group.name group:group.name
}); });
......
...@@ -296,7 +296,7 @@ angular.module('openshiftCommonServices') ...@@ -296,7 +296,7 @@ angular.module('openshiftCommonServices')
// Exclude duplicate kinds we know about that map to the same storage as another group/kind // Exclude duplicate kinds we know about that map to the same storage as another group/kind
// This is unusual, so we are special casing these // This is unusual, so we are special casing these
if (group.name === "autoscaling" && resource.kind === "HorizontalPodAutoscaler" || if (group.name === "extensions" && resource.kind === "HorizontalPodAutoscaler" ||
group.name === "batch" && resource.kind === "Job" group.name === "batch" && resource.kind === "Job"
) { ) {
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment