{"id":21007903,"url":"https://github.com/lflxp/lflxp-k8s","last_synced_at":"2026-02-13T22:03:42.113Z","repository":{"id":220127312,"uuid":"585907449","full_name":"lflxp/lflxp-k8s","owner":"lflxp","description":"Lightweight k8s operation and maintenance management platform","archived":false,"fork":false,"pushed_at":"2025-03-07T14:46:34.000Z","size":17175,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-07T15:35:50.375Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lflxp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-06T12:12:12.000Z","updated_at":"2025-03-07T14:46:40.000Z","dependencies_parsed_at":"2024-11-19T09:20:47.567Z","dependency_job_id":null,"html_url":"https://github.com/lflxp/lflxp-k8s","commit_stats":null,"previous_names":["lflxp/lflxp-k8s"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lflxp%2Flflxp-k8s","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lflxp%2Flflxp-k8s/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lflxp%2Flflxp-k8s/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lflxp%2Flflxp-k8s/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lflxp","download_url":"https://codeload.github.com/lflxp/lflxp-k8s/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243428436,"owners_count":20289317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T09:10:30.401Z","updated_at":"2026-02-13T22:03:42.101Z","avatar_url":"https://github.com/lflxp.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 介绍\n\n快速开发项目的脚手架，基于golang gin + vue d2-admin + tauri组成,可以实现快速的B/S or C/S架构\n\n# TODO\n\n1. 切换git提交的username和email\n2. 切换项目名称，叫脚手架比较好听\n3. 修改go mod名称和代码import名\n4. 统一后端接口路径以/api开头，/admin忽略\n5. 应用商店：初始化、接口联调CRUD、UI界面\n   1. 部署应用通过helm chart进行和管理\n   2. 应用商店的应用可以通过helm chart进行部署\n   3. 考虑接入argoCD\n6. k8s pod container详情页面\n  * containers\n  * conditions\n  * recent Events\n  * Related Resources\n  * deployment -\u003e pods\n  * cronJob -\u003e pods\n  * job -\u003e pods\n  * sts -\u003e pods\n  * ds -\u003e pods\n7.  监控\n  * prometheus\n  * grafana\n  * metrics-server\n  * grafana-template\n  * job安装prometheus+grafana+servicemonitor+metric-server\n8.  node节点 cordon 污点等功能\n9.  将detail内的标签和annotations放到下面table里面提供CRUD\n10. 完善租户、项目、环境、用户、角色、角色绑定（独立与k8s的saas化应用去管理k8s,方便后期扩容，升级为业务系统或者中台）\n    1.  单机版不考虑oauth\n    2.  不用下层数据库，直接用sqlite\n    3.  用jwt做认证\n    4.  用rbac做权限\n    5.  项目-〉项目子集-〉命名空间\n11. alive ui界面和配置查看修改界面\n    1.  主机资源监控\n    2.  主机命令执行\n    3.  程序运行监控\n12. 支持桌面app\n    1. gowails\n    2. shadcn\n13. terminal终端\n    1. 使用useContext管理终端状态\n    2. 支持k8s容器\n    3. 支持ssh连接\n14. 商城\n    1.  应用商店\n    2.  helm chart应用商店\n    3.  helm chart应用商店的应用可以通过helm chart进行部署\n    4.  应用商店的应用可以通过helm chart进行部署\n    5.  helm\n        * macos -\u003e $HOME/Library/Caches/helm/repository\n        * linux -\u003e $HOME/.cache/helm/repository\n        * secret sh.helm.release.v1.demo.v1 -\u003e echo 1|base64 -d|base64 -d|gunzip\n15. 多集群管理\n\n\n# 功能列表\n\n* JWT\n* 登陆页面\n* Django Admin后台\n* tauri app\n* Dockerfile\n* 一个二进制文件启动\n\n# 安装前准备\n\n* npm \n* swag\n* [showme](https://github.com/lflxp/showme)\n* [fhst](https://gitee.com/lflxp/fhst)\n\n# 桌面app tauri\n\n## 调试tauri\n\n\u003e cargo tauri dev\n\nor \n\n\u003e make tauridev\n\n## 打包\n\n### wails\n\nwails go 一体化部署\n\n### tarui\n\n`有BUG`：无法访问axum服务，是直接访问的tauri://localhost/admin/userinfo的接口\n\n\u003e cargo tarui build\n\nor \n\n\u003e make tauribuild\n\n## 快速打包 ko\n\n前提：配置好~/.docker/config认证文件\n\n- export KO_DOCKER_REPO=harbor.ks.x/eclipse-che ko build\n\n## 快速编译 goreleaser\n\n- go install github.com/goreleaser/goreleaser@latest\n- goreleaser init\n- goreleaser release --snapshot --rm-dist\n\n## 参考\n\n- https://goreleaser.com/install/\n\n# 前端框架\n\n- elementUI\n- D2-admin\n\n# Golang后端\n\n## helm api\n\n\u003e https://helm.sh/zh/docs/topics/advanced/\n\n\u003e https://pkg.go.dev/helm.sh/helm/v3 \n\n\u003e kubectl get secret --all-namespaces -l \"owner=helm\"\n\n\u003e https://fluxcd.io/flux/installation/\n\n\u003e https://kubevela.stoplight.io/docs/kubevela/b908ff637ac96-prepare-the-user-s-cloud-shell-environment\n\n\u003e https://kubevela.net/zh/docs/platform-engineers/openapi/overview\n\n## 可以将helm二进制文件打包进embed或者将二进制文件上传到gitee或者github\n\n## 自动化安装kubevela\n\n## 安装\n\n`make`\n\n```bash\n➜  demo git:(master) ✗ make\nrm -rf asset/dashboard\ncd frontend \u0026\u0026 npm install \u0026\u0026 npm run build:prod \u0026\u0026 mv dist ../asset/dashboard\n\nup to date in 1s\n\n112 packages are looking for funding\n  run `npm fund` for details\n\n\u003e vue-admin-template@4.4.0 build:prod\n\u003e vue-cli-service build\n\n\n⠼  Building for production...\n\n WARNING  Compiled with 2 warnings                                                                                                                                      11:25:54\n\n warning  \n\nasset size limit: The following asset(s) exceed the recommended size limit (244 KiB).\nThis can impact web performance.\nAssets: \n  static/js/chunk-elementUI.6f38d267.js (654 KiB)\n  static/js/chunk-libs.de09490f.js (313 KiB)\n\n warning  \n\nentrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.\nEntrypoints:\n  app (1.23 MiB)\n      static/css/chunk-elementUI.68c70ad5.css\n      static/js/chunk-elementUI.6f38d267.js\n      static/css/chunk-libs.3dfb7769.css\n      static/js/chunk-libs.de09490f.js\n      static/css/app.b7cb370e.css\n      static/js/app.cd60c8ed.js\n\n\n  File                                      Size             Gzipped\n\n  dist/static/js/chunk-elementUI.6f38d26    654.28 KiB       160.37 KiB\n  7.js\n  dist/static/js/chunk-libs.de09490f.js     313.25 KiB       109.68 KiB\n  dist/static/js/app.cd60c8ed.js            56.04 KiB        16.85 KiB\n  dist/static/js/chunk-06801562.02b4eb3d    3.08 KiB         1.25 KiB\n  .js\n  dist/static/js/chunk-9ea35268.2d9add8d    2.97 KiB         0.97 KiB\n  .js\n  dist/static/js/chunk-2d0e4b0c.18f2d803    2.06 KiB         0.84 KiB\n  .js\n  dist/static/js/chunk-94d3c3c4.10d1f40a    1.74 KiB         0.73 KiB\n  .js\n  dist/static/js/chunk-6db766a0.a9b17b0f    1.58 KiB         0.72 KiB\n  .js\n  dist/static/js/chunk-2d0d0f79.e0fc0e48    1.19 KiB         0.61 KiB\n  .js\n  dist/static/js/chunk-2d0c8bf7.104337da    0.41 KiB         0.31 KiB\n  .js\n  dist/static/js/chunk-2d0e4e1f.d1fe687e    0.41 KiB         0.31 KiB\n  .js\n  dist/static/js/chunk-2d226cab.3aff06e4    0.39 KiB         0.29 KiB\n  .js\n  dist/static/js/chunk-2d229205.daeadf1b    0.37 KiB         0.29 KiB\n  .js\n  dist/static/js/chunk-2d0cfaef.ff491ee6    0.35 KiB         0.27 KiB\n  .js\n  dist/static/js/chunk-2d0e944c.31030ddb    0.35 KiB         0.28 KiB\n  .js\n  dist/static/js/chunk-2d2104c6.19c27445    0.35 KiB         0.27 KiB\n  .js\n  dist/static/css/chunk-elementUI.68c70a    227.82 KiB       34.55 KiB\n  d5.css\n  dist/static/css/app.b7cb370e.css          9.62 KiB         2.36 KiB\n  dist/static/css/chunk-94d3c3c4.3c7f5ad    4.64 KiB         0.83 KiB\n  9.css\n  dist/static/css/chunk-libs.3dfb7769.cs    3.48 KiB         1.25 KiB\n  s\n  dist/static/css/chunk-06801562.ba95b87    1.59 KiB         0.62 KiB\n  6.css\n  dist/static/css/chunk-6db766a0.563b0ff    0.11 KiB         0.10 KiB\n  7.css\n  dist/static/css/chunk-9ea35268.5cd9884    0.04 KiB         0.06 KiB\n  a.css\n\n  Images and other types of assets omitted.\n\n DONE  Build complete. The dist directory is ready to be deployed.\n INFO  Check out deployment instructions at https://cli.vuejs.org/guide/deployment.html\n\ngo mod tidy\ngo get golang.org/x/tools/cmd/stringer\ngo generate\n...\nwatching utils\nbuilding...\nrunning...\n2022-10-19 11:26:53.373124 [1] [DEBUG] [root] framework.go:37 初始化jwtIdentityKey \n[xorm] [info]  2022/10/19 11:26:53.374927 [SQL] SELECT name FROM sqlite_master WHERE type='table' [] - 1.380917ms\n[xorm] [info]  2022/10/19 11:26:53.375037 [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [vpn] - 10.541µs\n[xorm] [info]  2022/10/19 11:26:53.375112 [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [vpn] - 7.167µs\n[xorm] [info]  2022/10/19 11:26:53.375148 [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [machine] - 6.292µs\n[xorm] [info]  2022/10/19 11:26:53.375193 [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [machine] - 4.709µs\n[xorm] [info]  2022/10/19 11:26:53.375228 [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [cdn] - 4.542µs\n[xorm] [info]  2022/10/19 11:26:53.375272 [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [cdn] - 4.541µs\n[xorm] [info]  2022/10/19 11:26:53.375311 [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [more] - 4.333µs\n[xorm] [info]  2022/10/19 11:26:53.375340 [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [more] - 4.208µs\n[xorm] [info]  2022/10/19 11:26:53.375369 [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [user] - 4µs\n[xorm] [info]  2022/10/19 11:26:53.375409 [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [user] - 4.166µs\n[xorm] [info]  2022/10/19 11:26:53.375433 [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [claims] - 4µs\n[xorm] [info]  2022/10/19 11:26:53.375461 [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [claims] - 3.875µs\n[xorm] [info]  2022/10/19 11:26:53.375484 [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [groups] - 3.875µs\n[xorm] [info]  2022/10/19 11:26:53.375514 [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [groups] - 3.791µs\n[xorm] [info]  2022/10/19 11:26:53.375532 [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [userauth] - 4.583µs\n[xorm] [info]  2022/10/19 11:26:53.375555 [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [userauth] - 3.917µs\n[xorm] [info]  2022/10/19 11:26:53.375577 [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [history] - 3.875µs\n[xorm] [info]  2022/10/19 11:26:53.375606 [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [history] - 4.292µs\n2022-10-19 11:26:53.375656 [1] [DEBUG] [root] modelRegistry.go:120 完成模型注册\n[xorm] [info]  2022/10/19 11:26:53.375787 [SQL] SELECT `id`, `username`, `password`, `name`, `firstname`, `email`, `isvaild`, `status`, `isadmin`, `claims_id`, `token` FROM `user` WHERE `username`=? LIMIT 1 [admin] - 28.834µs\n2022-10-19 11:26:53.376319 [1] [ERROR] [root] admin.go:20 json: cannot unmarshal number into Go value of type []admin.Claims\n[xorm] [info]  2022/10/19 11:26:53.376392 [SQL] SELECT name FROM sqlite_master WHERE type='table' [] - 25.5µs\n[xorm] [info]  2022/10/19 11:26:53.376455 [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [demotest] - 9µs\n[xorm] [info]  2022/10/19 11:26:53.376619 [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [demotest] - 13.208µs\n2022-10-19 11:26:53.37664  [1] [DEBUG] [root] modelRegistry.go:120 完成模型注册\n2022-10-19 11:26:53.376647 [1] [DEBUG] [root] test.go:15 注册Demo test\nUsing config file: /opt/gopath/src/gitee.com/lflxp/demo/demo.yaml\n[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.\n\n[GIN-debug] [WARNING] Running in \"debug\" mode. Switch to \"release\" mode in production.\n - using env:   export GIN_MODE=release\n - using code:  gin.SetMode(gin.ReleaseMode)\n\n2022-10-19 11:26:53.385402 [1] [INFO ] [root] router.go:18 注册Gin路由\n[GIN-debug] GET    /metrics                  --\u003e demo/core/middlewares.PromHandler.func1 (5 handlers)\n[GIN-debug] GET    /                         --\u003e demo/core/router.PreGinServe.func1 (6 handlers)\n[GIN-debug] GET    /health                   --\u003e demo/core/middlewares.RegisterHealthMiddleware (6 handlers)\n[GIN-debug] GET    /swagger/*any             --\u003e github.com/swaggo/gin-swagger.CustomWrapHandler.func1 (6 handlers)\n[GIN-debug] POST   /admin/auth/login         --\u003e demo/pkg/auth.loginlocal (6 handlers)\n[GIN-debug] POST   /admin/auth/logout        --\u003e demo/pkg/auth.logout (6 handlers)\n[GIN-debug] GET    /dashboard/*any           --\u003e demo/asset.RegisterAsset.func1 (6 handlers)\n[GIN-debug] POST   /dashboard/*any           --\u003e demo/asset.RegisterAsset.func1 (6 handlers)\n[GIN-debug] PUT    /dashboard/*any           --\u003e demo/asset.RegisterAsset.func1 (6 handlers)\n[GIN-debug] PATCH  /dashboard/*any           --\u003e demo/asset.RegisterAsset.func1 (6 handlers)\n[GIN-debug] HEAD   /dashboard/*any           --\u003e demo/asset.RegisterAsset.func1 (6 handlers)\n[GIN-debug] OPTIONS /dashboard/*any           --\u003e demo/asset.RegisterAsset.func1 (6 handlers)\n[GIN-debug] DELETE /dashboard/*any           --\u003e demo/asset.RegisterAsset.func1 (6 handlers)\n[GIN-debug] CONNECT /dashboard/*any           --\u003e demo/asset.RegisterAsset.func1 (6 handlers)\n[GIN-debug] TRACE  /dashboard/*any           --\u003e demo/asset.RegisterAsset.func1 (6 handlers)\n[GIN-debug] GET    /script/*any              --\u003e demo/asset.RegisterAsset.func2 (6 handlers)\n[GIN-debug] POST   /script/*any              --\u003e demo/asset.RegisterAsset.func2 (6 handlers)\n[GIN-debug] PUT    /script/*any              --\u003e demo/asset.RegisterAsset.func2 (6 handlers)\n[GIN-debug] PATCH  /script/*any              --\u003e demo/asset.RegisterAsset.func2 (6 handlers)\n[GIN-debug] HEAD   /script/*any              --\u003e demo/asset.RegisterAsset.func2 (6 handlers)\n[GIN-debug] OPTIONS /script/*any              --\u003e demo/asset.RegisterAsset.func2 (6 handlers)\n[GIN-debug] DELETE /script/*any              --\u003e demo/asset.RegisterAsset.func2 (6 handlers)\n[GIN-debug] CONNECT /script/*any              --\u003e demo/asset.RegisterAsset.func2 (6 handlers)\n[GIN-debug] TRACE  /script/*any              --\u003e demo/asset.RegisterAsset.func2 (6 handlers)\n[GIN-debug] GET    /docs/*any                --\u003e demo/asset.RegisterAsset.func3 (7 handlers)\n[GIN-debug] POST   /docs/*any                --\u003e demo/asset.RegisterAsset.func3 (7 handlers)\n[GIN-debug] PUT    /docs/*any                --\u003e demo/asset.RegisterAsset.func3 (7 handlers)\n[GIN-debug] PATCH  /docs/*any                --\u003e demo/asset.RegisterAsset.func3 (7 handlers)\n[GIN-debug] HEAD   /docs/*any                --\u003e demo/asset.RegisterAsset.func3 (7 handlers)\n[GIN-debug] OPTIONS /docs/*any                --\u003e demo/asset.RegisterAsset.func3 (7 handlers)\n[GIN-debug] DELETE /docs/*any                --\u003e demo/asset.RegisterAsset.func3 (7 handlers)\n[GIN-debug] CONNECT /docs/*any                --\u003e demo/asset.RegisterAsset.func3 (7 handlers)\n[GIN-debug] TRACE  /docs/*any                --\u003e demo/asset.RegisterAsset.func3 (7 handlers)\n[GIN-debug] GET    /favicon.ico              --\u003e demo/asset.RegisterAsset.func4 (6 handlers)\n[GIN-debug] GET    /adminfs/*filepath        --\u003e github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (6 handlers)\n[GIN-debug] HEAD   /adminfs/*filepath        --\u003e github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (6 handlers)\n[GIN-debug] [WARNING] Since SetHTMLTemplate() is NOT thread-safe. It should only be called\nat initialization. ie. before any route is registered or the router is listening in a socket:\n\n        router := gin.Default()\n        router.SetHTMLTemplate(template) // \u003c\u003c good place\n\n[GIN-debug] GET    /login                    --\u003e demo/core/controller.login (6 handlers)\n[GIN-debug] GET    /admin/:type              --\u003e demo/core/controller.process (6 handlers)\n[GIN-debug] POST   /admin/:type              --\u003e demo/core/controller.process (6 handlers)\n[GIN-debug] PUT    /admin/:type              --\u003e demo/core/controller.process (6 handlers)\n[GIN-debug] PATCH  /admin/:type              --\u003e demo/core/controller.process (6 handlers)\n[GIN-debug] HEAD   /admin/:type              --\u003e demo/core/controller.process (6 handlers)\n[GIN-debug] OPTIONS /admin/:type              --\u003e demo/core/controller.process (6 handlers)\n[GIN-debug] DELETE /admin/:type              --\u003e demo/core/controller.process (6 handlers)\n[GIN-debug] CONNECT /admin/:type              --\u003e demo/core/controller.process (6 handlers)\n[GIN-debug] TRACE  /admin/:type              --\u003e demo/core/controller.process (6 handlers)\n[GIN-debug] GET    /test/:type               --\u003e demo/core/controller.test_process (7 handlers)\n[GIN-debug] POST   /test/:type               --\u003e demo/core/controller.test_process (7 handlers)\n[GIN-debug] PUT    /test/:type               --\u003e demo/core/controller.test_process (7 handlers)\n[GIN-debug] PATCH  /test/:type               --\u003e demo/core/controller.test_process (7 handlers)\n[GIN-debug] HEAD   /test/:type               --\u003e demo/core/controller.test_process (7 handlers)\n[GIN-debug] OPTIONS /test/:type               --\u003e demo/core/controller.test_process (7 handlers)\n[GIN-debug] DELETE /test/:type               --\u003e demo/core/controller.test_process (7 handlers)\n[GIN-debug] CONNECT /test/:type               --\u003e demo/core/controller.test_process (7 handlers)\n[GIN-debug] TRACE  /test/:type               --\u003e demo/core/controller.test_process (7 handlers)\n2022-10-19 11:26:53.386293 [1] [INFO ] [root] settings.go:31 ip 0.0.0.0 port 8000\n2022-10-19 11:26:53.386405 [1] [INFO ] [root] settings.go:84 Listening and serving HTTPS on http://10.0.23.63:8000\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flflxp%2Flflxp-k8s","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flflxp%2Flflxp-k8s","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flflxp%2Flflxp-k8s/lists"}