feat(file): implement file domain - #531
Open
lukas016 wants to merge 7 commits into
Open
Conversation
lukas016
force-pushed
the
feat-lk-file-domain
branch
from
August 3, 2026 10:20
e80b714 to
616d3b7
Compare
lukas016
commented
Aug 3, 2026
lukas016
commented
Aug 3, 2026
lukas016
commented
Aug 3, 2026
lukas016
commented
Aug 3, 2026
lukas016
commented
Aug 3, 2026
|
|
||
| func GetChildResourceRef(obj *filev1.ZoneServiceConfig) types.ObjectRef { | ||
| return types.ObjectRef{ | ||
| Name: identityClientNamePrefix + "--" + obj.Name, |
Contributor
Author
There was a problem hiding this comment.
@ron96g do we have some constant for -- in the code?
lukas016
commented
Aug 3, 2026
lukas016
commented
Aug 3, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new file domain/operator module to the controlplane monorepo, including CRDs (FileType, FileExposure, FileSubscription, ZoneServiceConfig), controllers/handlers, a validating webhook, deployment manifests, docs, and CI/release wiring.
Changes:
- Added a new
fileoperator module with controllers, handlers, indices, webhook validation, and samples. - Added CRDs + kustomize manifests (RBAC/manager/webhook/default overlays) for deploying the operator.
- Integrated
file-operatorinto CI and GoReleaser.
Reviewed changes
Copilot reviewed 76 out of 79 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| sftp/Makefile | Builds sftp manager with CGO_ENABLED=0. |
| file/PROJECT | Kubebuilder project definition for file domain resources. |
| file/Makefile | Build/test/lint/manifests targets for the file module. |
| file/internal/webhook/v1/zoneserviceconfig_webhook.go | Validating webhook for ZoneServiceConfig. |
| file/internal/webhook/v1/zoneserviceconfig_webhook_test.go | Unit tests for ZoneServiceConfig validator. |
| file/internal/webhook/v1/webhook_suite_test.go | Envtest webhook suite bootstrap. |
| file/internal/index/index.go | Field index registrations for file resources. |
| file/internal/handler/zoneserviceconfig/handler.go | Reconcile logic projecting ZoneServiceConfig into identity/gateway/sftp resources. |
| file/internal/handler/zoneserviceconfig/handler_suite_test.go | Ginkgo suite for ZoneServiceConfig handler. |
| file/internal/handler/util/util_suite_test.go | Ginkgo suite for handler util package. |
| file/internal/handler/util/refs.go | Helper ObjectRef builders for SFTP resources and source refs. |
| file/internal/handler/util/refs_test.go | Tests for ref helpers and labeling helpers. |
| file/internal/handler/util/publickeys.go | SSH key canonicalization + SFTP user/instance sync helpers. |
| file/internal/handler/util/publickeys_test.go | Tests for public key canonicalization and sync/delete helpers. |
| file/internal/handler/util/labels.go | Child resource labeling + selectors. |
| file/internal/handler/util/getters.go | Getters for FileType, ZoneServiceConfig, active exposures, etc. |
| file/internal/handler/suite_test.go | Root handler test suite. |
| file/internal/handler/filetype/handler.go | FileType handler (selects active exposure, sets status refs/conditions). |
| file/internal/handler/filetype/handler_test.go | Unit tests for FileType handler behavior. |
| file/internal/handler/filetype/handler_suite_test.go | Ginkgo suite for FileType handler. |
| file/internal/handler/filesubscription/handler.go | FileSubscription handler (approval flow + subscriber SFTP user sync). |
| file/internal/handler/filesubscription/handler_suite_test.go | Ginkgo suite for FileSubscription handler. |
| file/internal/handler/fileexposure/handler.go | FileExposure handler (enforces single active exposure, instance/user provisioning). |
| file/internal/handler/fileexposure/handler_test.go | Unit tests for FileExposure handler behavior. |
| file/internal/handler/fileexposure/handler_suite_test.go | Ginkgo suite for FileExposure handler. |
| file/internal/controller/zoneserviceconfig_controller.go | ZoneServiceConfig controller wiring + watches/owns. |
| file/internal/controller/zoneserviceconfig_controller_test.go | Envtest controller test for ZoneServiceConfig reconciler. |
| file/internal/controller/suite_test.go | Envtest controller suite bootstrap for file controllers. |
| file/internal/controller/schema.go | Scheme registration for dependent APIs. |
| file/internal/controller/filetype_controller.go | FileType controller wiring + watch exposure events. |
| file/internal/controller/filetype_controller_test.go | Envtest controller test for FileType reconciler. |
| file/internal/controller/filesubscription_controller.go | FileSubscription controller wiring + watch filetype events. |
| file/internal/controller/filesubscription_controller_test.go | Envtest controller test for FileSubscription reconciler. |
| file/internal/controller/fileexposure_controller.go | FileExposure controller wiring + watch filetype/zoneserviceconfig events. |
| file/internal/controller/fileexposure_controller_test.go | Envtest controller test for FileExposure reconciler. |
| file/go.sum.license | REUSE/SPDX metadata for module go.sum. |
| file/go.mod | File operator module dependencies and local replaces. |
| file/config/webhook/manifests.yaml | ValidatingWebhookConfiguration manifest. |
| file/config/samples/file_v1_zoneserviceconfig.yaml | Sample ZoneServiceConfig instance. |
| file/config/samples/file_v1_filetype.yaml | Sample FileType instance. |
| file/config/samples/file_v1_filesubscription.yaml | Sample FileSubscription instance. |
| file/config/samples/file_v1_fileexposure.yaml | Sample FileExposure instance. |
| file/config/rbac/service_account.yaml | ServiceAccount for file operator. |
| file/config/rbac/role.yaml | ClusterRole for operator permissions. |
| file/config/rbac/role_binding.yaml | ClusterRoleBinding for operator. |
| file/config/rbac/metrics_reader_role.yaml | Metrics reader ClusterRole. |
| file/config/rbac/metrics_auth_role.yaml | Metrics auth ClusterRole. |
| file/config/rbac/metrics_auth_role_binding.yaml | Metrics auth ClusterRoleBinding. |
| file/config/rbac/leader_election_role.yaml | Leader election Role. |
| file/config/rbac/leader_election_role_binding.yaml | Leader election RoleBinding. |
| file/config/rbac/kustomization.yaml | RBAC kustomize aggregation. |
| file/config/manager/manager.yaml | Controller manager Deployment. |
| file/config/manager/kustomization.yaml | Manager kustomization (image override). |
| file/config/default/namespace_patch.yaml | Namespace patch enabling secret-manager integration label. |
| file/config/default/kustomization.yaml | Default overlay kustomization. |
| file/config/default/deployment_patch.yaml | Deployment patch adding projected secret-manager token + trust bundle mount. |
| file/config/crd/kustomization.yaml | CRD kustomization. |
| file/config/crd/bases/file.cp.ei.telekom.de_zoneserviceconfigs.yaml | ZoneServiceConfig CRD. |
| file/config/crd/bases/file.cp.ei.telekom.de_filetypes.yaml | FileType CRD. |
| file/config/crd/bases/file.cp.ei.telekom.de_filesubscriptions.yaml | FileSubscription CRD. |
| file/config/crd/bases/file.cp.ei.telekom.de_fileexposures.yaml | FileExposure CRD. |
| file/cmd/file-operator/main.go | Operator entrypoint (controllers, indices, metrics, webhook server). |
| file/api/v1/zz_generated.deepcopy.go | Generated deepcopy implementations for file APIs. |
| file/api/v1/zoneserviceconfig_types.go | ZoneServiceConfig API type definitions. |
| file/api/v1/shared_types.go | Shared enums/types (visibility, approval strategy, SSH keys, labels). |
| file/api/v1/groupversion_info.go | API group/version registration. |
| file/api/v1/filetype_types.go | FileType API type definitions. |
| file/api/v1/filesubscription_types.go | FileSubscription API type definitions. |
| file/api/v1/fileexposure_types.go | FileExposure API type definitions. |
| file/api/go.sum.license | REUSE/SPDX metadata for api module go.sum. |
| file/api/go.mod | API submodule dependencies and local replaces. |
| file/.gitignore | Ignores binaries and test artifacts for file module. |
| docs/docs/architecture/file.mdx | Architecture documentation for the new file domain. |
| .goreleaser.yaml | Adds file-operator build to releases. |
| .github/workflows/ci.yaml | Adds reusable CI job for the file module. |
Files not reviewed (1)
- file/api/v1/zz_generated.deepcopy.go: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
lukas016
force-pushed
the
feat-lk-file-domain
branch
from
August 4, 2026 12:12
b4c0207 to
f78b00a
Compare
- implement proper webhook - add support for metrics - unified ssh keys validation with sftp domain
- remove leftoversa - simplified function for getting canonical keys
lukas016
force-pushed
the
feat-lk-file-domain
branch
from
August 6, 2026 13:30
e9edb99 to
972c03f
Compare
lukas016
requested review from
BjoernKarma,
iagarba,
julius-malcovsky and
stefan-ctrl
August 18, 2026 09:06
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces the new file domain to controlplane by adding the v1 API types and generated CRD manifests for FileType, FileExposure, FileSubscription, and ZoneServiceConfig, along with the required kubebuilder registration, typed references, label utilities, and validation/webhook scaffolding needed to manage file-based resources and zone-scoped configuration in the platform. It also includes test coverage for handler and webhook behavior to confirm the expected lifecycle and validation logic.