Skip to content

Comments

Upgrade dependencies, restructure repo, and address code review#44

Merged
dcruver merged 10 commits intomainfrom
upgrade
Feb 20, 2026
Merged

Upgrade dependencies, restructure repo, and address code review#44
dcruver merged 10 commits intomainfrom
upgrade

Conversation

@dcruver
Copy link
Collaborator

@dcruver dcruver commented Feb 19, 2026

Summary

  • Restructure repo: Move webapp out of operator/, rename minimal-app to keip-integration, add root Makefile
  • Upgrade Java: Java 21, Spring Boot 4.0.2, Spring Framework 7, Spring Cloud 2025.1.0
  • Upgrade CRD: v1alpha2 with object-format secretSources, envFrom, configMaps, and enhanced status conditions
  • Enhance webapp: Improved k8s client with create/update logic, deploy route endpoint, expanded test coverage
  • Code review fixes: Address findings across all severity levels — CI supply-chain hardening, RBAC corrections, webhook security, container hardening, and Kubernetes best practices

Highlights

CI/CD Security

  • All third-party GitHub Actions pinned to full commit SHAs
  • Restrictive default permissions on all workflows
  • Fixed silent CI failures in version verification scripts

Operator

  • RBAC verbs corrected (patch instead of unused delete)
  • Webhook HA: topology spread, startup probe, increased memory limit
  • CRD: v1alpha1 no longer served, proper list-map-keys on conditions

Webapp

  • Debug logging sanitized to prevent secret leakage
  • Request size limits, namespace validation, catch-all error handling
  • Parallel route deployment, deduplicated utilities, security contexts on generated pods

keip-integration

  • Base images pinned to digest for reproducible builds
  • Secure actuator defaults via application.properties
  • Basic Spring context test added

Test plan

  • All 98 webapp pytest tests pass
  • Verify keip-integration builds with mvn verify
  • Deploy operator to test cluster and validate IntegrationRoute reconciliation
  • Verify CI workflows run successfully on this PR

🤖 Generated with Claude Code

dcruver and others added 10 commits February 18, 2026 07:19
- Move webapp from operator/webapp/ to top-level webapp/
- Delete keip-container-archetype (use minimal-app instead)
- Split core-controller.yaml into composite-controller.yaml,
  namespace.yaml, and webhook-deployment.yaml
- Add declarative ConfigMap (keip-controller-props.yaml),
  replacing imperative kubectl create cm in Makefile
- Add top-level operator/kustomization.yaml enabling single-command
  install via kubectl apply -k
- Simplify operator Makefile
- Update CI workflows for new directory structure
CI/CD:
- Pin all third-party GitHub Actions to full commit SHAs
- Add restrictive default permissions (contents: read) to all workflows
- Fix subshell bug in verify_current_webapp_img.sh where exit 1 only
  exited the subshell, silently passing version mismatches
- Quote and validate $GITHUB_BASE_REF in verify_changes_update_version.sh

Operator:
- Fix RBAC: replace unused delete verb with required patch for
  integrationroutes; fix roleRef.apiGroup to rbac.authorization.k8s.io
- Add topologySpreadConstraints to webhook Deployment for HA
- Add startupProbe to webhook container
- Increase webhook memory limit to 256Mi for burst headroom
- Add app.kubernetes.io/part-of label to webhook pod template
- Set v1alpha1 served: false to prevent silently ignored resources
- Add x-kubernetes-list-type/list-map-keys to CRD conditions arrays

Webapp:
- Sanitize webhook debug logging to emit only resource metadata
- Add max_length (1MB) to Route.xml and namespace validation
- Add _config_failed flag to k8s_client to prevent retry storms
- Move cluster reachability check to create_route_resources to
  eliminate redundant API calls
- Parallelize route deployment with asyncio.gather
- Add catch-all exception handler to webhook endpoint
- Extract shared get_cert_store_type(), removing duplicate in certmanager
- Filter user labels to prevent overriding app.kubernetes.io/* selectors
- Add securityContext to generated integration route pod templates
- Fix .dockerignore to exclude venv/, .test_coverage/, and Makefile
- Add return type to _with_cors(), remove unnecessary .keys() call
- Fix relative path in test_deploy.py fixture loading

keip-integration:
- Pin eclipse-temurin base image to digest in Dockerfile and Jib
- Add application.properties with secure actuator defaults
- Remove VOLUME declarations; rely on Kubernetes volumeMounts
- Add basic Spring context load test

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove unused `import json` from webhook.py (ruff F401)
- Add spring-boot-starter-test dependency to keip-integration pom.xml
- Add test route XML and TestPropertySource for KeipApplicationTests
- Bump versions: operator 0.15.0→0.16.0, webapp 0.18.0→0.19.0,
  keip-integration 0.4.0→0.5.0
- Update operator image refs to match new versions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Update verify scripts for renamed directories (minimal-app → keip-integration,
  operator/webapp → webapp)
- Update CLAUDE.md, README.md, Makefile, and CI README for renames
- Pass args to SpringApplication.run() in KeipApplication
- Simplify composite-controller (remove statusChecks, add HTTPS TODO)
- Harden webapp Dockerfile (non-root user, PYTHONDONTWRITEBYTECODE)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
hooks:
sync:
webhook:
# TODO: Migrate to HTTPS. Sync requests contain CR specs with secret references.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should create an issue for this

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created #45 to track this.

@dcruver dcruver merged commit 911a4c6 into main Feb 20, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants