Skip to content

Commit 7a6ede4

Browse files
abhideistio-testing
authored andcommitted
WIP: Use istio-iptables golang implementation instead of bash script (#18962)
Issue: istio/istio#13967
1 parent 713fc5e commit 7a6ede4

File tree

7 files changed

+11
-17
lines changed

7 files changed

+11
-17
lines changed

pilot/docker/Dockerfile.proxy_debug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ FROM docker.io/istio/base:${BASE_VERSION} as default
77
ARG proxy_version
88
ARG istio_version
99

10-
COPY istio-iptables.sh /usr/local/bin/istio-iptables
10+
COPY istio-iptables /usr/local/bin/istio-iptables
1111

1212
# Install Envoy.
1313
COPY envoy /usr/local/bin/envoy

pilot/docker/Dockerfile.proxytproxy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ COPY pilot-agent /usr/local/bin/pilot-agent
3333
COPY envoy_pilot.yaml.tmpl /etc/istio/proxy/envoy_pilot.yaml.tmpl
3434
COPY envoy_policy.yaml.tmpl /etc/istio/proxy/envoy_policy.yaml.tmpl
3535
COPY envoy_telemetry.yaml.tmpl /etc/istio/proxy/envoy_telemetry.yaml.tmpl
36-
COPY istio-iptables.sh /usr/local/bin/istio-iptables
36+
COPY istio-iptables /usr/local/bin/istio-iptables
3737

3838
# Copy Envoy bootstrap templates used by pilot-agent
3939
COPY envoy_bootstrap_v2.json /var/lib/istio/envoy/envoy_bootstrap_tmpl.json

pilot/docker/Dockerfile.proxyv2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ COPY gcp_envoy_bootstrap.json /var/lib/istio/envoy/gcp_envoy_bootstrap_tmpl.json
1313

1414
RUN chown -R istio-proxy /var/lib/istio
1515

16-
COPY istio-iptables.sh /usr/local/bin/istio-iptables
16+
COPY istio-iptables /usr/local/bin/istio-iptables
1717

1818
# The following section is used as base image if BASE_DISTRIBUTION=distroless
1919
# hadolint ignore=DL3007

pkg/test/echo/docker/Dockerfile.app_sidecar

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ COPY pilot-agent /usr/local/bin/pilot-agent
1212
COPY node_agent /usr/local/bin/node_agent
1313
COPY istio-start.sh /usr/local/bin/istio-start.sh
1414
COPY istio-node-agent-start.sh /usr/local/bin/istio-node-agent-start.sh
15-
COPY istio-iptables.sh /usr/local/bin/istio-iptables
16-
COPY istio-clean-iptables.sh /usr/local/bin/istio-clean-iptables
15+
COPY istio-iptables /usr/local/bin/istio-iptables
16+
COPY istio-clean-iptables /usr/local/bin/istio-clean-iptables
1717
COPY postinst.sh /usr/local/bin/postinst.sh
1818
COPY envoy_bootstrap_v2.json /var/lib/istio/envoy/envoy_bootstrap_tmpl.json
1919

prow/e2e-kind-suite.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ E2E_ARGS+=("--use_local_cluster")
8282
# See https://kind.sigs.k8s.io/docs/user/quick-start/#loading-an-image-into-your-cluster
8383
E2E_ARGS+=("--image_pull_policy" "IfNotPresent")
8484

85-
8685
export HUB=${HUB:-"istio-testing"}
8786
export TAG="${TAG:-"istio-testing"}"
8887

tools/istio-docker.mk

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,7 @@ $(ISTIO_DOCKER)/certs:
6262

6363
# tell make which files are copied from the source tree and generate rules to copy them to the proper location:
6464
# TODO(sdake) $(NODE_AGENT_TEST_FILES) $(GRAFANA_FILES)
65-
DOCKER_FILES_FROM_SOURCE:=tools/packaging/common/istio-iptables.sh tools/packaging/common/istio-clean-iptables.sh \
66-
tests/testdata/certs/cert.crt tests/testdata/certs/cert.key tests/testdata/certs/cacert.pem
67-
# generates rules like the following:
68-
# $(ISTIO_DOCKER)/tools/packaging/common/istio-iptables.sh: $(ISTIO_OUT)/tools/packaging/common/istio-iptables.sh | $(ISTIO_DOCKER)
69-
# cp $FILE $$(@D))
65+
DOCKER_FILES_FROM_SOURCE:=tests/testdata/certs/cert.crt tests/testdata/certs/cert.key tests/testdata/certs/cacert.pem
7066
$(foreach FILE,$(DOCKER_FILES_FROM_SOURCE), \
7167
$(eval $(ISTIO_DOCKER)/$(notdir $(FILE)): $(FILE) | $(ISTIO_DOCKER); cp $(FILE) $$(@D)))
7268

@@ -109,7 +105,6 @@ docker.proxyv2: $(ISTIO_OUT_LINUX)/pilot-agent
109105
docker.proxyv2: pilot/docker/Dockerfile.proxyv2
110106
docker.proxyv2: pilot/docker/envoy_pilot.yaml.tmpl
111107
docker.proxyv2: pilot/docker/envoy_policy.yaml.tmpl
112-
docker.proxyv2: tools/packaging/common/istio-iptables.sh
113108
docker.proxyv2: pilot/docker/envoy_telemetry.yaml.tmpl
114109
docker.proxyv2: $(ISTIO_DOCKER)/istio-iptables
115110
$(DOCKER_RULE)
@@ -123,8 +118,8 @@ docker.proxytproxy: $(ISTIO_OUT_LINUX)/pilot-agent
123118
docker.proxytproxy: pilot/docker/Dockerfile.proxytproxy
124119
docker.proxytproxy: pilot/docker/envoy_pilot.yaml.tmpl
125120
docker.proxytproxy: pilot/docker/envoy_policy.yaml.tmpl
126-
docker.proxytproxy: tools/packaging/common/istio-iptables.sh
127121
docker.proxytproxy: pilot/docker/envoy_telemetry.yaml.tmpl
122+
docker.proxytproxy: $(ISTIO_DOCKER)/istio-iptables
128123
$(DOCKER_RULE)
129124

130125
docker.pilot: BUILD_PRE=chmod 755 pilot-discovery cacert.pem &&
@@ -152,8 +147,6 @@ docker.app: $(ISTIO_DOCKER)/certs
152147
# Test application bundled with the sidecar (for non-k8s).
153148
docker.app_sidecar: BUILD_ARGS=--build-arg BASE_VERSION=${BASE_VERSION}
154149
docker.app_sidecar: tools/packaging/common/envoy_bootstrap_v2.json
155-
docker.app_sidecar: tools/packaging/common/istio-iptables.sh
156-
docker.app_sidecar: tools/packaging/common/istio-clean-iptables.sh
157150
docker.app_sidecar: tools/packaging/common/istio-start.sh
158151
docker.app_sidecar: tools/packaging/common/istio-node-agent-start.sh
159152
docker.app_sidecar: tools/packaging/deb/postinst.sh
@@ -168,6 +161,8 @@ docker.app_sidecar: pkg/test/echo/docker/Dockerfile.app_sidecar
168161
docker.app_sidecar: pilot/docker/envoy_pilot.yaml.tmpl
169162
docker.app_sidecar: pilot/docker/envoy_policy.yaml.tmpl
170163
docker.app_sidecar: pilot/docker/envoy_telemetry.yaml.tmpl
164+
docker.app_sidecar: $(ISTIO_DOCKER)/istio-iptables
165+
docker.app_sidecar: $(ISTIO_DOCKER)/istio-clean-iptables
171166
$(DOCKER_RULE)
172167

173168
# Test policy backend for mixer integration

tools/packaging/deb/istio.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ $(foreach DEP,$(SIDECAR_DEB_DEPS),\
3636

3737
ISTIO_DEB_DEST:=${ISTIO_DEB_BIN}/istio-start.sh \
3838
${ISTIO_DEB_BIN}/istio-node-agent-start.sh \
39-
${ISTIO_DEB_BIN}/istio-iptables.sh \
40-
${ISTIO_DEB_BIN}/istio-clean-iptables.sh \
39+
${ISTIO_DEB_BIN}/istio-iptables \
40+
${ISTIO_DEB_BIN}/istio-clean-iptables \
4141
/lib/systemd/system/istio.service \
4242
/lib/systemd/system/istio-auth-node-agent.service \
4343
/var/lib/istio/envoy/sidecar.env

0 commit comments

Comments
 (0)