Commit ef3e685a authored by Zamir Martins Filho's avatar Zamir Martins Filho Committed by Heinrich Lee Yu

Remove nil attributes for CiliumNetworkPolicy

Nil attributes whether ingress or egress will
fail API for update
parent a5fd7947
......@@ -82,7 +82,7 @@ module Gitlab
endpointSelector: selector,
ingress: ingress,
egress: egress
}
}.compact!
end
override :kind
......
......@@ -20,7 +20,7 @@ RSpec.describe Gitlab::Kubernetes::CiliumNetworkPolicy do
kind: partial_class_name,
apiVersion: "cilium.io/v2",
metadata: { name: name, namespace: namespace, resourceVersion: resource_version },
spec: { endpointSelector: endpoint_selector, ingress: ingress, egress: nil }
spec: { endpointSelector: endpoint_selector, ingress: ingress }
)
end
......@@ -61,7 +61,7 @@ RSpec.describe Gitlab::Kubernetes::CiliumNetworkPolicy do
)
end
let(:spec) { { endpointSelector: selector, ingress: ingress, egress: nil } }
let(:spec) { { endpointSelector: selector, ingress: ingress } }
let(:metadata) { { name: name, namespace: namespace, resourceVersion: resource_version } }
end
......@@ -180,7 +180,7 @@ RSpec.describe Gitlab::Kubernetes::CiliumNetworkPolicy do
kind: partial_class_name,
apiVersion: "cilium.io/v2",
metadata: { name: name, namespace: namespace, resourceVersion: resource_version, labels: { app: 'foo' } },
spec: { endpointSelector: endpoint_selector, ingress: ingress, egress: nil }
spec: { endpointSelector: endpoint_selector, ingress: ingress }
)
end
......
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