If we time out waiting for volume to be attached the message given
to user is not informative enough:
"Attach timeout for volume vol-123"
It would be better if we provide more information on what's going on
and even include name of the driver that's causing the problem, e.g.:
"timed out waiting for external-attacher of ebs.csi.aws.com CSI driver to attach volume vol-123"
This change adds 2 options for windows:
--forward-healthcheck-vip: If true forward service VIP for health check
port
--root-hnsendpoint-name: The name of the hns endpoint name for root
namespace attached to l2bridge, default is cbr0
When --forward-healthcheck-vip is set as true and winkernel is used,
kube-proxy will add an hns load balancer to forward health check request
that was sent to lb_vip:healthcheck_port to the node_ip:healthcheck_port.
Without this forwarding, the health check from google load balancer will
fail, and it will stop forwarding traffic to the windows node.
This change fixes the following 2 cases for service:
- `externalTrafficPolicy: Cluster` (default option): healthcheck_port is
10256 for all services. Without this fix, all traffic won't be directly
forwarded to windows node. It will always go through a linux node and
get forwarded to windows from there.
- `externalTrafficPolicy: Local`: different healthcheck_port for each
service that is configured as local. Without this fix, this feature
won't work on windows node at all. This feature preserves client ip
that tries to connect to their application running in windows pod.
Change-Id: If4513e72900101ef70d86b91155e56a1f8c79719
Make's "define" feature (macros) is subtle and it took me a long time to
convince myself this all works. In particular, we (prior to this commit)
are terribly inconsistent about the use of `$` vs `$$`. We mostly get
away with it because the "variables" are more like "constants", but the
inconsistency trips up some things. For example, using `$(shell)`
inside a macro will run at macro expansion time rather than when the
resulting make code is executed.
For a contrived, but concrete example, derived from our Makefile:
```
define MACRO
ifeq ($(DBG),1)
$(warning dbg is $(DBG))
endif
endef # macro
TGTS=a b c
$(foreach pfx, $(TGTS), $(eval $(MACRO)))
default:
@echo $@
```
yields:
```
$ make
Makefile:8: dbg is
Makefile:8: dbg is
Makefile:8: dbg is
default
$ make DBG=1
Makefile:8: dbg is 1
Makefile:8: dbg is 1
Makefile:8: dbg is 1
default
```
This is because `$(warning)` is evaluated as the macro is expanded.
Replace that with `$(shell)` and you can see how you might end up
running a bunch of things you didn't need to run. The fix is:
```
define MACRO
ifeq ($(DBG),1)
$$(warning dbg is $$(DBG))
endif
endef # macro
TGTS=a b c
$(foreach pfx, $(TGTS), $(eval $(MACRO)))
default:
@echo $@
```
which yields:
```
$ make
default
$ make DBG=1
Makefile:8: dbg is 1
Makefile:8: dbg is 1
Makefile:8: dbg is 1
default
```
We COULD have only changed `$(warning)` to `$$(warning)` and left
`$(DBG)` alone, because that's a cheap expansion. I chose NOT to do
that here because it requires brainpower to think about this all, and it
seems easier to set a simple rule: inside a `define`/`endef` block, you
always use `$$` unless you KNOW that you NEED expansion-time evaluation
(as in the `$(prefix)` in this commit, which is effectively an argument
to the macros).
* kube-proxy cluder-cidr arg accepts comma-separated list
It is possible in dual-stack clusters to provide kube-proxy with
a comma-separated list with an IPv4 and IPv6 CIDR for pods.
update: signoff
update2: update email profile
Signed-off-by: Tyler Lloyd <Tyler.Lloyd@microsoft.com>
Signed-off-by: Tyler Lloyd <tylerlloyd928@gmail.com>
* Updating cluster-cidr comment description
Signed-off-by: Tyler Lloyd <tyler.lloyd@microsoft.com>