Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ef3e685a
Commit
ef3e685a
authored
Sep 03, 2020
by
Zamir Martins Filho
Committed by
Heinrich Lee Yu
Sep 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove nil attributes for CiliumNetworkPolicy
Nil attributes whether ingress or egress will fail API for update
parent
a5fd7947
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
lib/gitlab/kubernetes/cilium_network_policy.rb
lib/gitlab/kubernetes/cilium_network_policy.rb
+1
-1
spec/lib/gitlab/kubernetes/cilium_network_policy_spec.rb
spec/lib/gitlab/kubernetes/cilium_network_policy_spec.rb
+3
-3
No files found.
lib/gitlab/kubernetes/cilium_network_policy.rb
View file @
ef3e685a
...
@@ -82,7 +82,7 @@ module Gitlab
...
@@ -82,7 +82,7 @@ module Gitlab
endpointSelector:
selector
,
endpointSelector:
selector
,
ingress:
ingress
,
ingress:
ingress
,
egress:
egress
egress:
egress
}
}
.
compact!
end
end
override
:kind
override
:kind
...
...
spec/lib/gitlab/kubernetes/cilium_network_policy_spec.rb
View file @
ef3e685a
...
@@ -20,7 +20,7 @@ RSpec.describe Gitlab::Kubernetes::CiliumNetworkPolicy do
...
@@ -20,7 +20,7 @@ RSpec.describe Gitlab::Kubernetes::CiliumNetworkPolicy do
kind:
partial_class_name
,
kind:
partial_class_name
,
apiVersion:
"cilium.io/v2"
,
apiVersion:
"cilium.io/v2"
,
metadata:
{
name:
name
,
namespace:
namespace
,
resourceVersion:
resource_version
},
metadata:
{
name:
name
,
namespace:
namespace
,
resourceVersion:
resource_version
},
spec:
{
endpointSelector:
endpoint_selector
,
ingress:
ingress
,
egress:
nil
}
spec:
{
endpointSelector:
endpoint_selector
,
ingress:
ingress
}
)
)
end
end
...
@@ -61,7 +61,7 @@ RSpec.describe Gitlab::Kubernetes::CiliumNetworkPolicy do
...
@@ -61,7 +61,7 @@ RSpec.describe Gitlab::Kubernetes::CiliumNetworkPolicy do
)
)
end
end
let
(
:spec
)
{
{
endpointSelector:
selector
,
ingress:
ingress
,
egress:
nil
}
}
let
(
:spec
)
{
{
endpointSelector:
selector
,
ingress:
ingress
}
}
let
(
:metadata
)
{
{
name:
name
,
namespace:
namespace
,
resourceVersion:
resource_version
}
}
let
(
:metadata
)
{
{
name:
name
,
namespace:
namespace
,
resourceVersion:
resource_version
}
}
end
end
...
@@ -180,7 +180,7 @@ RSpec.describe Gitlab::Kubernetes::CiliumNetworkPolicy do
...
@@ -180,7 +180,7 @@ RSpec.describe Gitlab::Kubernetes::CiliumNetworkPolicy do
kind:
partial_class_name
,
kind:
partial_class_name
,
apiVersion:
"cilium.io/v2"
,
apiVersion:
"cilium.io/v2"
,
metadata:
{
name:
name
,
namespace:
namespace
,
resourceVersion:
resource_version
,
labels:
{
app:
'foo'
}
},
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
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment