Skip to content

Commit

Permalink
connectivity-check: Do not perform hostport in standard check
Browse files Browse the repository at this point in the history
Due to HostPort not being enabled by default, do not perform the check
by default. Require the "connectivity-check-hostport.yaml" to be
deployed.

Fixes: #11563

Signed-off-by: Thomas Graf <thomas@cilium.io>
  • Loading branch information
tgraf committed Jun 2, 2020
1 parent 630df50 commit d961b9d
Show file tree
Hide file tree
Showing 6 changed files with 700 additions and 104 deletions.
10 changes: 0 additions & 10 deletions Documentation/gettingstarted/k8s-install-connectivity-test.rst
Expand Up @@ -26,17 +26,7 @@ indicates success or failure of the test:
pod-to-a-external-1111-7ff666fd8-v5kqb 1/1 Running 0 4m48s
pod-to-a-l3-denied-cnp-64c6c75c5d-xmqhw 1/1 Running 0 4m50s
pod-to-b-intra-node-845f955cdc-5nfrt 1/1 Running 0 4m49s
pod-to-b-intra-node-hostport-6549fc5b88-ngcl5 0/1 Running 4 4m49s
pod-to-b-multi-node-clusterip-666594b445-bsn4j 1/1 Running 0 4m49s
pod-to-b-multi-node-headless-746f84dff5-prk4w 1/1 Running 0 4m49s
pod-to-b-multi-node-hostport-795964f8c8-79bxp 0/1 Running 4 4m49s
pod-to-b-multi-node-nodeport-7cb9c6cb8b-ksm4h 1/1 Running 0 4m49s
pod-to-external-fqdn-allow-google-cnp-b7b6bcdcb-tg9dh 1/1 Running 0 4m48s
.. note::

Depending on the kernel version you are running on, the HostPort feature may
not be enabled by default. If so, the two HostPort related pods will remain
in not-ready state and restart. If you are running on Linux kernel < 4.19,
and want to use HostPort, follow the instructions in
:ref:`k8s_install_portmap` to enable it.
27 changes: 20 additions & 7 deletions examples/kubernetes/connectivity-check/Makefile
@@ -1,13 +1,26 @@
# Copyright 2017-2020 Authors of Cilium
# SPDX-License-Identifier: Apache-2.0
#
DEFAULT_OUT := connectivity-check.yaml
HOSTPORT_OUT := connectivity-check-hostport.yaml

OUT := connectivity-check.yaml
SRC := $(wildcard *.yaml)
SRC := $(filter-out $(OUT), $(SRC))
HOSTPORT_SRC := $(filter-out $(DEFAULT_OUT) $(HOSTPORT_OUT), $(SRC))
DEFAULT_SRC := $(filter-out $(wildcard *-hostport.yaml),$(HOSTPORT_SRC))

all: $(SRC)
@echo '# Automatically generated by Makefile. DO NOT EDIT' > $(OUT)
for FILE in $(SRC); do \
cat $$FILE >> $(OUT); \
echo "---" >> $(OUT); \

all: $(DEFAULT_OUT) $(HOSTPORT_OUT)

$(DEFAULT_OUT): $(DEFAULT_SRC)
@echo '# Automatically generated by Makefile. DO NOT EDIT' > $(DEFAULT_OUT)
for FILE in $(DEFAULT_SRC); do \
cat $$FILE >> $(DEFAULT_OUT); \
echo "---" >> $(DEFAULT_OUT); \
done

$(HOSTPORT_OUT): $(HOSTPORT_SRC)
@echo '# Automatically generated by Makefile. DO NOT EDIT' > $(HOSTPORT_OUT)
for FILE in $(HOSTPORT_SRC); do \
cat $$FILE >> $(HOSTPORT_OUT); \
echo "---" >> $(HOSTPORT_OUT); \
done
8 changes: 0 additions & 8 deletions examples/kubernetes/connectivity-check/README.md
Expand Up @@ -2,11 +2,3 @@

Set of deployments that will perform a series of connectivity checks via
liveness and readiness checks. An unhealthy/unready pod indicates a problem.

## Note: HostPort test

Cilium does not enable HostPort by default. Therefore you will have the
following two pods remain unready unless you enable HostPort via chaining:

pod-to-b-intra-node-hostport-6549fc5b88-ngcl5 0/1 Running 3 3m31s
pod-to-b-multi-node-hostport-795964f8c8-79bxp 0/1 Running 3 3m31s

0 comments on commit d961b9d

Please sign in to comment.