Skip to content

Commit

Permalink
Fix for Issue 3173
Browse files Browse the repository at this point in the history
Title: inbound/outbound rules only detected in apiVersion=network.k8s.io/v1
  • Loading branch information
Darshan M N committed May 17, 2019
1 parent c440970 commit 4f838bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ public static KubernetesV2SecurityGroup fromCacheData(CacheData cd) {
if (manifest.getKind() != KubernetesKind.NETWORK_POLICY) {
log.warn("Unknown security group kind " + manifest.getKind());
} else {
if (manifest.getApiVersion().equals(NETWORKING_K8S_IO_V1) || (manifest.getApiVersion().equals(NETWORKING_K8S_IO_V1BETA1))) {
if (manifest.getApiVersion().equals(NETWORKING_K8S_IO_V1)
|| (manifest.getApiVersion().equals(NETWORKING_K8S_IO_V1BETA1))) {
V1NetworkPolicy v1beta1NetworkPolicy =
KubernetesCacheDataConverter.getResource(manifest, V1NetworkPolicy.class);
inboundRules = inboundRules(v1beta1NetworkPolicy);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class KubernetesApiVersion {
public static KubernetesApiVersion NETWORKING_K8S_IO_V1 =
new KubernetesApiVersion("network.k8s.io/v1");
public static KubernetesApiVersion NETWORKING_K8S_IO_V1BETA1 =
new KubernetesApiVersion("network.k8s.io/v1beta1");
new KubernetesApiVersion("network.k8s.io/v1beta1");
public static KubernetesApiVersion APPS_V1BETA1 = new KubernetesApiVersion("apps/v1beta1");
public static KubernetesApiVersion APPS_V1BETA2 = new KubernetesApiVersion("apps/v1beta2");
public static KubernetesApiVersion BATCH_V1 = new KubernetesApiVersion("batch/v1");
Expand Down

0 comments on commit 4f838bc

Please sign in to comment.