Skip to content

Commit b3e3eae

Browse files
authored
Merge pull request #173 from jumpstarter-dev/e2e-with-operator
e2e: run e2e testing with the operator as well
2 parents e5785c9 + 4cbecf2 commit b3e3eae

16 files changed

Lines changed: 265 additions & 36 deletions

File tree

.github/workflows/controller-kind.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,23 @@ on:
1111

1212
jobs:
1313
deploy-kind:
14+
strategy:
15+
matrix:
16+
method:
17+
- helm
18+
- operator
1419
runs-on: ubuntu-latest
1520
steps:
1621
- name: Checkout repository
1722
uses: actions/checkout@v4
1823
with:
1924
fetch-depth: 0
2025

21-
- name: Run make deploy
26+
- name: Run make deploy (${{ matrix.method }})
2227
working-directory: controller
2328
run: make deploy
29+
env:
30+
METHOD: ${{ matrix.method }}
2431

2532
e2e-test-operator:
2633
runs-on: ubuntu-latest

.github/workflows/e2e.yaml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,42 @@ permissions:
1212
contents: read
1313

1414
jobs:
15-
e2e-tests:
15+
changes:
1616
if: github.repository_owner == 'jumpstarter-dev'
17+
runs-on: ubuntu-latest
18+
outputs:
19+
should_run: ${{ steps.filter.outputs.e2e }}
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
- uses: dorny/paths-filter@v3
25+
id: filter
26+
with:
27+
base: ${{ github.base_ref || github.event.merge_group.base_ref || 'main' }}
28+
filters: |
29+
e2e:
30+
- 'controller/**'
31+
- 'e2e/**'
32+
- 'python/**'
33+
- '.github/workflows/e2e.yaml'
34+
- 'Makefile'
35+
36+
e2e-tests:
37+
needs: changes
38+
if: needs.changes.outputs.should_run == 'true' || github.event_name == 'workflow_dispatch'
1739
strategy:
1840
matrix:
1941
os:
2042
- ubuntu-24.04
2143
- ubuntu-24.04-arm
44+
method:
45+
- operator
46+
- helm
47+
exclude:
48+
# Only run operator on ARM, skip helm
49+
- os: ubuntu-24.04-arm
50+
method: helm
2251
runs-on: ${{ matrix.os }}
2352
timeout-minutes: 60
2453
steps:
@@ -37,8 +66,10 @@ jobs:
3766
run: make e2e-setup
3867
env:
3968
CI: true
69+
METHOD: ${{ matrix.method }}
4070

4171
- name: Run e2e tests
4272
run: make e2e-run
4373
env:
4474
CI: true
75+
METHOD: ${{ matrix.method }}

Makefile

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
# Subdirectories containing projects
77
SUBDIRS := python protocol controller e2e
88

9+
# Deployment method for e2e tests: operator (default) or helm
10+
METHOD ?= operator
11+
912
# Default target
1013
.PHONY: all
1114
all: build
@@ -30,6 +33,9 @@ help:
3033
@echo " make e2e-full - Full setup + run (for CI or first time)"
3134
@echo " make e2e-clean - Clean up e2e test environment (delete cluster, certs, etc.)"
3235
@echo ""
36+
@echo " Use METHOD=operator (default) or METHOD=helm to select deployment method"
37+
@echo " Example: make e2e-setup METHOD=helm"
38+
@echo ""
3339
@echo "Per-project targets:"
3440
@echo " make build-<project> - Build specific project"
3541
@echo " make test-<project> - Test specific project"
@@ -115,14 +121,14 @@ test-controller:
115121
# Setup e2e testing environment (one-time)
116122
.PHONY: e2e-setup
117123
e2e-setup:
118-
@echo "Setting up e2e test environment..."
119-
@bash e2e/setup-e2e.sh
124+
@echo "Setting up e2e test environment (method: $(METHOD))..."
125+
@METHOD=$(METHOD) bash e2e/setup-e2e.sh
120126

121127
# Run e2e tests
122128
.PHONY: e2e-run
123129
e2e-run:
124-
@echo "Running e2e tests..."
125-
@bash e2e/run-e2e.sh
130+
@echo "Running e2e tests (method: $(METHOD))..."
131+
@METHOD=$(METHOD) bash e2e/run-e2e.sh
126132

127133
# Convenience alias for running e2e tests
128134
.PHONY: e2e
@@ -131,7 +137,7 @@ e2e: e2e-run
131137
# Full e2e setup + run
132138
.PHONY: e2e-full
133139
e2e-full:
134-
@bash e2e/run-e2e.sh --full
140+
@METHOD=$(METHOD) bash e2e/run-e2e.sh --full
135141

136142
# Clean up e2e test environment
137143
.PHONY: e2e-clean

controller/Makefile

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ endif
3030
# tools. (i.e. podman)
3131
CONTAINER_TOOL ?= podman
3232

33+
# Deployment method: operator (default) or helm
34+
METHOD ?= operator
35+
3336
# Setting SHELL to bash allows bash commands to be executed by recipes.
3437
# Options are set to exit when a recipe line exits non-zero or a piped command fails.
3538
SHELL = /usr/bin/env bash -o pipefail
@@ -171,15 +174,23 @@ uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified
171174
$(KUSTOMIZE) build config/crd | $(KUBECTL) delete --ignore-not-found=$(ignore-not-found) -f -
172175

173176
.PHONY: deploy
174-
deploy: docker-build cluster grpcurl
177+
deploy: docker-build cluster grpcurl ## Deploy controller using METHOD (operator or helm)
178+
ifeq ($(METHOD),operator)
179+
$(MAKE) build-operator
180+
./hack/deploy_with_operator.sh
181+
else ifeq ($(METHOD),helm)
175182
./hack/deploy_with_helm.sh
183+
else
184+
$(error Unknown METHOD=$(METHOD). Use 'operator' or 'helm')
185+
endif
176186

187+
# Backward compatibility alias
177188
.PHONY: deploy-with-operator
178-
deploy-with-operator: docker-build build-operator cluster grpcurl
179-
./hack/deploy_with_operator.sh
189+
deploy-with-operator:
190+
$(MAKE) deploy METHOD=operator
180191

181192
.PHONY: deploy-operator
182-
deploy-operator: docker-build build-operator cluster grpcurl
193+
deploy-operator: docker-build build-operator cluster grpcurl ## Deploy only the operator (without Jumpstarter CR)
183194
NETWORKING_MODE=ingress DEPLOY_JUMPSTARTER=false ./hack/deploy_with_operator.sh
184195

185196
.PHONY: test-operator-e2e
@@ -191,7 +202,7 @@ operator-logs:
191202

192203
.PHONY: deploy-with-operator-parallel
193204
deploy-with-operator-parallel:
194-
make deploy-with-operator -j5 --output-sync=target
205+
make deploy METHOD=operator -j5 --output-sync=target
195206

196207
.PHONY: deploy-exporters
197208
deploy-exporters:

controller/deploy/operator/api/v1alpha1/jumpstarter_types.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,19 @@ type AuthenticationConfig struct {
344344
// Enables authentication using external JWT tokens from OIDC providers.
345345
// Supports multiple JWT authenticators for different identity providers.
346346
JWT []apiserverv1beta1.JWTAuthenticator `json:"jwt,omitempty"`
347+
348+
// Automatic user provisioning configuration, this is useful for creating
349+
// users authenticated by external identity providers in Jumpstarter.
350+
AutoProvisioning AutoProvisioningConfig `json:"autoProvisioning,omitempty"`
351+
}
352+
353+
// AutoProvisioningConfig defines auto provisioning configuration.
354+
type AutoProvisioningConfig struct {
355+
// Enable auto provisioning.
356+
// When disabled, users authenticated by external identity providers will
357+
// not be automatically created in Jumpstarter.
358+
// +kubebuilder:default=false
359+
Enabled bool `json:"enabled,omitempty"`
347360
}
348361

349362
// InternalAuthConfig defines the built-in authentication configuration.

controller/deploy/operator/api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

controller/deploy/operator/bundle/manifests/jumpstarter-operator.clusterserviceversion.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ metadata:
1818
}
1919
]
2020
capabilities: Basic Install
21-
createdAt: "2026-01-28T15:18:09Z"
21+
createdAt: "2026-01-30T11:40:29Z"
2222
operators.operatorframework.io/builder: operator-sdk-v1.41.1
2323
operators.operatorframework.io/project_layout: go.kubebuilder.io/v4
2424
name: jumpstarter-operator.v0.8.0

controller/deploy/operator/bundle/manifests/operator.jumpstarter.dev_jumpstarters.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,19 @@ spec:
4747
Authentication configuration for client and exporter authentication.
4848
Supports multiple authentication methods including internal tokens, Kubernetes tokens, and JWT.
4949
properties:
50+
autoProvisioning:
51+
description: |-
52+
Automatic user provisioning configuration, this is useful for creating
53+
users authenticated by external identity providers in Jumpstarter.
54+
properties:
55+
enabled:
56+
default: false
57+
description: |-
58+
Enable auto provisioning.
59+
When disabled, users authenticated by external identity providers will
60+
not be automatically created in Jumpstarter.
61+
type: boolean
62+
type: object
5063
internal:
5164
description: |-
5265
Internal authentication configuration.

controller/deploy/operator/config/crd/bases/operator.jumpstarter.dev_jumpstarters.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,19 @@ spec:
4747
Authentication configuration for client and exporter authentication.
4848
Supports multiple authentication methods including internal tokens, Kubernetes tokens, and JWT.
4949
properties:
50+
autoProvisioning:
51+
description: |-
52+
Automatic user provisioning configuration, this is useful for creating
53+
users authenticated by external identity providers in Jumpstarter.
54+
properties:
55+
enabled:
56+
default: false
57+
description: |-
58+
Enable auto provisioning.
59+
When disabled, users authenticated by external identity providers will
60+
not be automatically created in Jumpstarter.
61+
type: boolean
62+
type: object
5063
internal:
5164
description: |-
5265
Internal authentication configuration.

controller/deploy/operator/dist/install.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,19 @@ spec:
450450
Authentication configuration for client and exporter authentication.
451451
Supports multiple authentication methods including internal tokens, Kubernetes tokens, and JWT.
452452
properties:
453+
autoProvisioning:
454+
description: |-
455+
Automatic user provisioning configuration, this is useful for creating
456+
users authenticated by external identity providers in Jumpstarter.
457+
properties:
458+
enabled:
459+
default: false
460+
description: |-
461+
Enable auto provisioning.
462+
When disabled, users authenticated by external identity providers will
463+
not be automatically created in Jumpstarter.
464+
type: boolean
465+
type: object
453466
internal:
454467
description: |-
455468
Internal authentication configuration.

0 commit comments

Comments
 (0)