Commit Graph

51 Commits

Author SHA1 Message Date
Casey Callendrello
2e1a884bf3 pkg/proxy: add last-queued-timestamp metric
This adds a metric, kubeproxy_sync_proxy_rules_last_queued_timestamp,
that captures the last time a change was queued to be applied to the
proxy. This matches the healthz logic, which fails if a pending change
is stale.

This allows us to write alerts that mirror healthz.

Signed-off-by: Casey Callendrello <cdc@redhat.com>
2020-04-21 15:19:32 +02:00
SataQiu
64a496e645 kube-proxy: some code cleanup 2020-03-17 21:46:54 +08:00
Kubernetes Prow Robot
09d78529db
Merge pull request #87792 from ksubrmnn/nodeip
Allow access to default Kubernetes Service from inside Windows Pod (Overlay)
2020-02-20 03:07:04 -08:00
ksubrmnn
378fcc809a Check for node IP 2020-02-05 11:44:26 -08:00
Kubernetes Prow Robot
97d68d014c
Merge pull request #86172 from liggitt/intstr
Clarify intstr.IntValue() behavior
2020-01-15 08:25:35 -08:00
danielqsj
a8f2feaeb5 remove deprecated metrics of proxy 2020-01-10 17:05:38 +08:00
Mark Janssen
a54e5cec54 Fix staticcheck failures for pkg/proxy/...
Errors from staticcheck:
pkg/proxy/healthcheck/proxier_health.go:55:2: field port is unused (U1000)
pkg/proxy/healthcheck/proxier_health.go:162:20: printf-style function with dynamic format string and no further arguments should use print-style function instead (SA1006)
pkg/proxy/healthcheck/service_health.go:166:20: printf-style function with dynamic format string and no further arguments should use print-style function instead (SA1006)
pkg/proxy/iptables/proxier.go:737:2: this value of args is never used (SA4006)
pkg/proxy/iptables/proxier.go:737:15: this result of append is never used, except maybe in other appends (SA4010)
pkg/proxy/iptables/proxier.go:1287:28: this result of append is never used, except maybe in other appends (SA4010)
pkg/proxy/userspace/proxysocket.go:293:3: this value of n is never used (SA4006)
pkg/proxy/winkernel/metrics.go:74:6: func sinceInMicroseconds is unused (U1000)
pkg/proxy/winkernel/metrics.go:79:6: func sinceInSeconds is unused (U1000)
pkg/proxy/winuserspace/proxier.go:94:2: field portMapMutex is unused (U1000)
pkg/proxy/winuserspace/proxier.go:118:2: field owner is unused (U1000)
pkg/proxy/winuserspace/proxier.go:119:2: field socket is unused (U1000)
pkg/proxy/winuserspace/proxysocket.go:620:4: this value of n is never used (SA4006)
2019-12-22 21:32:06 +01:00
Jordan Liggitt
cdf2e794a5 Clarify intstr.IntValue() behavior 2019-12-11 12:14:26 -05:00
Kubernetes Prow Robot
1c5b6cb66e
Merge pull request #85611 from ksubrmnn/routing_mesh
Fix HTTP readiness/liveness probes using NodePort
2019-11-25 16:43:19 -08:00
Kalya Subramanian
e87e4bea0f Fix HTTP readiness/liveness probes for local node 2019-11-25 10:50:46 -08:00
Roc Chan
c9cf3f5b72 Service Topology implementation
* Implement Service Topology for ipvs and iptables proxier
* Add test files
* API validation
2019-11-15 13:36:43 +08:00
Dan Winship
f83474916e Fix kube-proxy healthz server for proxier sync loop changes
The proxy healthz server assumed that kube-proxy would regularly call
UpdateTimestamp() even when nothing changed, but that's no longer
true. Fix it to only report unhealthiness when updates have been
received from the apiserver but not promptly pushed out to
iptables/ipvs.
2019-10-04 13:37:09 -04:00
Dan Winship
0f10102c16 Better distinguish the two kinds of proxy health check servers
Kube-proxy runs two different health servers; one for monitoring the
health of kube-proxy itself, and one for monitoring the health of
specific services. Rename them to "ProxierHealthServer" and
"ServiceHealthServer" to make this clearer, and do a bit of API
cleanup too.
2019-10-04 10:37:58 -04:00
Rob Scott
9665c590c7
Adding EndpointSlice support for kube-proxy ipvs and iptables proxiers 2019-08-29 01:06:52 -07:00
Anish Ramasekar
2878270f5b
Fix golint failures in pkg/proxy
Review feedback - remove alias from imports

fix comments
2019-07-08 11:48:33 -07:00
Kubernetes Prow Robot
f532d5ca4b
Merge pull request #78612 from ksubrmnn/retry
Kube-Proxy wait when HNS network not found
2019-06-03 01:10:20 -07:00
ksubrmnn
39aa6abf18 Wait when HNS network not found 2019-05-31 18:26:57 -07:00
Kubernetes Prow Robot
8b7e777fe8
Merge pull request #74825 from ksubrmnn/preserve_dip
Windows support for preserving the destination IP as the VIP when loadbalancing with DSR
2019-05-31 04:48:27 -07:00
Kalya Subramanian
4e0f63b688 Set loadbalancer flags for DSR 2019-05-20 15:37:19 -07:00
Casey Callendrello
017f57a6b0 proxy: add some useful metrics
This adds some useful metrics around pending changes and last successful
sync time.

The goal is for administrators to be able to alert on proxies that, for
whatever reason, are quite stale.

Signed-off-by: Casey Callendrello <cdc@redhat.com>
2019-05-07 14:21:13 +02:00
draveness
fabc628210 style: update several golint errors in winkernel 2019-05-06 20:28:09 +08:00
ksubrmnn
0173545b56 Allow Overlay loadbalancing to Public IP 2019-02-27 16:27:08 -08:00
ksubrmnn
a322e08a98 Temporarily remove V2 API check 2019-02-22 14:10:05 -08:00
ksubrmnn
c115b5aec2 Add WinDSR and WinOverlay feature flags 2019-02-05 10:49:22 -08:00
ksubrmnn
b724bdb19a Update winkernel proxy for overlay 2019-02-05 10:39:23 -08:00
danielqsj
8975e62254 Change proxy metrics to conform guideline 2018-12-26 17:25:10 +08:00
AdamDang
cc4d38c768 Typo fix: healtcheck->healthcheck (#65394)
Typo fix: healtcheck->healthcheck

Typo fix: healtcheck->healthcheck
2018-11-13 19:45:24 -08:00
Davanum Srinivas
954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
Pengfei Ni
4b7a502c07 Fix service targetPort with string for Windows 2018-10-22 15:17:27 +08:00
k8s-ci-robot
2f349d58df
Merge pull request #68897 from ksubrmnn/mac_address
Load Balancing is not distributing connections to different endpoints
2018-10-04 19:34:45 -07:00
delulu
524de768bb fix inconsistency in updating hns policy 2018-10-03 22:00:03 +08:00
ksubrmnn
d785379d67 Create unique mac address per endpoint 2018-09-26 15:45:45 -07:00
Laszlo Janosi
5d8b1ef804 api -> v1 error corrected in pkg/proxy/winkernel/proxier.go 2018-08-27 05:59:50 +00:00
Laszlo Janosi
a6da2b1472 K8s SCTP support implementation for the first pull request
The requested Service Protocol is checked against the supported protocols of GCE Internal LB. The supported protocols are TCP and UDP.

SCTP is not supported by OpenStack LBaaS. If SCTP is requested in a Service with type=LoadBalancer, the request is rejected. Comment style is also corrected.

SCTP is not allowed for LoadBalancer Service and for HostPort. Kube-proxy can be configured not to start listening on the host port for SCTP: see the new SCTPUserSpaceNode parameter

changed the vendor github.com/nokia/sctp to github.com/ishidawataru/sctp. I.e. from now on we use the upstream version.

netexec.go compilation fixed. Various test cases fixed

SCTP related conformance tests removed. Netexec's pod definition and Dockerfile are updated to expose the new SCTP port(8082)

SCTP related e2e test cases are removed as the e2e test systems do not support SCTP

sctp related firewall config is removed from cluster/gce/util.sh. Variable name sctp_addr is corrected to sctpAddr in pkg/proxy/ipvs/proxier.go

cluster/gce/util.sh is copied from master
2018-08-27 05:56:27 +00:00
x00416946 fisherxu
79e17e6cd7 use versioned api in kube-proxy 2018-08-16 09:59:33 +08:00
tanshanshan
f68af9e584 fix spell 2018-07-14 10:05:56 +08:00
hzxuzhonghu
ab58014cc2 LoadBalancerStatus make use of generated deep copy method 2018-03-28 14:08:50 +08:00
Di Xu
48388fec7e fix all the typos across the project 2018-02-11 11:04:14 +08:00
Zihong Zheng
9ab98d9f69 Remove ExternalTrafficLocalOnly from kube_feature gate 2017-12-07 21:25:11 -08:00
Kubernetes Submit Queue
5e178936a1
Merge pull request #53780 from m1093782566/validate-ipvs
Automatic merge from submit-queue (batch tested with PRs 53780, 55663, 55321, 52421, 55659). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Validate kube-proxy options

**What this PR does / why we need it**:

Validate ipvs proxy options

**Which issue this PR fixes** : fixes #53852

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-11-15 09:30:24 -08:00
m1093782566
83ada5c7bf replace sets.List() with sets.UnsortedList() 2017-11-13 10:20:54 +08:00
Dr. Stefan Schimanski
012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
m1093782566
c7071ed09a try ipset in ipvs proxy mode 2017-11-07 17:34:27 +08:00
Madhan Raj Mookkandy
0a53b0cfbf Fix GoFmt error 2017-11-06 10:50:05 -08:00
Kaveh Shafiee
a632cd2a91 Fixing 'targetport' to service 'port' mapping
Looks like the order should be reversed for this to work.
2017-11-06 10:50:05 -08:00
Kubernetes Submit Queue
6fbd2a1a30 Merge pull request #53634 from m1093782566/win-session
Automatic merge from submit-queue (batch tested with PRs 54656, 54552, 54389, 53634, 54408). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Remove hard code of session affinity timeout in winows kernel proxy

**What this PR does / why we need it**:

Remove hard code of session affinity timeout in winows kernel proxy - we have already done this in userspace, iptables and ipvs proxy.

**Which issue this PR fixes**: 

fixes #53636 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/sig network
/area kube-proxy
2017-10-26 21:08:33 -07:00
m1093782566
46b4614c5d remove hard code of session affinity timeout in win-proxy 2017-10-21 13:47:31 +08:00
m1093782566
8b8c305de4 clean up winkernel proxy 2017-10-11 16:30:24 +08:00
Madhan Raj Mookkandy
a8d797afdd Add exception to golint check
(*) Fix cleanup of NodePort resources. (*) Fix the logic to select existing policies

Fix review comment

Fix Bazel

Update GoDep License

Fix NodePort forwarding to target port

Fix Darwin Build break. +1

Implement IsCompatible to validate kernel support for kernel mode
2017-09-18 11:11:22 -07:00
Madhan Raj Mookkandy
63020d5f72 Vendor changes
Vendoring (NEW) in github.com/Microsoft/hcsshim
2017-09-14 16:00:07 -07:00