Skip to content

Commit d7c223c

Browse files
authored
Merge pull request #137 from jumpstarter-dev/operator-fix-auth-api
operator: fix authentication spec api
2 parents 4e3af2f + 3d5dbcd commit d7c223c

10 files changed

Lines changed: 20 additions & 1165 deletions

File tree

.github/workflows/python-tests.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ on:
1010
- 'python/**'
1111
- 'protocol/**'
1212
pull_request:
13-
paths:
14-
- 'python/**'
15-
- 'protocol/**'
13+
# running for all, since github does not detect skipped on this when required for merging
14+
#paths:
15+
# - 'python/**'
16+
# - 'protocol/**'
1617
merge_group:
1718

1819
permissions:

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,6 @@ type ControllerConfig struct {
226226
// gRPC configuration for controller endpoints.
227227
// Defines how controller gRPC services are exposed and configured.
228228
GRPC GRPCConfig `json:"grpc,omitempty"`
229-
230-
// Authentication configuration for client and exporter authentication.
231-
// Configures how clients and exporters can authenticate with Jumpstarter.
232-
// Supports multiple authentication methods including internal tokens, Kubernetes tokens, and JWT.
233-
Authentication AuthenticationConfig `json:"authentication,omitempty"`
234229
}
235230

236231
// ExporterOptions defines configuration options for exporter behavior.

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

Lines changed: 0 additions & 1 deletion
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: "2025-12-22T16:34:29Z"
21+
createdAt: "2026-01-23T11:36:27Z"
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: 0 additions & 381 deletions
Large diffs are not rendered by default.

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

Lines changed: 0 additions & 381 deletions
Large diffs are not rendered by default.

controller/deploy/operator/dist/install.yaml

Lines changed: 0 additions & 381 deletions
Large diffs are not rendered by default.

controller/deploy/operator/internal/controller/jumpstarter/jumpstarter_controller.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -907,24 +907,24 @@ func (r *JumpstarterReconciler) buildConfig(jumpstarter *operatorv1alpha1.Jumpst
907907

908908
// Authentication configuration
909909
auth := config.Authentication{
910-
JWT: jumpstarter.Spec.Controller.Authentication.JWT,
910+
JWT: jumpstarter.Spec.Authentication.JWT,
911911
}
912912

913913
// Internal authentication
914-
if jumpstarter.Spec.Controller.Authentication.Internal.Enabled {
915-
prefix := jumpstarter.Spec.Controller.Authentication.Internal.Prefix
914+
if jumpstarter.Spec.Authentication.Internal.Enabled {
915+
prefix := jumpstarter.Spec.Authentication.Internal.Prefix
916916
if prefix == "" {
917917
prefix = "internal:"
918918
}
919919
auth.Internal.Prefix = prefix
920920

921-
if jumpstarter.Spec.Controller.Authentication.Internal.TokenLifetime != nil {
922-
auth.Internal.TokenLifetime = jumpstarter.Spec.Controller.Authentication.Internal.TokenLifetime.Duration.String()
921+
if jumpstarter.Spec.Authentication.Internal.TokenLifetime != nil {
922+
auth.Internal.TokenLifetime = jumpstarter.Spec.Authentication.Internal.TokenLifetime.Duration.String()
923923
}
924924
}
925925

926926
// Kubernetes authentication
927-
if jumpstarter.Spec.Controller.Authentication.K8s.Enabled {
927+
if jumpstarter.Spec.Authentication.K8s.Enabled {
928928
auth.K8s.Enabled = true
929929
}
930930

controller/deploy/operator/test/e2e/e2e_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,10 @@ metadata:
369369
spec:
370370
baseDomain: %s
371371
useCertManager: false
372+
authentication:
373+
internal:
374+
prefix: "internal:"
375+
enabled: true
372376
controller:
373377
image: %s
374378
imagePullPolicy: IfNotPresent
@@ -379,10 +383,6 @@ spec:
379383
nodeport:
380384
enabled: true
381385
port: 30010
382-
authentication:
383-
internal:
384-
prefix: "internal:"
385-
enabled: true
386386
routers:
387387
image: %s
388388
imagePullPolicy: IfNotPresent

controller/hack/utils

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,11 @@ kind_load_image() {
6565
install_nginx_ingress() {
6666
echo -e "${GREEN}Deploying nginx ingress in kind ...${NC}"
6767

68-
lsmod | grep ip_tables || \
69-
(echo "ip_tables module not loaded needed by nginx ingress, please run 'sudo modprobe ip_tables'" && exit 1)
68+
# Check ip_tables module only on Linux (lsmod doesn't exist on macOS)
69+
if command -v lsmod &> /dev/null; then
70+
lsmod | grep ip_tables || \
71+
(echo "ip_tables module not loaded needed by nginx ingress, please run 'sudo modprobe ip_tables'" && exit 1)
72+
fi
7073

7174
kubectl apply -f https://github.com/kubernetes/ingress-nginx/raw/refs/heads/main/deploy/static/provider/kind/deploy.yaml
7275

0 commit comments

Comments
 (0)