Fixes EnsureNamespaceSA getting 403 Forbidden when provisioning fission-fetcher
SA in dynamically registered namespaces. Adds ClusterRole + ClusterRoleBinding
with create/update/patch for serviceaccounts, roles, rolebindings.
Also adds doc/progress.md and doc/thinking/2026-04-26-rbac-fix.md.
Bumps the docker-images group with 1 update in the /cmd/builder directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/fetcher directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/fission-bundle directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/preupgradechecks directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/reporter directory: [chainguard/static](https://github.com/chainguard-images/images).
Updates `chainguard/static` from `d44809c` to `a301031`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `d44809c` to `a301031`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `d44809c` to `a301031`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `d44809c` to `a301031`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `d44809c` to `a301031`
- [Commits](https://github.com/chainguard-images/images/commits)
---
updated-dependencies:
- dependency-name: chainguard/static
dependency-version: latest
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-version: latest
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-version: latest
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-version: latest
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-version: latest
dependency-type: direct:production
dependency-group: docker-images
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the docker-images group with 1 update in the /cmd/builder directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/fetcher directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/fission-bundle directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/preupgradechecks directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/reporter directory: [chainguard/static](https://github.com/chainguard-images/images).
Updates `chainguard/static` from `939a132` to `d4c20db`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `939a132` to `d4c20db`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `939a132` to `d4c20db`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `939a132` to `d4c20db`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `939a132` to `d4c20db`
- [Commits](https://github.com/chainguard-images/images/commits)
---
updated-dependencies:
- dependency-name: chainguard/static
dependency-version: latest
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-version: latest
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-version: latest
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-version: latest
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-version: latest
dependency-type: direct:production
dependency-group: docker-images
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the docker-images group with 1 update in the /cmd/builder directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/fetcher directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/fission-bundle directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/preupgradechecks directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/reporter directory: [chainguard/static](https://github.com/chainguard-images/images).
Updates `chainguard/static` from `b2e1c3d` to `b00a88c`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `b2e1c3d` to `b00a88c`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `b2e1c3d` to `b00a88c`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `b2e1c3d` to `b00a88c`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `b2e1c3d` to `b00a88c`
- [Commits](https://github.com/chainguard-images/images/commits)
---
updated-dependencies:
- dependency-name: chainguard/static
dependency-version: latest
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-version: latest
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-version: latest
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-version: latest
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-version: latest
dependency-type: direct:production
dependency-group: docker-images
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chart>fission-all/values.yaml: Fix typo in imageppullsecrets
Fix a typo in comments.
* Add support to customise storagesvc deployment strategy
Add suport to `values.yaml` to allow customisation of the storagesvc deployment
strategy. The default is a rolling update with `maxSurge` and `maxUnavailable`
of 25%. Users with ReadWriteOnce persistent storage can use the `Recreate`
strategy.
Issue 3195
Bumps the docker-images group with 1 update in the /cmd/builder directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/fetcher directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/fission-bundle directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/preupgradechecks directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/reporter directory: [chainguard/static](https://github.com/chainguard-images/images).
Updates `chainguard/static` from `9276a4e` to `2e3db16`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `9276a4e` to `2e3db16`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `9276a4e` to `2e3db16`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `9276a4e` to `2e3db16`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `9276a4e` to `2e3db16`
- [Commits](https://github.com/chainguard-images/images/commits)
---
updated-dependencies:
- dependency-name: chainguard/static
dependency-version: latest
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-version: latest
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-version: latest
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-version: latest
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-version: latest
dependency-type: direct:production
dependency-group: docker-images
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the docker-images group with 1 update in the /cmd/builder directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/fetcher directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/fission-bundle directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/preupgradechecks directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/reporter directory: [chainguard/static](https://github.com/chainguard-images/images).
Updates `chainguard/static` from `7a6456c` to `9276a4e`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `7a6456c` to `9276a4e`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `7a6456c` to `9276a4e`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `7a6456c` to `9276a4e`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `7a6456c` to `9276a4e`
- [Commits](https://github.com/chainguard-images/images/commits)
---
updated-dependencies:
- dependency-name: chainguard/static
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-type: direct:production
dependency-group: docker-images
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the docker-images group with 1 update in the /cmd/builder directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/fetcher directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/fission-bundle directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/preupgradechecks directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/reporter directory: [chainguard/static](https://github.com/chainguard-images/images).
Updates `chainguard/static` from `5497b01` to `853bfd4`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `5497b01` to `853bfd4`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `5497b01` to `853bfd4`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `5497b01` to `853bfd4`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `5497b01` to `853bfd4`
- [Commits](https://github.com/chainguard-images/images/commits)
---
updated-dependencies:
- dependency-name: chainguard/static
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-type: direct:production
dependency-group: docker-images
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Update Go version to 1.24
* Update golangci-lint version
* Add envtest to tool
* Add dashboard linter as a tool
* Uset t.Cleanup
---------
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
Fixes#3127
Update job names in helm chart templates to avoid conflicts.
* Change the `metadata.name` field in `charts/fission-all/templates/analytics/post-install-job.yaml` to `{{ template "fullname" . }}-{{ .Chart.Version }}-post-install`.
* Change the `metadata.name` field in `charts/fission-all/templates/analytics/post-upgrade-job.yaml` to `{{ template "fullname" . }}-{{ .Chart.Version }}-post-upgrade`.
---
For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/fission/fission/issues/3127?shareId=XXXX-XXXX-XXXX-XXXX).
Bumps the docker-images group with 1 update in the /cmd/builder directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/fetcher directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/fission-bundle directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/preupgradechecks directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/reporter directory: [chainguard/static](https://github.com/chainguard-images/images).
Updates `chainguard/static` from `7e1e8a0` to `5497b01`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `7e1e8a0` to `5497b01`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `7e1e8a0` to `5497b01`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `7e1e8a0` to `5497b01`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `7e1e8a0` to `5497b01`
- [Commits](https://github.com/chainguard-images/images/commits)
---
updated-dependencies:
- dependency-name: chainguard/static
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-type: direct:production
dependency-group: docker-images
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the docker-images group with 1 update in the /cmd/builder directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/fetcher directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/fission-bundle directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/preupgradechecks directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/reporter directory: [chainguard/static](https://github.com/chainguard-images/images).
Updates `chainguard/static` from `f96b5a6` to `7e1e8a0`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `f96b5a6` to `7e1e8a0`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `f96b5a6` to `7e1e8a0`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `f96b5a6` to `7e1e8a0`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `f96b5a6` to `7e1e8a0`
- [Commits](https://github.com/chainguard-images/images/commits)
---
updated-dependencies:
- dependency-name: chainguard/static
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-type: direct:production
dependency-group: docker-images
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the docker-images group with 1 update in the /cmd/builder directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/fetcher directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/fission-bundle directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/preupgradechecks directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/reporter directory: [chainguard/static](https://github.com/chainguard-images/images).
Updates `chainguard/static` from `f5fe67a` to `f96b5a6`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `f5fe67a` to `f96b5a6`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `f5fe67a` to `f96b5a6`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `f5fe67a` to `f96b5a6`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `f5fe67a` to `f96b5a6`
- [Commits](https://github.com/chainguard-images/images/commits)
---
updated-dependencies:
- dependency-name: chainguard/static
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-type: direct:production
dependency-group: docker-images
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the docker-images group with 1 update in the /cmd/builder directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/fetcher directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/fission-bundle directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/preupgradechecks directory: [chainguard/static](https://github.com/chainguard-images/images).
Bumps the docker-images group with 1 update in the /cmd/reporter directory: [chainguard/static](https://github.com/chainguard-images/images).
Updates `chainguard/static` from `5ff428f` to `f5fe67a`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `5ff428f` to `f5fe67a`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `5ff428f` to `f5fe67a`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `5ff428f` to `f5fe67a`
- [Commits](https://github.com/chainguard-images/images/commits)
Updates `chainguard/static` from `5ff428f` to `f5fe67a`
- [Commits](https://github.com/chainguard-images/images/commits)
---
updated-dependencies:
- dependency-name: chainguard/static
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-type: direct:production
dependency-group: docker-images
- dependency-name: chainguard/static
dependency-type: direct:production
dependency-group: docker-images
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Use builder and container names when creating environment K8s object instead of keeping it empty.
Add skeleton for podSpec field to give user an idea of how to use podSpec field.
* Add a positive test for env podSpec
* Add the test to CI tests
* Remove duplicate wait_for_builder function
* Fix CI tests failure
* Fix CI tests failure
* Add a negative test for env podSpec
* Fix issues with negative test
* Removing negative test as it may break executor which will affect other tests
* Rebase with main as executor issue is fixed.
Add the negative test.
* Fix negative test
---------
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
The bug breaks the poolmgr service which stops the deletion and creation of new environments.
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
* Deprecation warning for cross namespace parameters `builderNamespace`, `functionNamespace`
and `disableOwnerReference` flag.
* Do not mention the version
---------
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
* Add DISABLE_OWNER_REFERENCES env variable to executor and buildermgr deployment.
Use this env var to decide adding ownerReferences to K8s resources created by fission CRD.
* Resolve review comments
* Fix lint failure
---------
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
* Fixed: Print pod log error when response status is 404 returned by test function
* Update util.go
---------
Signed-off-by: waitstory <waitstory@163.com>
* Update timetrigger crd and add method and subpath fields in spec.
Update fission-cli to accept user input for method and subpath fields.
Update publisher package to utilize these fields for triggering a function.
Update timer controller to use method and subpath fields for publishing a request.
Add a new test TestPublisherSubpath in pulisher package.
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
* Use kubebuilder default annotation.
Update test for fission-cli timetrigger create, update command to support method and subpath flags.
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
---------
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
* Run logger as root to allow access to log files from host
* Add to connect part of yaml
* Change fission folder to allow non-root to write
into folder instead
* Configure user ID for logger from helm values.yaml
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
---------
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
Co-authored-by: Mark Retallack <mark.retallack@yunextraffic.com>
The time unit of 'function.Spec.FunctionTimeout' is second, but after conversion from the function time.Duration, the unit becomes nanosecond. So it needs to be repaired.
Signed-off-by: waitstory <waitstory@163.com>
* Use in-cluster config if KUBECONFIG env is not set.
Or when kubeconfig file is not found in user's home directory.
* Fixed e2e cli tests failure
* Resolve review comments
* Join kubeconfig not found and failed to load in-cluster config errors
---------
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
* Use typed client for Keda
* Downgraded apimachinery version to v0.30.0 because of compilation error
* Upgrade golanggci-lint version to v1.57.0
* Skip cache for golanggci-lint-action
* grpc.WithBlock is deprecated
---------
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
* Implementing workqueue for MessageQueueTriggers
* Fixing some issues with informers and deleteQueue
* Fixing fission_mqt_created metrics
* Rebase with main
---------
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
* Fix storage leak in builder
```
builder pod keeps old src and deployment packages irrespective of build status.
delete src package after every build request is completed.
delete deployment package after package is uploaded.
```
* Optimized src/deploy cleanup pkg code
* Fix high severity security issue
* Add a test for builder's Clean API
* Resolve review comments
---------
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
* yolo, concurrency and rpp are specifically introduced for executortype poolmgr
```
Show warning if these fields are used with other executortype.
Update CLI with this information.
```
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
* Add warning for fn update too
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
* Show warning while updating `--yolo`, `--con` and `--rpp` to an already created newdeploy function.
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
* Fixed a minor bug
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
* Optmize and increase code readability
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
* Rename function to checkExecutorPoolManager
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
---------
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
* Poolmanager deployment is created based on environment.
Set environment as owner to poolmanager deployment.
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
* Set OwnerReferences to K8s resources created by fission resources.
```
Set OwnerReferences to deployment, service and HPA created by newdeploy function.
Set OwnerReferences to builderManager deployment and service created by environment.
Set OwnerReferences to deployment, service and HPA created by container function.
```
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
* Use ControllerRef
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
---------
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
```
If deployment archive is empty then command will return source archive.
Deployment can be empty if pkg build failed or in running state.
```
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
* Fixed an error when using the command to download src
issue: #2938
Signed-off-by: waitstory <waitstory@163.com>
* Fixed an error when using the command to download src
issue: #2938
Signed-off-by: waitstory <waitstory@163.com>
---------
Signed-off-by: waitstory <waitstory@163.com>
```
Latest goreleaser version v2 has some breaking changes.
Due to this CI tests failed.
Therefore, setting goreleaser version to v1.
```
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
* Router failed to create ingress resource in `fission` namespace
```
fission-router has access to create ingress in default namespace.
fission is creating ingress in namespace where fission is installed.
updated the helm chart to give fission-router access to create ingress in release namespace.
```
* Add a todo comment for modifying router's permissions
---------
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
* CLI command `pkg getsrc` returns deploy archive
```
Fix CLI command to return source archive instead of deploy archive.
If source archive is not available then return deploy archive.
```
* Add e2e tests for `fission package` CLI commands
* Cleanup environments created for pkg test
* Fix unit test failures
---------
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
* Upgrade kind version to v0.23.0
```
Upgraded kind version to github workflow push_pr.yaml
Upgraded kind version to github workflow release.yaml
Upgraded kind version to github workflow upgrade_test.yaml
```
* Minor change to trigger CI
* Upgrade kind node image to v1.25.16
---------
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
* Fix `fission check` command which does not work outside of `fission` namespace
If user provide namespace then use it for running `fission check` command.
If user does not provide namespace then use `fission` as default namespace.
* Update go version to 1.22.2
---------
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
If package has deployment already, we should set package status to none instead of pending.
If we have package has source, we set status to pending.
If both source and deployment are empty, package marked as failure.
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
Making typed common cache so that we don't use wrong types
across set/get methods and more higher-level methods can be
defined for cache.
Currently, we are not able to operate over all keys of the cache
due to generic types.
I also removed code comments around the cache.
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
* Add webhook server to tests
* fix config for webhoook service
* Fix logger in webhook manager
* Use interface for webhook manager
* single reference for router url
* Cleanup token code
---------
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
* used manager's Add function in more places
* exit when ctx.Done is received in archivePruner go routines
* fix manager tests
* fix data race
* added more gpm function in manager and removed manager from a util function
* closed unused channel and stopped ticker after context is done
* added log statements
* used context.Done inside function instead of stopper channel
- added manager to wait for all go routines to end before exit
- code refactor
- renamed Manafer to Interface and GoRoutineManager to GroupManager
- replaced some go routine calls with manager Add func
- added unit tests for manager
* skeleton for envtest fission
* Refactor code and add CLI test
* hack
* Update server test
* remove skip-ci for lint tests
* Pass client go storagesvc
* Add clientGen interface across code
* Fix storagesvc test
* Fix cmd client
* add retry in server test
* Fix concurrenct access to pool deployment
* Remove old executor test
* get rid of ginkgo/gomega
* disable flaky test
* flaky test
* revert ci change
* handle err from ParseBool
---------
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
Co-authored-by: Pranoy Kundu <pranoy1998k@gmail.com>
- Update kubernets version 1.23+
- Update post chart install notes with namespace info
- Update upgrade notes in chart
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
- added retainPods flag to take in the number of specialized pods to retain
- add retainPods in both the create function and update function command
- modify crd keys to be typed instead of string
- keep track of function generation in case of update function operation
- add delete handler function to make sure specialized pods are deleted in case function is deleted
---------
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
Signed-off-by: Pranoy Kundu <pranoy1998k@gmail.com>
Co-authored-by: Pranoy Kundu <pranoy1998k@gmail.com>
the FISSION_..._NAMESPACE environment variables are used by all services during init
to check if the CRDs are loaded.
Move them to the 'fission-resource-namespace' macro to ensure all services know the relavant namespaces.
Signed-off-by: Anthony King <anthony@datapane.com>
* Add fixes for failure in specialization
* reduce specialization in progress and remove expired requests from queue when specialization is timed out
* rename markSpecializationFailure and remove logger from the queue
* refactor clean up code in api.go and add test case for queue
Details:
- Cleanup svc waiting for the counter in the pool manager if specialization fails
- Cleanup active requests counter in pool manager if client exists the demand for function service while we have allocated function service
- Consider specialization timeout if pod ready timeout > specialization timeout in waiting for ready pod. We also consider if the request to choosePod is cancelled.
- We ensure if we have requests waiting for service requests but if there is no pod in the specialization we clean up those.
---------
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
Co-authored-by: Pranoy Kundu <pranoy1998k@gmail.com>
* add functionality to wait for specialization by keeping track of incoming requests
* format executor package
* fix required capacity to specialise new pod condition
* move handling concurrency logic into pool cache from executor
* remove unused methods and structs
* implement queue in to store the svc wait
* create a queue struct and its methods to handle concurrent inputs
* use newly created queue to store waiting for svc requests
* add waiting requests in queue and use them when a svc is ready
* set function to request in queue if the context is still alive
* remove concurrency approach to set svc for waiting requests
* update the active requests whenever requests from pool are assigned a svc
* add doc to define why the conditions exist
* remove unwanted params in strcut and clean up code
* set error while getting svc value if sum of specialization in progress and specialized is only more than concurrency limit
* remove duplicate functions and unnecessary values in struct
* close svc channel on set value and create constants for default concurrency and rpp
* get next value in queue in case context is timed out for fetched value
* remove specializationInProgress counter from pool cache
* return in case the queue is empty wihle setting func to svc
* test getSvcVaue and setSvcValue in poolcache
* add unit tests for GetConcurrent and GetRequestsPerPod methods
* reorder imports
* add fuzzy testing for getSVCValue and setSVCValue in poolcache
* restructure go mod file and update pool cache test cases
* Add tests and bug fixes
* refactor code and add test cases
* add svcWaiting check while setting svc value
---------
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
* use flag FnExecutionTimeout instead of FnTestTimeout
* use flag FnExecutionTimeout instead of FnTestTimeout
* keep FnTestTimeout and FunctionTimeout both
* code review changes
Signed-off-by: Shubham Bansal <shubhambansaliimtgn@gmail.com>
---------
Signed-off-by: Shubham Bansal <shubhambansaliimtgn@gmail.com>
* changes to push images in github container registry
* reverting changes for helm chart to pass CI test
* use gitURL instead of whole URL
* use gitURL instead of whole URL
* added release process for docker.io
* removed trailing spaces
* added support for multi arch images in GHCR
* set authorization header for fission version and check command
* display warning if response status is unauthorize or forbidden
* passing context to http request
* create roles for custom resource in function and builder namespace
* Create roles for CR for builder in function and builder namespace
* convert warn to info to remove error stack trace
Merged pool cache package into fscache to avoid import cycle.
Also changed all types in pool cache from interface to specific
types.
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-01-15 23:50:05 +05:30
554 changed files with 43880 additions and 29698 deletions
org.opencontainers.image.description:"Fetcher is a lightweight component used by environment and builder pods. Fetcher helps in fetch and upload of source/deployment packages and specializing environments."
org.opencontainers.image.description:"fission-bundle is a component which is a single binary for all components. Most server side components running on server side are fission-bundle binary wrapped in container and used with different arguments."
org.opencontainers.image.description:"Preupgradechecks ensures that Fission is ready for the targeted version upgrade by performing checks beforehand."
Fission is a fast serverless framework for Kubernetes with a focus on
developer productivity and high performance.
Fission is an open-source, Kubernetes-native serverless framework that simplifies the deployment of functions and applications on Kubernetes. With Fission, developers can easily create and deploy serverless functions that can be triggered by a variety of events, such as HTTP requests, messages from a message queue, or scheduled tasks.
Fission provides a simple, easy-to-use interface for developers to create serverless functions in their language of choice, without having to worry about the underlying infrastructure. The framework also offers automatic scaling, so functions can scale up or down based on demand, without any additional configuration.
Fission operates on _just the code_: Docker and Kubernetes are
abstracted away under normal operation, though you can use both to
@@ -87,7 +94,7 @@ aggregation — also helps with ops on your Fission deployment.
```bash
# Add the stock NodeJS env to your Fission deployment
@@ -93,6 +93,25 @@ _See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documen
A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an incompatible breaking change needing manual actions.
### Upgrade from 1.18.x to 1.20.x
We have removed controller service from fission-all chart.
### Upgrade from 1.17.x to 1.18.x
With 1.18.x, we have major change in the way we are deploying Fission.
We have added parameters `defaultNamespace`, `additionalFissionNamespaces`, `functionNamespace` and `builderNamespace` to manage the namespaces.
We watch and manage specific namespaces for Fission resources configured via `defaultNamespace` and `additionalFissionNamespaces` parameters.
You dont need to worry about `builderNamespace` and `functionNamespace` parameters, unless you want to consider legacy Fission resources.
Please refer to [core changes](https://fission.io/docs/releases/v1.18.0/#fission-core-changes) for more details.
### Upgrade from 1.16.x to 1.17.x
By default, Fission runs with the default security context. This means that it will be run as root. We have added settings in Helm chart for securityContext across all services in Fission. You can enable recommended securityContext settings during Fission installation.
Please refer to [security context settings](https://fission.io/docs/releases/v1.17.0/#security-context-setting-for-fission-installation) for more details.
### Upgrade from 1.15.x to 1.16.x
If you have been using `prometheus.enabled=true` in your fission-all chart, you will need to deploy the prometheus using prometheus community supported chart.
description:CanaryConfig is for canary deployment of two functions.
properties:
apiVersion:
description:'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description:|-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type:string
kind:
description:'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description:|-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
description:'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description:|-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type:string
kind:
description:'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description:|-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type:string
metadata:
type:object
@@ -47,35 +51,36 @@ spec:
functionweights:
additionalProperties:
type:integer
description:Function Reference by weight. this map contains function
name as key and its weight as the value. This is for canary
upgrade purpose.
description:|-
Function Reference by weight. this map contains function name as key and its weight
as the value. This is for canary upgrade purpose.
nullable:true
type:object
name:
description:Name of the function.
type:string
type:
description:'Type indicates whether this function reference is
by name or selector. For now, the only supported reference type
is by "name". Future reference types: * Function by label or
annotation * Branch or tag of a versioned function * A "rolling
upgrade" from one version of a function to another Available
value: - name - function-weights'
description:|-
Type indicates whether this function reference is by name or selector. For now,
the only supported reference type is by "name". Future reference types:
* Function by label or annotation
* Branch or tag of a versioned function
* A "rolling upgrade" from one version of a function to another
Available value:
- name
- function-weights
type:string
required:
- name
- type
type:object
host:
description:'TODO:remove this field since we have IngressConfig
already Deprecated:the original idea of this field is not for setting
Ingress. Since we have IngressConfig now, remove Host after couple
releases.'
description:|-
Deprecated: the original idea of this field is not for setting Ingress.
Since we have IngressConfig now, remove Host after couple releases.
type:string
ingressconfig:
description:'TODO:make IngressConfig an independent Fission resource
IngressConfig for router to set up Ingress.'
description:IngressConfig for router to set up Ingress.
properties:
annotations:
additionalProperties:
@@ -85,26 +90,32 @@ spec:
nullable:true
type:object
host:
description:Host is for ingress controller to apply rules. If
host is empty or "*", the rule applies to all inbound HTTP traffic.
description:|-
Host is for ingress controller to apply rules. If
host is empty or "*", the rule applies to all
inbound HTTP traffic.
type:string
path:
description:Path is for path matching. The format of path depends
onwhat ingress controller you used.
description:|-
Path is for path matching. The format of path
depends on what ingress controller you used.
type:string
tls:
description:TLS is for user to specify a Secret that contains
TLS key and certificate. The domain name in the key and crt
must match the value of Host field.
description:|-
TLS is for user to specify a Secret that contains
TLS key and certificate. The domain name in the
key and crt must match the value of Host field.
type:string
type:object
keepPrefix:
description:When function is exposed with Prefix based path, keepPrefix
decides whether to keep or trim prefix in URL while invoking function.
description:|-
When function is exposed with Prefix based path,
keepPrefix decides whether to keep or trim prefix in URL while invoking function.
type:boolean
method:
description:Use Methods instead of Method. This field is going to
be deprecated in a future release HTTP method to access a function.
description:|-
Use Methods instead of Method. This field is going to be deprecated in a future release
HTTP method to access a function.
type:string
methods:
description:HTTP methods to access a function
@@ -112,9 +123,11 @@ spec:
type:string
type:array
prefix:
description:'Prefix with which functions are exposed. NOTE:Prefix
takes precedence over URL/RelativeURL. Note that it does not treat
slashes specially ("/foobar/" will be matched by the prefix "/foobar").'
description:|-
Prefix with which functions are exposed.
NOTE: Prefix takes precedence over URL/RelativeURL.
Note that it does not treat slashes specially ("/foobar/" will be matched by
the prefix "/foobar").
type:string
relativeurl:
description:RelativeURL is the exposed URL for external client to
description:'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description:|-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type:string
kind:
description:'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description:|-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type:string
metadata:
type:object
@@ -37,27 +41,31 @@ spec:
description:KubernetesWatchTriggerSpec defines spec of KuberenetesWatchTrigger
properties:
functionref:
description:The reference to a function for kubewatcher to invoke
with when receiving events.
description:|-
The reference to a function for kubewatcher to invoke with
when receiving events.
properties:
functionweights:
additionalProperties:
type:integer
description:Function Reference by weight. this map contains function
name as key and its weight as the value. This is for canary
upgrade purpose.
description:|-
Function Reference by weight. this map contains function name as key and its weight
as the value. This is for canary upgrade purpose.
nullable:true
type:object
name:
description:Name of the function.
type:string
type:
description:'Type indicates whether this function reference is
by name or selector. For now, the only supported reference type
is by "name". Future reference types: * Function by label or
annotation * Branch or tag of a versioned function * A "rolling
upgrade" from one version of a function to another Available
value: - name - function-weights'
description:|-
Type indicates whether this function reference is by name or selector. For now,
the only supported reference type is by "name". Future reference types:
* Function by label or annotation
* Branch or tag of a versioned function
* A "rolling upgrade" from one version of a function to another
description:Package Think of these as function-level images.
properties:
apiVersion:
description:'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description:|-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type:string
kind:
description:'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description:|-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type:string
metadata:
type:object
@@ -47,24 +51,30 @@ spec:
runtime used to run user function.
properties:
checksum:
description:Checksum ensures the integrity of packages referenced
by URL. Ignored for literals.
description:|-
Checksum ensures the integrity of packages
referenced by URL. Ignored for literals.
properties:
sum:
type:string
type:
description:ChecksumType specifies the checksum algorithm,
such as sha256, used for a checksum.
description:|-
ChecksumType specifies the checksum algorithm, such as
sha256, used for a checksum.
type:string
type:object
literal:
description:Literal contents of the package. Can be used for
description:|-
Literal contents of the package. Can be used for
encoding packages below TODO (256 KB?) size.
format:byte
type:string
type:
description:'Type defines how the package is specified:literal
or URL. Available value:- literal - url'
description:|-
Type defines how the package is specified: literal or URL.
Available value:
- literal
- url
type:string
url:
description:URL references a package.
@@ -83,30 +93,36 @@ spec:
- namespace
type:object
source:
description:Source is the archive contains source code and dependencies
file. If the package status is in PENDING state, builder manager
will then notify builder to compile source and save the result as
deployable archive.
description:|-
Source is the archive contains source code and dependencies file.
If the package status is in PENDING state, builder manager will then
notify builder to compile source and save the result as deployable archive.
properties:
checksum:
description:Checksum ensures the integrity of packages referenced
by URL. Ignored for literals.
description:|-
Checksum ensures the integrity of packages
referenced by URL. Ignored for literals.
properties:
sum:
type:string
type:
description:ChecksumType specifies the checksum algorithm,
such as sha256, used for a checksum.
description:|-
ChecksumType specifies the checksum algorithm, such as
sha256, used for a checksum.
type:string
type:object
literal:
description:Literal contents of the package. Can be used for
description:|-
Literal contents of the package. Can be used for
encoding packages below TODO (256 KB?) size.
format:byte
type:string
type:
description:'Type defines how the package is specified:literal
or URL. Available value:- literal - url'
description:|-
Type defines how the package is specified: literal or URL.
Available value:
- literal
- url
type:string
url:
description:URL references a package.
@@ -126,9 +142,10 @@ spec:
description:BuildStatus is the package build status.
type:string
lastUpdateTimestamp:
description:LastUpdateTimestamp will store the timestamp the package
was last updated metav1.Time is a wrapper around time.Time which
supports correct marshaling to YAML and JSON. https://github.com/kubernetes/apimachinery/blob/44bd77c24ef93cd3a5eb6fef64e514025d10d44e/pkg/apis/meta/v1/time.go#L26-L35
description:|-
LastUpdateTimestamp will store the timestamp the package was last updated
metav1.Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON.
description:TimeTrigger invokes functions based on given cron schedule.
properties:
apiVersion:
description:'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description:|-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type:string
kind:
description:'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description:|-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type:string
metadata:
type:object
spec:
description:TimeTriggerSpec invokes the specific function at a time or
description:|-
TimeTriggerSpec invokes the specific function at a time or
times specified by a cron string.
properties:
cron:
@@ -45,26 +50,40 @@ spec:
functionweights:
additionalProperties:
type:integer
description:Function Reference by weight. this map contains function
name as key and its weight as the value. This is for canary
upgrade purpose.
description:|-
Function Reference by weight. this map contains function name as key and its weight
as the value. This is for canary upgrade purpose.
nullable:true
type:object
name:
description:Name of the function.
type:string
type:
description:'Type indicates whether this function reference is
by name or selector. For now, the only supported reference type
is by "name". Future reference types: * Function by label or
annotation * Branch or tag of a versioned function * A "rolling
upgrade" from one version of a function to another Available
value: - name - function-weights'
description:|-
Type indicates whether this function reference is by name or selector. For now,
the only supported reference type is by "name". Future reference types:
* Function by label or annotation
* Branch or tag of a versioned function
* A "rolling upgrade" from one version of a function to another
Available value:
- name
- function-weights
type:string
required:
- name
- type
type:object
method:
default:POST
description:'HTTP Method for trigger, ex :GET, POST, PUT, DELETE,
| `env` | Стенд: `prod`, `dev`, `test` (только для JWT; по умолчанию `test`) |
**Ответ 200:**
```json
{
"ok":true,
"env":"test",
"namespace":"fission-a3f9c1b2d4e6f8a1",
"email":"user@example.com"
}
```
**Ошибки:**
| Код | Причина |
|-----|---------|
| 400 | Тело не JSON или `token` пустой |
| 401 | Токен < 6 символов или JWT не прошёл валидацию в Deck API |
| 405 | GET вместо POST |
> **Namespace детерминирован**: `fission-` + hex(SHA256(sub)[:8]) — одинаковый токен → всегда один namespace.
> Namespace и RBAC создаются автоматически при первом обращении.
---
## Мультитенантность ★ КЛЮЧЕВОЕ ОТЛИЧИЕ
- Каждый пользователь работает в **изолированном K8s namespace**: `fission-<hash(token)>`
- Все операции (создание, список, вызов, удаление) **автоматически ограничены своим namespace**
- Указать namespace вручную **невозможно**
- Функции другого пользователя **не видны и не доступны** — любая операция над чужим объектом возвращает **404** (не 403, чтобы не раскрывать факт существования)
- **Routes изолированы**: функции разных пользователей с одинаковым именем получают разные HTTP-маршруты
### Квоты (применяются автоматически, значения по умолчанию)
# 2026-04-26 - Layer1 multi-tenant NSWatcher: полный разбор до 5/5 PASS
## Цель
Довести `test_layer1.sh` до `PASS=5 FAIL=0` для сценария:
1. создаётся новый namespace
2. namespace получает label `fission.io/managed=true`
3. Fission без рестарта подхватывает namespace
4. в namespace создаются `Environment`, `Function`, `HTTPTrigger`
5. функция успешно вызывается через router
Ключевое требование: всё должно происходить без rolling restart Fission-компонентов.
## Исходный симптом
Первый устойчивый симптом был таким:
-`test_layer1.sh` стабильно доходил до `4/5`
- шаг вызова функции падал
- в user namespace наблюдалось:
-`FailedCreate`
-`serviceaccount "fission-fetcher" not found`
Это означало, что poolmgr deployment для environment уже создаётся, но pod не может стартовать без `fission-fetcher` ServiceAccount.
## Что уже было исправлено до RBAC-этапа
Кодовая часть hot-registration была уже внедрена ранее:
-`pkg/utils/serviceaccount.go`
- добавлена `EnsureNamespaceSA(...)`
-`pkg/executor/multitenant/ns_watcher.go`
- при регистрации нового namespace вызывается `EnsureNamespaceSA(...)`
- образ `naeel/fission-bundle:v1.22.0-multi-ns-8` уже был собран и задеплоен
То есть логика в коде уже существовала; сбой был не в отсутствии вызова, а в невозможности выполнить его успешно в кластере.
## Диагностика 1: executor не может создать ServiceAccount/Role/RoleBinding
Была проведена проверка прав service account `fission-executor`.
Подтверждено:
- код `EnsureNamespaceSA` вызывается
-`ns_watcher` регистрирует namespace
- executor не имеет достаточных RBAC-прав для provisioning ресурсов в новом namespace
Первый явный пробел:
- отсутствовали права на:
-`serviceaccounts`
-`roles`
-`rolebindings`
После начального RBAC fix было видно, что `ServiceAccount/fission-fetcher` уже создаётся, но этого оказалось недостаточно.
## Диагностика 2: initial RBAC fix оказался неполным
После расширения прав на `serviceaccounts/roles/rolebindings` тест перестал падать на отсутствии SA, но при детальной диагностике выяснилось, что `EnsureNamespaceSA` всё ещё не может полностью создать `Role` для fetcher.
Ключевой лог executor:
```text
error while creating role for sa fission-fetcher in namespace diag-ns-82702
... is attempting to grant RBAC permissions not currently held:
- все permission-ы, которые он пытается делегировать через создаваемую `Role`
В нашем случае fetcher получает право:
-`events:create`
По правилам Kubernetes нельзя создать `Role`, выдающую право, которого нет у самого вызывающего субъекта. Поэтому executor должен был сам иметь `events:create`.
### Реальный root cause на этом этапе
`fission-executor` не имел:
-`events.create`
-`localsubjectaccessreviews.create`
Из-за этого:
-`ServiceAccount` создавался
- но `Role` и `RoleBinding` создавались не полностью или не создавались вовсе
- downstream specialization ломалась
## Исправление 1: полный executor RBAC для dynamic SA provisioning
В`deploy/multitenant/rbac.yaml` был добавлен и затем расширен `ClusterRole`:
Нужен не просто список коммитов, а объяснение инженерной логики:
- что именно было не так в коде;
- почему исправление выбрано именно таким;
- почему изменения разбиты на маленькие шаги;
- какие инварианты я старался сохранить;
- что уже исправлено, а что еще нет.
Этот документ описывает серию маленьких безопасных шагов в ветке
`rewrite/layer1-namespace-manager-step1`.
Основной принцип серии:
1. Не делать большой взрывной rewrite.
2. Сначала сузить race-surface и разъединить старую статическую модель от новой динамической.
3. Исправлять реальные дефекты отдельно от mechanical refactor.
4. После каждого шага отдельно проверять соответствующий пакет тестами.
---
## Исходная архитектурная проблема
Переделанный Layer 1 жил в гибридном состоянии.
Старая модель Fission:
- список resource namespaces задается один раз на старте;
- компоненты считают этот список immutable;
- informer factories строятся из startup configuration.
Новая multi-tenant модель:
- namespace появляется позже, уже после старта процесса;
- watcher видит label `fission.io/managed=true`;
- компоненты должны подключить новый namespace на лету.
Из-за этого в коде образовался разрыв между двумя мирами:
1. Часть кода уже работает как dynamic system.
2. Часть кода все еще читает глобальную map namespace-ов напрямую, как будто она immutable.
3. В некоторых компонентах startup-path и dynamic-path оказались несимметричными.
4. В некоторых местах общий global dedup конфликтует с локальной логикой конкретного компонента.
Это и есть корневой дефект всей подсистемы: не один конкретный баг, а отсутствие единого namespace lifecycle contract.
---
## Что было решено не делать сразу
Я сознательно не пошел в большой rewrite в один коммит.
Почему:
1. Слишком много точек входа: executor, router, buildermgr, storagesvc, utils.
2. Если переписать все сразу, невозможно будет локализовать регрессию.
3. Уже были реальные functional дефекты в нескольких местах, их удобнее чинить изолированно.
4. Пользователь отдельно попросил идти последовательно и проверять после каждого изменения.
Поэтому выбран bounded rewrite: сначала вычищать старые опасные предположения, затем исправлять функциональные несовпадения, и только потом идти к более крупному NamespaceManager.
---
## Инварианты серии
Во всех шагах я старался держать одинаковые правила.
### 1. Не ломать действующий onboarding contract
Если namespace приходит через label watcher, компоненты должны продолжать подключать его без рестарта. Нельзя было ради рефактора возвращаться к статической модели.
### 2. Не менять лишние контракты одновременно
Если шаг про snapshot API, он не должен заодно переписывать cleanup semantics.
### 3. Сначала механические и безопасные сдвиги, потом functional fixes
Это нужно, чтобы понимать, баг возник из-за новой логики или уже существовал ранее.
### 4. Каждый шаг должен быть проверяем локально
После каждого шага запускались тесты по затронутому пакету, а не абстрактное «кажется, всё нормально».
---
## Step 1 — Snapshot API для namespace resolver
Коммит: `c987fa0`
### Что было не так
`NamespaceResolver` уже имел mutex для записи через `AddNamespace`, но многие потребители читали `FissionResourceNS` напрямую.
Это означало следующее:
1. Запись в map уже динамическая.
2. Чтение в части мест по-прежнему не thread-safe.
3. Код внешне выглядел как безопасный, потому что mutex в структуре есть, но контракт чтения не был централизован.
То есть защита существовала только наполовину.
### Что я сделал
В`pkg/utils/namespace.go` добавлены:
-`Snapshot()`
-`SnapshotWithOptions()`
Их логика:
1. Под read lock взять текущее состояние.
2. Скопировать его в detached slice.
3. Отсортировать, чтобы получить стабильный детерминированный порядок.
Почему именно slice snapshot, а не снова map:
1. Читателям в основном нужен именно проход по namespace-ам.
2. Slice удобнее для безопасной итерации.
3. Сортировка убирает дрожание порядка и делает поведение более предсказуемым в тестах и логике startup factory generation.
### Почему это был правильный первый шаг
Этот шаг почти не меняет бизнес-логику. Он не трогает watchers, RBAC, cleanup, lifecycle events. Он вводит базовый безопасный API, на который потом можно переводить потребителей.
### Что было переведено сразу
Чтобы snapshot API не оставался мертвым кодом, на него были переведены:
-`pkg/utils/informer.go`
- startup factory creation в `pkg/executor/executor.go`
Логика этого выбора:
1. Это общие helper path.
2. Они касаются большого числа компонентов.
3. Но при этом change поверхностный: вместо прямой итерации по map берется snapshot.
### Отдельный мелкий дефект, найденный на шаге 1
Новые тесты создали локальный `NamespaceResolver` без logger. Выяснилось, что часть методов предполагает ненулевой logger. Это нехорошо само по себе: utility object не должен падать только потому, что его используют вне global singleton.
Поэтому были добавлены nil checks вокруг debug/info логов в resolver.
### Проверка шага
Проверялось:
-`go test ./pkg/utils/...`
-`go test ./pkg/executor/...`
Смысл проверки:
1. Убедиться, что snapshot API корректен как utility layer.
2. Убедиться, что startup path executor не поменял поведение.
---
## Step 2 — Исправление namespace routing в serviceaccount checker
Коммит: `9ce9829`
### Что было не так
В`pkg/utils/serviceaccount.go` был более тонкий дефект, чем просто прямое чтение map.
В`runSACheck()` одна и та же переменная `ns` переиспользовалась внутри цикла по permission groups.
Смысл проблемы:
1. Есть исходный base namespace.
2. Для fetcher нужен путь через `GetFunctionNS(baseNS)`.
3. Для builder нужен путь через `GetBuilderNS(baseNS)`.
4. Но код мутировал саму переменную `ns` по мере обхода permission sets.
Это опасно, потому что builder resolution начинает зависеть от предыдущего шага цикла, а не от исходного namespace.
Если `FunctionNamespace` и `BuilderNamespace` различаются, route builder SA может поехать.
### Что я сделал
Изменение было разбито на две части:
1. Итерироваться не по `FissionResourceNS` напрямую, а по `Snapshot()`.
2. Явно вычислять `targetNS` из `baseNS` через отдельный метод `resolveSANamespace(baseNS, saName)`.
Почему выделен отдельный метод:
1. Логика namespace routing становится читаемой как отдельный контракт.
2. Её можно тестировать отдельно.
3. В коде исчезает скрытая мутация переменной цикла.
### Почему я не переписывал весь serviceaccount.go сразу
В файле еще остаются спорные места:
- глобальные `fetcherCheck` / `builderCheck`;
- мутация `permission.exists`;
- runtime provisioning через `LocalSubjectAccessReview`.
Но если решать всё сразу, шаг становится слишком широким. На этом этапе была цель исправить именно namespace routing bug и убрать прямую итерацию по общей map.
### Какой тест был добавлен
Добавлен unit test на `resolveSANamespace()`:
- fetcher на default namespace должен идти в function namespace;
- builder на default namespace должен идти в builder namespace;
- tenant namespace должен сохраняться как tenant namespace.
Тест важен не из-за синтаксиса, а потому что он фиксирует смысловую развязку между двумя namespace path.
### Проверка шага
Проверялось:
-`go test ./pkg/utils/...`
-`go test ./pkg/executor/...`
---
## Step 3 — Перевод runtime loops на snapshot API
Коммит: `6102b27`
### Что было не так
Даже после появления snapshot API ещё оставались runtime loops, которые напрямую читали общую map namespace-ов в горячих путях:
- adopt existing resources;
- idle object reaper;
- orphan archive pruning.
Это плохо не только из-за race. Это также концептуально закрепляет старую модель «список namespace-ов — это просто глобальная map, в которую можно смотреть отовсюду».
Это очень плохое свойство для Layer 1, потому что поведение перестаёт зависеть только от данных и начинает зависеть от истории запуска процесса.
### Что я сделал
В`newdeploy.AddNamespace()` добавил регистрацию `EnvEventHandlers()` рядом с`FunctionEventHandlers()`.
### Почему fix именно такой
Потому что это минимальное исправление семантической несимметрии.
Я не придумывал новую абстракцию, а привёл dynamic path к уже существующему startup contract.
### Инженерный смысл шага
Это важный принцип всей серии: если startup-path и late onboarding-path делают похожую работу, они должны проходить через один и тот же контракт, а не через два слегка разных набора side effects.
### Проверка шага
Проверялось:
-`go test ./pkg/executor/executortype/newdeploy`
---
## Step 6 — Защита router informer maps от гонок
Коммит: `87477d4`
### Что было не так
В router динамический namespace добавляет новые informer-ы в две map:
-`triggerInformer`
-`funcInformer`
Параллельно `updateRouter()` итерируется по тем же map, собирая триггеры и функции для rebuild router-а.
Плюс `functionReferenceResolver` получает `funcInformer` и тоже читает его напрямую.
Это создаёт классическую проблему:
1. одна goroutine пишет в map;
2. другая одновременно по ней итерируется;
3. третья читает её через resolver.
Результат может быть от паники `concurrent map iteration and map write` до тихого чтения неполного состояния.
### Почему шаг стал чуть шире
Простой mutex только вокруг `HTTPTriggerSet.AddNamespace()` не решал бы проблему полностью, потому что `functionReferenceResolver` держал свою ссылку на ту же mutable структуру.
Поэтому понадобилось сделать две вещи одновременно:
1. Защитить maps в `HTTPTriggerSet` через `RWMutex` и snapshot helpers.
2. Дать `functionReferenceResolver` собственный thread-safe путь доступа к informer registry.
### Что я сделал
В`HTTPTriggerSet`:
- добавлен `RWMutex`;
- добавлены `snapshotTriggerInformers()`;
- добавлены `snapshotFuncInformers()`;
-`updateRouter()` и setup handlers теперь работают по snapshot-спискам.
В`functionReferenceResolver`:
- добавлен `RWMutex`;
- чтение informer-а по namespace теперь под read lock;
- добавлен `addInformer()` для безопасного добавления нового namespace.
В`router.AddNamespace()`:
- запись в `triggerInformer` и `funcInformer` идёт под lock;
- resolver получает новый informer через собственный безопасный метод.
### Почему именно snapshot-helpers, а не держать lock во время всей итерации
Потому что rebuild router-а и чтение store-ов могут быть относительно дорогими. Держать глобальный lock на всё это время было бы лишним. Нам нужен был не coarse lock на длинный процесс, а короткий lock на получение стабильного снимка ссылок на informer-ы.
То есть стратегия такая:
1. Быстро снять snapshot ссылок.
2. Отпустить lock.
3. Работать со snapshot уже без блокировки записи.
Это лучше и по безопасности, и по latency.
### Проверка шага
Проверялось:
-`go test ./pkg/router/...`
---
## Почему шаги документировались отдельно
Я сохранял отдельный thinking-файл на каждый шаг не ради бюрократии, а ради трассируемости.
Когда изменения маленькие, отдельные документы позволяют понять:
1. какой дефект исправлял именно этот коммит;
2. что было осознанно оставлено за рамками;
3. какой тест подтверждал именно этот шаг;
4. где functional fix, а где только mechanical safety refactor.
Именно это позволяет потом анализировать regressions не по памяти, а по истории.
---
## Что осталось нерешённым после step 6
Несмотря на шесть шагов, это ещё не финальный NamespaceManager rewrite.
Остаются важные вопросы.
### 1. Нет remove/cleanup semantics
Система умеет add, но почти не умеет delete/relabel cleanup.
Что это значит practically:
- informer-ы и локальные registry entries живут вечно;
- once onboarded, always onboarded;
- короткоживущие tenant namespace-ы будут оставлять мусор.
### 2. `serviceaccount.go` всё ещё не идеален
Текущий `serviceaccount.go` уже лучше, чем до step 2, но файл всё ещё сложный:
- глобальные `fetcherCheck` / `builderCheck` живут как process-wide mutable objects;
-`permission.exists` мутируется в runtime;
- provisioning и permission-check тесно сцеплены.
Это отдельный кандидат на следующий bounded refactor, но уже не маленький mechanical шаг.
### 3. Глобальный resolver всё ещё остаётся transitional abstraction
`NamespaceResolver` теперь безопаснее для чтения, но это пока ещё не полноценный NamespaceManager с событиями, remove lifecycle и подписками.
Он всё ещё ближе к thread-safe registry, чем к полной orchestration layer.
### 4. Cleanup/restart/backfill lifecycle ещё не централизован
Часть компонентов уже ближе к единообразию, но по-прежнему нет одного центрального orchestration contract вида:
- add existing namespaces on startup;
- reconcile on relabel;
- remove on delete;
- rebuild after restart;
- re-register late component safely.
---
## Почему я не стал сразу делать remove/cleanup
Потому что это уже следующая категория сложности.
До step 6 изменения укладывались в схему:
- локальный и понятный дефект;
- ограниченный blast radius;
- тестируемый пакет;
- отдельный маленький commit.
Remove/cleanup меняет уже жизненный цикл системы и затрагивает много мест одновременно:
- watcher behavior;
- manager lifecycle;
- informer shutdown semantics;
- cache invalidation;
- resolver state.
Это не тот шаг, который разумно смешивать с небольшими safety fixes.
---
## Почему такая стратегия лучше, чем «переписать всё сразу»
Потому что сейчас уже есть видимый результат с низким риском:
1. Уменьшено число прямых доступов к общей mutable map.
2. Исправлен реальный functional bug в buildermgr.
3. Исправлена реальная логическая ошибка в serviceaccount namespace routing.
4. Исправлена несимметрия в newdeploy dynamic path.
5. Закрыта явная router race-surface.
И всё это не одним большим коммитом, а серией шагов с локальной верификацией.
Для инфраструктурного кода это важнее, чем «красивый большой rewrite», который сложно раскладывать при регрессиях.
---
## Какие проверки были прогнаны по ходу серии
После шагов запускались:
-`go test ./pkg/utils/...`
-`go test ./pkg/executor/...`
-`go test ./pkg/storagesvc/...`
-`go test ./pkg/buildermgr/...`
-`go test ./pkg/router/...`
Логика была такая:
1. Не гонять каждый раз всю репу, если шаг локальный.
2. Но обязательно проверять затронутый пакет и соседний пакет, если change касается shared utility layer.
---
## Текущее состояние после серии
Серия шагов 1-6 не завершает rewrite, но заметно улучшает базу для следующего этапа.
Что теперь стало лучше:
1. Namespace reads стали заметно более дисциплинированными.
2. Dynamic namespace onboarding стал логически ровнее между компонентами.
3. В router исчезла наиболее явная race-surface на informer maps.
4. Buildermgr больше не теряет часть подписок на новый namespace из-за неправильного dedup.
Что остаётся следующим осмысленным этапом:
1. Вынесение уже полноценного NamespaceManager как orchestration layer.
2. Remove/cleanup lifecycle.
3. Разделение discovery, registry и provisioning.
4. Дополнительные тесты на restart/relabel/delete/burst onboarding.
---
## Отдельная заметка про `serviceaccount.go`
На момент написания этого документа файл `pkg/utils/serviceaccount.go` был заново перечитан по текущему содержимому. Документ описывает актуальную логику файла в его текущем состоянии, а не только то состояние, которое было в момент коммита step 2.
Это важно, потому что именно в этом файле пользовательский контекст отдельно предупредил о возможных дополнительных изменениях между сообщениями.
Подготовить lifecycle subscriber contract для будущего reconcile path.
## Что меняем
1. Расширяем `NamespaceSubscriber` методами:
-`OnNamespaceAdd()`
-`OnNamespaceRemove()`
-`OnNamespaceResync()`
2. Обновляем тестовую заглушку subscriber-а.
## Что НЕ меняем
- не вызываем subscriber-ов из manager;
- не подключаем contract к runtime components.
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.