@@ -106,21 +106,21 @@ helm-docs: docker
106
106
helm-lint : docker
107
107
@docker run -v " $( SRC_ROOT) :/workdir" --entrypoint /bin/sh quay.io/helmpack/chart-testing:v3.3.1 -c " cd /workdir; ct lint --config .github/configs/ct.yaml --lint-conf .github/configs/lintconf.yaml --all --debug"
108
108
109
- helm-test : helm-controller-version kind ct ko-build-all helm-create helm-install helm-destroy
109
+ helm-test : helm-controller-version ct ko-build-all helm-create helm-install helm-destroy
110
110
111
111
helm-install :
112
112
@kubectl apply --server-side=true -f https://github.com/cert-manager/cert-manager/releases/download/v1.13.2/cert-manager.yaml
113
113
@make install-capsule
114
114
@kubectl apply --server-side=true -f https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.58.0/bundle.yaml
115
115
@$(CT ) install --config $(SRC_ROOT ) /.github/configs/ct.yaml --namespace=capsule-system --all --debug
116
116
117
- helm-create :
118
- @kind create cluster --wait=60s --name capsule-charts
119
- @kind load docker-image --name capsule-charts $(CAPSULE_PROXY_IMG ) :$(VERSION )
117
+ helm-create : kind
118
+ @$( KIND ) create cluster --wait=60s --name capsule-charts
119
+ @$( KIND ) load docker-image --name capsule-charts $(CAPSULE_PROXY_IMG ) :$(VERSION )
120
120
@kubectl create ns capsule-system
121
121
122
- helm-destroy :
123
- @kind delete cluster --name capsule-charts
122
+ helm-destroy : kind
123
+ @$( KIND ) delete cluster --name capsule-charts
124
124
125
125
# ###################
126
126
# -- Testing
@@ -129,14 +129,18 @@ helm-destroy:
129
129
.PHONY : e2e
130
130
e2e : e2e-build e2e-install e2e-exec
131
131
132
- .PHONY : e2e-exec
133
- e2e-exec :
132
+ .PHONY : e2e-legacy- exec
133
+ e2e-legacy- exec :
134
134
@./e2e/run.bash $$ {CLIENT_TEST:-kubectl}-$$ {CAPSULE_PROXY_MODE:-https}
135
135
136
+ .PHONY : e2e-exec
137
+ e2e-exec : ginkgo
138
+ $(GINKGO ) -v -tags e2e ./e2e
139
+
136
140
.PHONY : e2e-build
137
- e2e-build :
141
+ e2e-build : kind
138
142
@echo " Building kubernetes env using Kind $$ {KIND_K8S_VERSION:-v1.27.0}..."
139
- @kind create cluster --name capsule --image kindest/node:$$ {KIND_K8S_VERSION:-v1.27.0} --config ./e2e/kind.yaml --wait=120s \
143
+ @$( KIND ) create cluster --name capsule --image kindest/node:$$ {KIND_K8S_VERSION:-v1.27.0} --config ./e2e/kind.yaml --wait=120s \
140
144
&& kubectl taint nodes capsule-worker2 key1=value1:NoSchedule
141
145
@helm repo add bitnami https://charts.bitnami.com/bitnami
142
146
@helm repo update
@@ -149,13 +153,13 @@ e2e-build:
149
153
e2e-install : install-capsule install-capsule-proxy rbac-fix
150
154
151
155
.PHONY : e2e-load-image
152
- e2e-load-image : ko-build-all
156
+ e2e-load-image : kind ko-build-all
153
157
@echo " Loading Docker image..."
154
- @kind load docker-image --name capsule --nodes capsule-worker $(CAPSULE_PROXY_IMG ) :$(VERSION )
158
+ @$( KIND ) load docker-image --name capsule $(CAPSULE_PROXY_IMG ) :$(VERSION )
155
159
156
160
.PHONY : e2e-destroy
157
- e2e-destroy :
158
- kind delete cluster --name capsule
161
+ e2e-destroy : kind
162
+ $( KIND ) delete cluster --name capsule
159
163
160
164
install-capsule :
161
165
@echo " Installing capsule..."
@@ -185,7 +189,8 @@ ifeq ($(CAPSULE_PROXY_MODE),http)
185
189
--set "kind=DaemonSet" \
186
190
--set "daemonset.hostNetwork=true" \
187
191
--set "serviceMonitor.enabled=false" \
188
- --set "options.generateCertificates=false"
192
+ --set "options.generateCertificates=false" \
193
+ --set "options.extraArgs={--feature-gates=ProxyClusterScoped=true,--feature-gates=ProxyAllNamespaced=true}"
189
194
else
190
195
@echo "Running in HTTPS mode"
191
196
@echo "capsule proxy certificates..."
@@ -194,19 +199,19 @@ else
194
199
&& kubectl --namespace capsule-system create secret generic capsule-proxy --from-file=tls.key=./127.0.0.1-key.pem --from-file=tls.crt=./127.0.0.1.pem --from-literal=ca=$$(cat $(ROOTCA) | base64 |tr -d '\n')
195
200
@echo "kubeconfig configurations..."
196
201
@cd hack \
197
- && curl -s https://raw.githubusercontent.com/projectcapsule/capsule/main/hack/create-user.sh | bash -s -- alice oil capsule.clastix.io \
202
+ && curl -s https://raw.githubusercontent.com/projectcapsule/capsule/main/hack/create-user.sh | bash -s -- alice oil projectcapsule.dev, capsule.clastix.io \
198
203
&& mv alice-oil.kubeconfig alice.kubeconfig \
199
204
&& KUBECONFIG=alice.kubeconfig kubectl config set clusters.kind-capsule.certificate-authority-data $$(cat $(ROOTCA) | base64 |tr -d '\n') \
200
205
&& KUBECONFIG=alice.kubeconfig kubectl config set clusters.kind-capsule.server https://127.0.0.1:9001 \
201
- && curl -s https://raw.githubusercontent.com/projectcapsule/capsule/main/hack/create-user.sh | bash -s -- bob gas capsule.clastix.io \
206
+ && curl -s https://raw.githubusercontent.com/projectcapsule/capsule/main/hack/create-user.sh | bash -s -- bob gas projectcapsule.dev, capsule.clastix.io \
202
207
&& mv bob-gas.kubeconfig bob.kubeconfig \
203
208
&& KUBECONFIG=bob.kubeconfig kubectl config set clusters.kind-capsule.certificate-authority-data $$(cat $(ROOTCA) | base64 |tr -d '\n') \
204
209
&& KUBECONFIG=bob.kubeconfig kubectl config set clusters.kind-capsule.server https://127.0.0.1:9001 \
205
- && curl -s https://raw.githubusercontent.com/projectcapsule/capsule/main/hack/create-user.sh | bash -s -- joe gas capsule.clastix.io,foo.clastix.io \
210
+ && curl -s https://raw.githubusercontent.com/projectcapsule/capsule/main/hack/create-user.sh | bash -s -- joe gas projectcapsule.dev, capsule.clastix.io,foo.clastix.io \
206
211
&& mv joe-gas.kubeconfig foo.clastix.io.kubeconfig \
207
212
&& KUBECONFIG=foo.clastix.io.kubeconfig kubectl config set clusters.kind-capsule.certificate-authority-data $$(cat $(ROOTCA) | base64 |tr -d '\n') \
208
213
&& KUBECONFIG=foo.clastix.io.kubeconfig kubectl config set clusters.kind-capsule.server https://127.0.0.1:9001 \
209
- && curl -s https://raw.githubusercontent.com/projectcapsule/capsule/main/hack/create-user.sh | bash -s -- dave soil capsule.clastix.io,bar.clastix.io \
214
+ && curl -s https://raw.githubusercontent.com/projectcapsule/capsule/main/hack/create-user.sh | bash -s -- dave soil projectcapsule.dev, capsule.clastix.io,bar.clastix.io \
210
215
&& mv dave-soil.kubeconfig dave.kubeconfig \
211
216
&& kubectl --kubeconfig=dave.kubeconfig config set clusters.kind-capsule.certificate-authority-data $$(cat $(ROOTCA) | base64 |tr -d '\n') \
212
217
&& kubectl --kubeconfig=dave.kubeconfig config set clusters.kind-capsule.server https://127.0.0.1:9001
@@ -219,8 +224,10 @@ else
219
224
--set "service.nodePort=" \
220
225
--set "kind=DaemonSet" \
221
226
--set "daemonset.hostNetwork=true" \
222
- --set "serviceMonitor.enabled=false"
227
+ --set "serviceMonitor.enabled=false" \
228
+ --set "options.extraArgs={--feature-gates=ProxyClusterScoped=true,--feature-gates=ProxyAllNamespaced=true}"
223
229
endif
230
+ @kubectl rollout restart ds capsule-proxy -n capsule-system || true
224
231
225
232
rbac-fix :
226
233
@echo " RBAC customization..."
@@ -258,6 +265,11 @@ CONTROLLER_GEN_VERSION = v0.8.0
258
265
controller-gen : # # Download controller-gen locally if necessary.
259
266
$(call go-install-tool,$(CONTROLLER_GEN ) ,sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_GEN_VERSION ) )
260
267
268
+ GINKGO := $(shell pwd) /bin/ginkgo
269
+ GINKGO_VERSION = v2.19.0
270
+ ginkgo : # # Download ginkgo locally if necessary.
271
+ $(call go-install-tool,$(GINKGO ) ,github.com/onsi/ginkgo/v2/ginkgo@$(GINKGO_VERSION ) )
272
+
261
273
MKCERT = $(shell pwd) /bin/mkcert
262
274
MKCERT_VERSION = v1.4.4
263
275
mkcert : # # Download mkcert locally if necessary.
0 commit comments