Open source and extensible Platform as a Service (PaaS).
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
fix(ci): integration test race and bump Go to 1.26.6 (#2900) * scripts: wait for helm releases to be ready before running integration tests * scripts: replace blind sleep with an explicit pod readiness gate * chore(deps): bump Go toolchain to 1.26.6 | 13 天前 | |
Feature/opentelemetry migration (#2791) * Minimize in-source documentation per request: remove specific explanatory comments from observability and net packages * minor changes * refactor: migrate from opentracing to OpenTelemetry in tests and observability * fix: resolve ineffassign issue in storage/mongodb/otel.go * fix: update span status handling for server errors in middleware * remove opentracing dependency from go.mod * Fix lint --------- Co-authored-by: Wilson Júnior <wilsonpjunior@gmail.com> | 7 个月前 | |
fix: team info should not return all app data | 11 天前 | |
Tsuru healthcheck info json (#2893) * feat: app info now returns healthcheck/startupcheck * ref: simplify process merging * feat: use process merging and probe dissasembling * test: regression test on tsuru app info with integration tests * fix: should ignore when wrongly created deployment with liveness probe exists but with no readines probes * test: adjust get raw app info with curl to see healthcheck data | 21 天前 | |
Migrate App to types part 3 (#2701) | 1 年前 | |
auth/oidc: auto-create personal team on user registration (#2895) When auth:oidc:auto-create-personal-team is enabled, a freshly auto-registered user gets a team of their own named after their email local part — normalized to the team name rules by NormalizeTeamName, exported in the auth package next to teamNameRegexp so the rule and its normalizer evolve together, falling back to the full email slug when the name is taken. Combined with a team-create default role, this lets a brand-new user create and deploy apps on their first login without any manual role setup by an admin — useful for self-service/sandbox platforms, since default roles at user-create can only carry global-context roles and therefore cannot grant a team. Best effort: team creation failures are logged and never block login. | 19 天前 | |
Create a standard of streams using streamfmt (#2831) * Create a standard of streams using streamfmt * Set streamfmt of secrets as a Action instead of a Section * move Updating units section to be a top level | 6 个月前 | |
fix(tsurud): return after updating an existing root user When the user already exists, root-user-create printed "Root user successfully updated." and then fell through to the creation code anyway, failing with a duplicate key error (E11000) and exit code 1 even though the update succeeded. Return after the update. Signed-off-by: Guilherme Rezende <guilhermebr@gmail.com> | 30 天前 | |
config: support decode new mongo driver generic types | 2 年前 | |
chore: migrate to KEDA v2.17.3 and fix API compatibility (#2817) * chore: migrate to KEDA v2.17.3 and fix API compatibility - Update github.com/kedacore/keda/v2 from v2.10.1 to v2.17.3 - Replace ScaledObjectAuthRef with AuthenticationRef (KEDA API change) - Update spdy executor to use NewRoundTripperWithConfig (client-go API change) - Preserve custom Dialer configuration (30s timeout, 10s keepalive) - Replace ResourceRequirements with VolumeResourceRequirements for PVC specs (k8s API change) - Update corresponding test files with same API changes * fix: update KEDA API group name in test from 'keda' to 'keda.sh' KEDA v2.17.3 uses 'keda.sh' as the API group name instead of 'keda' * fix: use k8sErrors.IsNotFound instead of checking error message The error message format can vary, so use the proper k8s error check * fix: replace deprecated bson.DefaultRegistry with custom registry * Update github.com/expr-lang/expr to v1.17.7 * fix: update code generation script and enhance deepcopy for PodDisruptionBudgets | 7 个月前 | |
chore: add 1.31 manifest docs (#2887) | 1 个月前 | |
fill managedBy field for all services envs (#2699) | 2 年前 | |
Feat/labels and annotations (#2466) * feat: add metadata type with labels and annotations | 5 年前 | |
chore: remove unnused documentation and conf references (#2811) | 8 个月前 | |
Propagate email of tsuru team token to Services (#2833) * Writing draft * add tests | 6 个月前 | |
all: reformat with goimports as it now force pkg aliases | 7 年前 | |
Drop deprecated package ioutil | 3 年前 | |
chore: migrate to KEDA v2.17.3 and fix API compatibility (#2817) * chore: migrate to KEDA v2.17.3 and fix API compatibility - Update github.com/kedacore/keda/v2 from v2.10.1 to v2.17.3 - Replace ScaledObjectAuthRef with AuthenticationRef (KEDA API change) - Update spdy executor to use NewRoundTripperWithConfig (client-go API change) - Preserve custom Dialer configuration (30s timeout, 10s keepalive) - Replace ResourceRequirements with VolumeResourceRequirements for PVC specs (k8s API change) - Update corresponding test files with same API changes * fix: update KEDA API group name in test from 'keda' to 'keda.sh' KEDA v2.17.3 uses 'keda.sh' as the API group name instead of 'keda' * fix: use k8sErrors.IsNotFound instead of checking error message The error message format can vary, so use the proper k8s error check * fix: replace deprecated bson.DefaultRegistry with custom registry * Update github.com/expr-lang/expr to v1.17.7 * fix: update code generation script and enhance deepcopy for PodDisruptionBudgets | 7 个月前 | |
repository/gandalf: propagate context to new go-gandalfclient library | 5 年前 | |
Tsuru healthcheck info json (#2893) * feat: app info now returns healthcheck/startupcheck * ref: simplify process merging * feat: use process merging and probe dissasembling * test: regression test on tsuru app info with integration tests * fix: should ignore when wrongly created deployment with liveness probe exists but with no readines probes * test: adjust get raw app info with curl to see healthcheck data | 21 天前 | |
fix: vulns GO-2026-4762, GO-2026-4883 e GO-2026-4887 | 4 个月前 | |
Create a standard of streams using streamfmt (#2831) * Create a standard of streams using streamfmt * Set streamfmt of secrets as a Action instead of a Section * move Updating units section to be a top level | 6 个月前 | |
registry: tweaks for image cleanup (#2743) * registry: proper handle GC for realm returned headers and fix image deletion process * registry: return error on empty registry for image remove and fix registryAuth nil headers map * fix lint * registry: fix RemoveAppImages for use servicemanager to discover versions instead lookup on provisioner * gc: fix test TestGCStartAppNotFound * image/gc: using cluster registry instead config set on tests * registry: add tests TestRegistryRemoveAppImagesDetermined and TestRegistryRemoveImageWithAuthToken * registry: add test for expired token * registry: remove unused cluster from dockerRegistry struct // remove goto logic on doRequest method * registry: add missing close request on doRegistry fetchToken logic * registry: refactor on doRequest method * registry: ignore ErrDeleteDisabled for RemoveImage | 1 年前 | |
Migrate MGO to Official Mongo Driver - last part (#2722) * Write apps using new mongo driver * Drop github.com/globalsign/mgo driver * fix lint | 1 年前 | |
chore(deps): upgrade containerd v1 → v2 (#2892) * chore(deps): upgrade containerd v1 → v2 Replaces github.com/containerd/containerd v1.7.33 with github.com/containerd/containerd/v2 v2.3.3. The only change in source code is the import path in registry/registry.go; all consumed symbols (TokenOptions, ParseAuthHeader, FetchToken, etc.) are unchanged between the two major versions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * There no IGNORED_VULNS no more --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> | 22 天前 | |
fix(net): remove inherited deadlines from WithoutCancel (#2871) | 3 个月前 | |
Feature/service fine grained permissions (#2878) * chore: add task detail * feat: dynamic permission registry * feat(role): add dynamic permission support Introduce DynamicSchemeNames on Role and implement dynamic permission management: AddDynamicPermissions, RemoveDynamicPermissions and DynamicPermissionsFor. Persist dynamic schemes using Mongo ($addToSet / $pullAll) and refresh in-memory state after updates. Replace manual context checks with slices.Contains and add tests for dynamic schemes and related helpers. * feat: extend token interface for dynamic permissions * feat: implement method+path matching with virtual std ServeMux * feat: manifest ingestion with fine grained permissions * feat: repopulate service api manifest during startup * feat: proxy manifest to action matching (WIP) * feat: service proxying with new permission validation * feat: role management and service management with dynamic permissions * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix: return error if created permission is empry string * ref: remove manifest fields unnused on permission flow * ref: re-use list permissions route for dynamic permissions as well * test: adjust match on manifest * chore: newer routes should be under 1.31 path version * ref: remove duplicated field operationName * ref: format * test: integratoin 1 * test: integration tests for fine grained service permissions * feat: use old endpoints to add/remove dynamic permissions to roles * test: use tsuru cli for permission handling on integration * test: run all integratoin tests * ref: fix linting errors * chore: add instance proxy to check-handlers * test: fix failing test missing global ctx on action contexts * Simplify token usage removing duplicated code * Simplify token usage removing duplicated code[2] * Simplify dynamic permissions removing in-memory registry Dynamic permission schemes are now pure values derived from the permission name, and the service manifests stored in the database are the single source of truth for which actions exist. This removes the stateful dynamicRegistry, its startup rebuild (RepopulateDynamicPermissions) and all register/unregister/rollback synchronization on manifest ingest. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Drop unused method * chore: remove spec files * Drop unused method[2] * ref: move new typing to types package and adjust usage * ref: extract permission listing into method * ref: lint and fmt * fix: typing issue on func impl * fix: "service-action" should not be a valid dynamic permission name * test: integration with two services and same actions * simplify code * refactor: validate manifest instead of normalizing it Replace normalizeManifest with validateManifest so ingesting a manifest no longer mutates the caller's input. Validation now checks operations in place (method casing, path patterns, duplicate actions/routes) without building a normalized copy. Drop the LegacyEnabledAt field and its timestamp bookkeeping, which was only needed to carry normalization state across updates. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * refactor: make manifest matcher stateless Remove the global manifestMatchStates sync.Map and the per-manifest manifestMatchState cache. compiledMatcher now builds the ServeMux and action lookup fresh on each call, dropping the shared mutable state keyed by manifest pointer. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * refactor: require uppercase manifest method instead of normalizing Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix: address review comments on fine-grained service permissions - manifestGrantConflicts now detects orphaned ancestor-level dynamic grants (e.g. service-action.<svc>.rules or service-action.<svc>) by checking whether each grant still covers any action kept by the next manifest, instead of only exact-matching removed action names - gate integration flow skip logging behind the verbose env setting - add missing "team" requirement to the serviceBind integration flow so it is skipped (not broken) when TSURU_INTEGRATION_TEAM is unset Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat: do not use force to change service manifest orphaned perms * chore: bump vulnerable dependencies --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Wilson Júnior <wilsonpjunior@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Paulo Sousa <paulo.sousa@corp.globo.com> | 1 个月前 | |
Tsuru healthcheck info json (#2893) * feat: app info now returns healthcheck/startupcheck * ref: simplify process merging * feat: use process merging and probe dissasembling * test: regression test on tsuru app info with integration tests * fix: should ignore when wrongly created deployment with liveness probe exists but with no readines probes * test: adjust get raw app info with curl to see healthcheck data | 21 天前 | |
Migrate App to types part 3 (#2701) | 1 年前 | |
chore(deps): upgrade containerd v1 → v2 (#2892) * chore(deps): upgrade containerd v1 → v2 Replaces github.com/containerd/containerd v1.7.33 with github.com/containerd/containerd/v2 v2.3.3. The only change in source code is the import path in registry/registry.go; all consumed symbols (TokenOptions, ParseAuthHeader, FetchToken, etc.) are unchanged between the two major versions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * There no IGNORED_VULNS no more --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> | 22 天前 | |
Create a standard of streams using streamfmt (#2831) * Create a standard of streams using streamfmt * Set streamfmt of secrets as a Action instead of a Section * move Updating units section to be a top level | 6 个月前 | |
kubernetes: Add readiness gates from router to pods | 4 年前 | |
fix(ci): integration test race and bump Go to 1.26.6 (#2900) * scripts: wait for helm releases to be ready before running integration tests * scripts: replace blind sleep with an explicit pod readiness gate * chore(deps): bump Go toolchain to 1.26.6 | 13 天前 | |
Feature/service fine grained permissions (#2878) * chore: add task detail * feat: dynamic permission registry * feat(role): add dynamic permission support Introduce DynamicSchemeNames on Role and implement dynamic permission management: AddDynamicPermissions, RemoveDynamicPermissions and DynamicPermissionsFor. Persist dynamic schemes using Mongo ($addToSet / $pullAll) and refresh in-memory state after updates. Replace manual context checks with slices.Contains and add tests for dynamic schemes and related helpers. * feat: extend token interface for dynamic permissions * feat: implement method+path matching with virtual std ServeMux * feat: manifest ingestion with fine grained permissions * feat: repopulate service api manifest during startup * feat: proxy manifest to action matching (WIP) * feat: service proxying with new permission validation * feat: role management and service management with dynamic permissions * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix: return error if created permission is empry string * ref: remove manifest fields unnused on permission flow * ref: re-use list permissions route for dynamic permissions as well * test: adjust match on manifest * chore: newer routes should be under 1.31 path version * ref: remove duplicated field operationName * ref: format * test: integratoin 1 * test: integration tests for fine grained service permissions * feat: use old endpoints to add/remove dynamic permissions to roles * test: use tsuru cli for permission handling on integration * test: run all integratoin tests * ref: fix linting errors * chore: add instance proxy to check-handlers * test: fix failing test missing global ctx on action contexts * Simplify token usage removing duplicated code * Simplify token usage removing duplicated code[2] * Simplify dynamic permissions removing in-memory registry Dynamic permission schemes are now pure values derived from the permission name, and the service manifests stored in the database are the single source of truth for which actions exist. This removes the stateful dynamicRegistry, its startup rebuild (RepopulateDynamicPermissions) and all register/unregister/rollback synchronization on manifest ingest. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Drop unused method * chore: remove spec files * Drop unused method[2] * ref: move new typing to types package and adjust usage * ref: extract permission listing into method * ref: lint and fmt * fix: typing issue on func impl * fix: "service-action" should not be a valid dynamic permission name * test: integration with two services and same actions * simplify code * refactor: validate manifest instead of normalizing it Replace normalizeManifest with validateManifest so ingesting a manifest no longer mutates the caller's input. Validation now checks operations in place (method casing, path patterns, duplicate actions/routes) without building a normalized copy. Drop the LegacyEnabledAt field and its timestamp bookkeeping, which was only needed to carry normalization state across updates. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * refactor: make manifest matcher stateless Remove the global manifestMatchStates sync.Map and the per-manifest manifestMatchState cache. compiledMatcher now builds the ServeMux and action lookup fresh on each call, dropping the shared mutable state keyed by manifest pointer. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * refactor: require uppercase manifest method instead of normalizing Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix: address review comments on fine-grained service permissions - manifestGrantConflicts now detects orphaned ancestor-level dynamic grants (e.g. service-action.<svc>.rules or service-action.<svc>) by checking whether each grant still covers any action kept by the next manifest, instead of only exact-matching removed action names - gate integration flow skip logging behind the verbose env setting - add missing "team" requirement to the serviceBind integration flow so it is skipped (not broken) when TSURU_INTEGRATION_TEAM is unset Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat: do not use force to change service manifest orphaned perms * chore: bump vulnerable dependencies --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Wilson Júnior <wilsonpjunior@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Paulo Sousa <paulo.sousa@corp.globo.com> | 1 个月前 | |
Drop service-broker (#2808) | 8 个月前 | |
ref: move set package tests to testify (#2847) | 5 个月前 | |
feat(plan): add optional RuntimeClassName field (#2858) | 3 个月前 | |
Add tests for streamfmt | 6 个月前 | |
feat: job with dockerfile (#2729) * feat: job with dockerfile support * test: job with dockerfile support * chore: bump deploy-agent version * fix: lint * test: might need more than one request when auth has nothing cached | 1 年前 | |
test: fix err handler | 5 年前 | |
all: reformat with goimports as it now force pkg aliases | 7 年前 | |
Tsuru healthcheck info json (#2893) * feat: app info now returns healthcheck/startupcheck * ref: simplify process merging * feat: use process merging and probe dissasembling * test: regression test on tsuru app info with integration tests * fix: should ignore when wrongly created deployment with liveness probe exists but with no readines probes * test: adjust get raw app info with curl to see healthcheck data | 21 天前 | |
test: refactor valiation test into testify from check (#2842) | 6 个月前 | |
test: refactor volume test into testify from check (#2840) | 6 个月前 | |
chore(compose): mininal setup to run Tsuru by Docker Compose (#2641) | 2 年前 | |
Test/improve multiversion (#2794) * feat(integration): improve multiversion rollback tests refactor(integration): use helpers for app readiness checks Replace inline JSON parsing and readiness checks in integration tests with helper functions `checkAppReady` and `checkAppExternallyAddressable`. This improves code reuse, readability, and consistency across tests. Also removes unnecessary sleeps and streamlines version/hash verification logic. test: use external service address for local test only test: add more logs for debugging test: use c.Logf instead of println test: use println for debugs feat(integration): improve multiversion rollback tests Refactor multiversion rollback integration tests to use NewCommand instead of os/exec for hash generation. Add debug output for deployment hash. Update deploy flow to include app update before deployment. Change app readiness check to use external addressability in rollback service common test. Update multiversion-python-app fixture to include build hooks for version hash. * test(integration): refine multiversion rollback test logic Comment out unrelated test flows in install_test.go to focus on multiversion rollback scenario. Improve multiversion_rollback_test.go by adding Kubernetes context checks, simplifying app health checks, and replacing static sleep with a retry loop for deployment sync. These changes enhance reliability and diagnostics for multiversion rollback integration tests. * chore: set KUBECONFIG before running tests * test: add multiversion rollback override integration * Update integration/multiversion_rollback_test.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update integration/multiversion_rollback_test.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update integration/install_test.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update integration/multiversion_rollback_override_test.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update integration/multiversion_rollback_override_test.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update integration/multiversion_rollback_test.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update integration/multiversion_rollback_test.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * test: typo on helper function * test: isolate kubeconfig and improve docs Isolate integration test kubeconfig from main development config by creating a dedicated $HOME/.kube/tsuru-integration-config file. Update integration test setup and scripts to use this file, preventing conflicts with local development. Improve README with clear instructions for running integration tests. Enhance shell script formatting and error handling. Add generated version_hash.txt to .gitignore. * test: should use custom INTEGRATION_KUBECONFIG to avoid running tests pointing to default KUBECONFIG * chore: separation between unit and integration tests checkup * test: chheck only rollback override test * test: fix checkKubeconfig * test: setup unit and integration tests with the kubeconfig check * test: fix integration kubectl command * test: run all integration tests * test: check kubectl config before integration test setup * test: app router add/remove should retry commands * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * chore: instead of using kubectl context from user - use kubectl client-go from config reading * test: setup storage before test run * test: import storage on integration suite setup * debug if storage is using correct config * debug error callstack * test: copy config file before running tests * debug config * chore: fix integration conf copy * chore: use /tmp as dir for the tsurud-integration.conf * chore: debug copy config * Revert "chore: debug copy config" This reverts commit 6407d0e423b5fb0e41c0c4608e56c54d849d3150. * Revert "chore: use /tmp as dir for the tsurud-integration.conf" This reverts commit 79f751a48067e21667eabb87918c07b181947e5b. * Revert "chore: fix integration conf copy" This reverts commit 29226e694f8209e289c5cab820b59561b1245076. * Revert "debug config" This reverts commit 5e3c6daa5a618c1797586756716e12254de10b9f. * Revert "test: copy config file before running tests" This reverts commit 6cd2b287d7666c7f9e6d6741ddf00ffa4464c283. * Revert "debug error callstack" This reverts commit d925293b2d0768455b9c8cc24bb1b9d6d78d3b6f. * Revert "debug if storage is using correct config" This reverts commit bec5c8d621e383a22125f8769d56491df2630651. * Revert "test: import storage on integration suite setup" This reverts commit 6f4e053ec404ecbd53e597d12a415a6e69623e79. * Revert "chore: instead of using kubectl context from user - use kubectl client-go from config reading" This reverts commit 28c0d2db13a301260442011fde05b050d1451547. * test: integration test evaluate deployment and pod status * Update integration/multiversion_rollback_test.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * ref: check for ok on retry func for cmd.Retry method --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> | 9 个月前 | |
chore: golang upgrade (#2865) * chore: bump golang version * chore: bump all golang versions * chore: bump alpine version * chore: bump golangci-lint to v2.11.4 * chore: update golangci-lint configuration to v2 compatible * chore: bump golangci-lint action to v8 * chore: bump tsuru-api-docs to v0.0.1 --------- Co-authored-by: ravilock <ravi.me.professional@hotmail.com> | 4 个月前 | |
ci: add yamlfmt | 3 年前 | |
authors, contributors: add Diego Araujo | 10 年前 | |
Fixes after main branch renaming | 5 年前 | |
Update CONTRIBUTORS | 19 天前 | |
fix(ci): integration test race and bump Go to 1.26.6 (#2900) * scripts: wait for helm releases to be ready before running integration tests * scripts: replace blind sleep with an explicit pod readiness gate * chore(deps): bump Go toolchain to 1.26.6 | 13 天前 | |
license: update year in copyright note | 11 年前 | |
chore: golang upgrade (#2865) * chore: bump golang version * chore: bump all golang versions * chore: bump alpine version * chore: bump golangci-lint to v2.11.4 * chore: update golangci-lint configuration to v2 compatible * chore: bump golangci-lint action to v8 * chore: bump tsuru-api-docs to v0.0.1 --------- Co-authored-by: ravilock <ravi.me.professional@hotmail.com> | 4 个月前 | |
Update doc | 7 个月前 | |
Tsuru healthcheck info json (#2893) * feat: app info now returns healthcheck/startupcheck * ref: simplify process merging * feat: use process merging and probe dissasembling * test: regression test on tsuru app info with integration tests * fix: should ignore when wrongly created deployment with liveness probe exists but with no readines probes * test: adjust get raw app info with curl to see healthcheck data | 21 天前 | |
fix(ci): integration test race and bump Go to 1.26.6 (#2900) * scripts: wait for helm releases to be ready before running integration tests * scripts: replace blind sleep with an explicit pod readiness gate * chore(deps): bump Go toolchain to 1.26.6 | 13 天前 | |
chore(deps): upgrade containerd v1 → v2 (#2892) * chore(deps): upgrade containerd v1 → v2 Replaces github.com/containerd/containerd v1.7.33 with github.com/containerd/containerd/v2 v2.3.3. The only change in source code is the import path in registry/registry.go; all consumed symbols (TokenOptions, ParseAuthHeader, FetchToken, etc.) are unchanged between the two major versions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * There no IGNORED_VULNS no more --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> | 22 天前 | |
Add emmanuelferdman@gmail.com to CONTRIBUTORS file | 8 个月前 | |
Cleanup duplicated imports with staticcheck's help | 4 年前 |
tsuru
什么是 tsuru?
tsuru 是一款可扩展的开源平台即服务(PaaS),它能让应用部署变得更快、更简单。 有了 tsuru,您完全无需操心服务器的相关事宜。作为应用开发者,您可以:
- 使用您选择的编程语言编写应用
- 为应用配备各种附加资源,如 SQL 和 NoSQL 数据库,包括 memcached、Redis 等众多类型
- 通过
tsuru命令行工具管理应用
相关链接:
- landing 页:https://tsuru.io
- 完整文档:https://docs.tsuru.io/
- 贡献指南:https://docs.tsuru.io/contributing/docker-compose/
- 代码库与问题跟踪:https://github.com/tsuru/tsuru
- Gitter 交流群:https://gitter.im/tsuru/tsuru
支持的热门平台:
快速开始
获取 tsuru-client
前往以下地址下载适用于您平台的最新版本:https://github.com/tsuru/tsuru-client/releases/
以版本 1.1.1 和 OS X 系统为例:
$ curl -sSL https://github.com/tsuru/tsuru-client/releases/download/1.1.1/tsuru-1.1.1-darwin_amd64.tar.gz | tar xz
安装指南
测试
如果一切顺利,tsuru 已在 Kubernetes 集群中运行。
运行 app list 命令以查看 tsuru 是否正常工作,该命令应返回一个名为 tsuru-dashboard 的应用。
tsuru app list
本地开发
依赖项
开始之前,请确保已安装以下工具:
您还需要 Tsuru 客户端 来与 Tsuru API 交互。如果尚未安装,请先进行安装。
对于 macOS 用户:我们建议在 Minikube 集群中使用带有 socket_vmnet 的 qemu 驱动程序。有关安装 qemu 和 socket_vmnet 的更多信息,请参考以下链接:
注意:如果您使用 Podman 等与 Docker 兼容的替代工具,在运行 make 命令时,请确保通过 DOCKER 变量指定正确的二进制文件。例如:make local.run DOCKER=podman。
运行本地环境
要在本地运行 Tsuru API,您需要先设置本地环境。此设置过程至关重要,因为它会创建默认配置文件、初始化所需的依赖项,并准备好您的本地系统以托管 Tsuru API。以下命令将处理所有这些任务:
make local.setup
设置完成后,除非你想重置环境,否则无需再次运行此命令。
初始设置完成后,你可以使用以下命令启动 Tsuru API 及其依赖项:
make local.run
一旦 Tsuru API 运行起来,请打开一个新的终端窗口,并将你的 Tsuru CLI 配置为指向 local-dev 目标。
此目标指示 CLI 与本地 Tsuru API 实例进行交互,而非远程服务器。
你可以使用以下命令设置目标:
tsuru target-set local-dev
tsuru 的 targets 功能与 Kubernetes 的 kubectl 配置上下文类似,可让您轻松在不同环境之间切换。
要确认所有内容均已正确设置,您可以登录并列出由您的 Tsuru API 实例管理的集群:
tsuru login admin@admin.com # password: admin@123
tsuru cluster list
如果一切按预期运行,你应该会看到本地 Minikube 集群被列为默认的资源调配器。
创建应用或任务
为此,你需要创建一个团队、资源池,并为 Minikube 节点设置标签,以允许在其上进行部署。
tsuru team create my-team
tsuru pool add my-pool
# make sure you are using the right kube config
kubectl label nodes minikube tsuru.io/pool=my-pool
运行集成测试
若要运行集成测试,您必须:
- 确保本地 Tsuru API 实例已启动并正常运行。
- 创建一个 Kubectl 配置文件,该文件绝对不能是
$HOME/.kube/config,且仅指向您的 Minikube 集群。 - 使用以下命令运行集成测试:
INTEGRATION_KUBECONFIG=<your-minikube-kubeconfig> make local.test-ci-integration
清理
当您完成本地环境的操作后,停止服务以释放系统资源非常重要。 您可以使用以下命令停止依赖项:
make local.stop
如果您想完全重置环境,或者不再需要在本地计算机上保留 Tsuru API 及其依赖项,可以使用以下命令删除所有相关资源:
make local.cleanup