forked from istio/istio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathistio.mk
133 lines (103 loc) · 5.47 KB
/
istio.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# tests/istio.mk defines E2E tests for Istio
E2E_TIMEOUT ?= 60m
# If set outside, it appears it is not possible to modify the variable.
E2E_ARGS ?=
ISTIOCTL_BIN ?= ${ISTIO_OUT}/istioctl
DEFAULT_EXTRA_E2E_ARGS = ${MINIKUBE_FLAGS}
DEFAULT_EXTRA_E2E_ARGS += --istioctl=${ISTIOCTL_BIN}
DEFAULT_EXTRA_E2E_ARGS += --mixer_tag=${TAG_VARIANT}
DEFAULT_EXTRA_E2E_ARGS += --pilot_tag=${TAG_VARIANT}
DEFAULT_EXTRA_E2E_ARGS += --proxy_tag=${TAG_VARIANT}
DEFAULT_EXTRA_E2E_ARGS += --ca_tag=${TAG_VARIANT}
DEFAULT_EXTRA_E2E_ARGS += --galley_tag=${TAG_VARIANT}
DEFAULT_EXTRA_E2E_ARGS += --sidecar_injector_tag=${TAG_VARIANT}
DEFAULT_EXTRA_E2E_ARGS += --app_tag=${TAG_VARIANT}
DEFAULT_EXTRA_E2E_ARGS += --mixer_hub=${HUB}
DEFAULT_EXTRA_E2E_ARGS += --pilot_hub=${HUB}
DEFAULT_EXTRA_E2E_ARGS += --proxy_hub=${HUB}
DEFAULT_EXTRA_E2E_ARGS += --ca_hub=${HUB}
DEFAULT_EXTRA_E2E_ARGS += --galley_hub=${HUB}
DEFAULT_EXTRA_E2E_ARGS += --sidecar_injector_hub=${HUB}
DEFAULT_EXTRA_E2E_ARGS += --app_hub=${HUB}
# Enable Istio CNI in helm template commands
export ENABLE_ISTIO_CNI ?= false
EXTRA_E2E_ARGS ?= ${DEFAULT_EXTRA_E2E_ARGS}
e2e_simple: build generate_e2e_yaml e2e_simple_run
e2e_simple_noauth: build generate_e2e_yaml e2e_simple_noauth_run
e2e_mixer: build generate_e2e_yaml e2e_mixer_run
e2e_dashboard: build generate_e2e_yaml e2e_dashboard_run
e2e_stackdriver: build generate_e2e_yaml e2e_stackdriver_run
e2e_pilotv2_v1alpha3: build test/local/noauth/e2e_pilotv2
e2e_bookinfo_envoyv2_v1alpha3: build test/local/auth/e2e_bookinfo_envoyv2
e2e_bookinfo_trustdomain: build test/local/auth/e2e_bookinfo_trustdomain
e2e_simple_run:
go test -v -timeout ${E2E_TIMEOUT} ./tests/e2e/tests/simple -args --auth_enable=true \
--egress=false --ingress=false \
--valueFile test-values/values-e2e.yaml \
--rbac_enable=false --cluster_wide ${E2E_ARGS} ${T} ${EXTRA_E2E_ARGS}
e2e_simple_noauth_run:
go test -v -timeout ${E2E_TIMEOUT} ./tests/e2e/tests/simple -args --auth_enable=false \
--egress=false --ingress=false \
--valueFile test-values/values-e2e.yaml \
--rbac_enable=false --cluster_wide ${E2E_ARGS} ${T} ${EXTRA_E2E_ARGS}
e2e_mixer_run:
go test -v -timeout ${E2E_TIMEOUT} ./tests/e2e/tests/mixer \
--auth_enable=false --egress=false --ingress=false --rbac_enable=false \
--cluster_wide ${E2E_ARGS} ${T} ${EXTRA_E2E_ARGS}
e2e_dashboard_run:
go test -v -timeout ${E2E_TIMEOUT} ./tests/e2e/tests/dashboard -args ${E2E_ARGS} ${EXTRA_E2E_ARGS} -use_galley_config_validator -cluster_wide
e2e_bookinfo_run:
go test -v -timeout ${E2E_TIMEOUT} ./tests/e2e/tests/bookinfo -args ${E2E_ARGS} ${EXTRA_E2E_ARGS}
e2e_stackdriver_run:
go test -v -timeout ${E2E_TIMEOUT} ./tests/e2e/tests/stackdriver -args ${E2E_ARGS} ${EXTRA_E2E_ARGS} --cluster_wide --gcp_proj=${GCP_PROJ} --sa_cred=/etc/service-account/service-account.json
test/local/auth/e2e_simple: generate_e2e_yaml
go test -v -timeout ${E2E_TIMEOUT} ./tests/e2e/tests/simple -args --auth_enable=true \
--egress=false --ingress=false \
--rbac_enable=false --use_local_cluster --cluster_wide ${E2E_ARGS} ${T} ${EXTRA_E2E_ARGS}
test/local/noauth/e2e_simple: generate_e2e_yaml
go test -v -timeout ${E2E_TIMEOUT} ./tests/e2e/tests/simple -args --auth_enable=false \
--egress=false --ingress=false \
--rbac_enable=false --use_local_cluster --cluster_wide ${E2E_ARGS} ${T} ${EXTRA_E2E_ARGS}
test/local/e2e_mixer: generate_e2e_yaml
go test -v -timeout ${E2E_TIMEOUT} ./tests/e2e/tests/mixer \
--auth_enable=false --egress=false --ingress=false --rbac_enable=false \
--cluster_wide ${E2E_ARGS} ${T} ${EXTRA_E2E_ARGS}
# v1alpha3+envoyv2 test without MTLS
test/local/noauth/e2e_pilotv2: generate_e2e_yaml
go test -v -timeout ${E2E_TIMEOUT} ./tests/e2e/tests/pilot \
--auth_enable=false --ingress=false --rbac_enable=true --cluster_wide \
${E2E_ARGS} ${T} ${EXTRA_E2E_ARGS}
# Run the pilot controller tests
go test -v -timeout ${E2E_TIMEOUT} ./tests/e2e/tests/controller
# v1alpha3+envoyv2 test with MTLS
test/local/auth/e2e_pilotv2: generate_e2e_yaml
go test -v -timeout ${E2E_TIMEOUT} ./tests/e2e/tests/pilot \
--auth_enable=true --ingress=false --rbac_enable=true --cluster_wide \
${E2E_ARGS} ${T} ${EXTRA_E2E_ARGS}
# Run the pilot controller tests
go test -v -timeout ${E2E_TIMEOUT} ./tests/e2e/tests/controller
test/local/auth/e2e_bookinfo_envoyv2: generate_e2e_yaml
go test -v -timeout ${E2E_TIMEOUT} ./tests/e2e/tests/bookinfo \
--auth_enable=true --egress=true --ingress=false --rbac_enable=false \
--cluster_wide ${E2E_ARGS} ${T} ${EXTRA_E2E_ARGS}
test/local/auth/e2e_bookinfo_trustdomain: generate_e2e_yaml
go test -v -timeout ${E2E_TIMEOUT} ./tests/e2e/tests/bookinfo \
--auth_enable=true --trust_domain_enable --egress=true --ingress=false --rbac_enable=false \
--cluster_wide ${E2E_ARGS} ${T} ${EXTRA_E2E_ARGS}
.PHONY: generate_e2e_yaml
generate_e2e_yaml: $(e2e_files)
# Create yaml files for e2e tests. Applies values-e2e.yaml, then values-$filename.yaml
$(e2e_files): $(HOME)/.helm istio-init.yaml
cat install/kubernetes/namespace.yaml > install/kubernetes/$@
cat install/kubernetes/helm/istio-init/files/crd-* >> install/kubernetes/$@
$(HELM) template \
--name=istio \
--namespace=istio-system \
--set-string global.tag=${TAG_VARIANT} \
--set-string global.hub=${HUB} \
--set-string global.imagePullPolicy=$(PULL_POLICY) \
--set istio_cni.enabled=${ENABLE_ISTIO_CNI} \
${EXTRA_HELM_SETTINGS} \
--values install/kubernetes/helm/istio/test-values/values-e2e.yaml \
--values install/kubernetes/helm/istio/test-values/values-$@ \
install/kubernetes/helm/istio >> install/kubernetes/$@