noovertime7 / kubemanage Goto Github PK
View Code? Open in Web Editor NEWkubemanage是使用go+vue3开发的一款云原生运维平台,功能包括但不限于Kubernetes多集群管理、CMDB、Devops,可作为企业二次开发的模板,新手入门的学习项目
License: MIT License
kubemanage是使用go+vue3开发的一款云原生运维平台,功能包括但不限于Kubernetes多集群管理、CMDB、Devops,可作为企业二次开发的模板,新手入门的学习项目
License: MIT License
大佬,搞个交流群,也利于项目的发展!!
// JWTAuth jwt认证函数
func JWTAuth() gin.HandlerFunc {
return func(context *gin.Context) {
if AlwaysAllowPath.Has(context.Request.URL.Path) {
return
}
if len(context.Request.URL.String()) == 15 && context.Request.URL.String()[0:15] == "/api/user/login" {
context.Next()
return
}
// 处理验证逻辑
}
}
环境
maridb : 10.3
2023/06/17 17:11:12 C:/Users/pandihao1/go/pkg/mod/gorm.io/driver/[email protected]/migrator.go:258
mail longtext COMMENT '用户邮箱',
en from Information_schema.SCHEMATA where SCHEMA_NAME LIKE 'kubemanage%' ORDER BYable bigint DEFAULT 1 COMMENT '用户是否被冻结 1正常 2冻结',
status int(11) COMMENT '0离线',
created_at datetime(3) NULL,
updated_at datetime(3) NULL,
deleted_at datetime(3) NULL,PRIMARY KEY (
id),INDEX
idx_sys_users_deleted_at (
deleted_at),INDEX
idx_sys_users_uuid (
uuid),INDEX
idx_sys_users_user_name (
user_name`))
Error 1067: Invalid default value for 'nick_name'
您好,我期望通过参数--kubeconfig 指定 kubeconfig文件的路径,但是始终提示错误,内容如下:
[root@localhost kubemanage]# ./main --kubeconfig "/root/.kube/config"
Error: unknown flag: --kubeconfig
Usage:
kubemanage-server [flags]
Flags:
--configFile string The location of the kubemanage configuration file
-h, --help help for kubemanage-server
似乎是cobra 库,拦截了该参数。对于此问题您有什么好的建议吗?
顺便问一下,您为什么在kubemanage/pkg/core/kubemanage/v1/kube/init.go #31,处使用flag呢,而不是使用cobra,是出于什么原因考虑的?
在文件 kubemanage/pkg/core/kubemanage/v1/sys/user.go 的 如下代码段中:
func (u *userService) PageList(ctx *gin.Context, did uint, info dto.PageUsersIn) (dto.PageUsers, error) {
users, total, err := u.factory.User().PageList(ctx, did, info)
if err != nil {
return dto.PageUsers{}, err
}
var out []dto.PageUserItem
for _, user := range users {
dept, err := u.factory.Department().Find(ctx, &model.Department{DeptId: user.DepartmentID})
if err != nil {
return dto.PageUsers{}, err
}
outItem := dto.PageUserItem{
ID: user.ID,
DepartmentID: user.DepartmentID,
DepartmentName: dept.DeptName,
UserName: user.UserName,
NickName: user.NickName,
Authorities: user.Authorities,
Phone: user.Phone.String,
Email: user.Email.String,
Enable: user.Enable,
Status: user.Status.Int64,
}
out = append(out, outItem)
}
return dto.PageUsers{
Total: total,
Page: info.Page,
PageSize: info.PageSize,
List: out,
}, nil
}
u.factory.User().PageList() 函数通过did 获得users,那么users中所有元素的DepartmentID,不应该都是相同的吗?
为什么还要在for循环中请求 u.factory.Department().Find() 函数呢?是不是在循环外部请求一次就好了呢?
您好,有对应的视频教程嘛
https://github.com/AsuraTeam/zcloud
这个流程我个人觉得挺好的
请问下这个产品会一直更新下去吗?因为我也一直想找个项目学习,如果作者打算一直更新下去我就一直跟着大佬学习。
另外有roadmap吗?比如会有RBAC的权限系统or 多集群管理?。 😊
请问下admin密码是多少?
这个地方,搞了很久搞不懂怎么玩。
报错,不管我怎么设置~/.kube里面的config配置
config config.yaml configBackUp kubeconfig
应该如何配置呢?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.