11 Commits

Author SHA1 Message Date
Murali Reddy
922c9f5808 GA network policy does not reject if there is not a single source pod matching a policy
Fix ensures below two cases are explicitly handled

 - in the network policy spec for the ingress rule, its optionsl to give 'ports' and 'from' details
   when not specified it translates to match all ports, match all sources respectivley

 - user may explicitly give the 'ports' and 'from' details in the ingress rule. But at any given point
   its possible there is no matching pods (with labels defined in 'from') in the namespace.

Before the fix both the cases were handled similarly resulting in unexpected behaviour

Fixes #85
2017-07-29 16:53:52 +05:30
Murali Reddy
b4c063ee8a support for network policy GA
with this refactoring support for network policy V1 (or GA) is added.
Changes are backward compatible so beta network policy semantics
are still available for k8s ver 1.6.* and less

Fixes #16
2017-07-28 11:12:52 +05:30
bzub
b87454056c policy-controller: Don't check for depreciated LegacyHostIP 2017-07-12 21:53:34 -05:00
Bryan Zubrod
5af635a9bc CI: Automated build/release workflow (#46)
TLDR; Run "make help" for options.

* gofmt
* .gitignore kube-router binary
* Docs: build/release workflow
* Implement build/release workflow
2017-07-09 11:21:26 -05:00
bzub
cb661f871c controller: - Replace panics with errors
- Add context to errors for debugging
            - Refactor init() code so ipset isn't required to run
              "kube-router --help" for example
2017-07-05 21:57:29 -05:00
bzub
2b019ceec7 Handle invalid NetworkPolicy definition 2017-06-21 22:33:02 -05:00
Murali Reddy
29396f9662 add option '--hostname-override' to deal with cases where kubelet is launched
with --hostname-override flag

Fixes #23
2017-06-10 07:10:38 +05:30
Murali Reddy
d4f32978fb use NODE_NAME env variable to get the node object when running as daemon set
If NODE_NAME env is not set, fall back to hostname.

Partial fix towards #23 we still have issue where kube-router is run as agent
and kubelet is started with --hostname-overide flag
2017-06-07 02:28:21 +05:30
Murali Reddy
4531a915bb Handle both cases where node can be registered with master either
by host name or FQDN. kubelet can be started with --hostname-override with configurable value.
In AWS envirinment typcally its set FQDN obtained from the metda data. This fix ensures
we can deploy kube-router in case nodes are registered with FQDN

Fixes #17
2017-05-30 03:11:51 +05:30
Murali Reddy
d4edfc02fe cleanup rules in filter table, OUTPUT chain used for ingress filtering
on  "kube-router --cleanup-config"
2017-04-22 20:14:04 +05:30
Murali Reddy
04a5cc033a base line version tested with kube 1.5.6, 1.6 2017-04-17 10:33:09 +05:30