# huaweicloud-istio-k8s-saas-housekeeper **Repository Path**: HuaweiCloudDeveloper/huaweicloud-istio-k8s-saas-housekeeper ## Basic Information - **Project Name**: huaweicloud-istio-k8s-saas-housekeeper - **Description**: 采用Istio服务网格+K8s对saas-housekeeper项目进行改造,将原依赖于SpringCloud的相关能力改造为依赖于Istio, 利用Istio的服务治理能力对服务管理,配置管理,网关进行了替换,以及在网关的基础上扩展了流量控制的能力,安全方面扩展了认证,授权等能力。 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master-dev - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 7 - **Forks**: 4 - **Created**: 2022-08-16 - **Last Updated**: 2024-10-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README [TOC] **项目介绍** =============== 采用Istio服务网格+K8s对saas-housekeeper项目进行改造,将原依赖于SpringCloud的相关能力改造为依赖于Istio, 利用Istio的服务治理能力对服务管理,配置管理,网关进行了替换,以及在网关的基础上扩展了流量控制的能力,安全方面扩展了认证,授权等能力。以及实现了基于Istio的灰度发布。 ![saas-housekeeper.PNG](img/jdk-1.8-brightgreen.svg) ![saas-housekeeper.PNG](img/maven-3.8.4.svg) **改造技术点** --------------- - 服务管理: 注册中心移除,请求直接访问服务。 - 配置中心: 使用K8s的ConfigMap替换, 用Kubernates-config和Kubernates-java-client实现配置实时刷新。 - 网关服务: 使用Istio的IngressGateway,可以实现JWT验证、请求转发等。 - 安全认证: 使用Istio认证策略实现身份认证,授权策略实现访问控制等。 - 灰度发布: 使用VirtualService配合DestinationRule实现灰度发布。 **架构图** --------------- ![saas-housekeeper.PNG](img/业务架构图.png) ![saas-housekeeper.PNG](img/技术架构图.png) **组织结构** --------------- ``` saas-housekeeper ├── conf -- 前端nginx配置文件 ├── db -- 初始化脚本 ├── document -- 图片文件 ├── saas-housekeeper-common -- 公共包 ├── saas-housekeeper-config 配置目录 ├── saas-housekeeper-istio-config -- istio配置目录 ├── saas-housekeeper-k8s-configMap -- k8s configMap配置 └── saas-housekeeper-istio-deploy -- deploy配置文件 ├── saas-housekeeper-event-tracking -- 日志中心 ├── saas-housekeeper-message-service -- 消息中心 ├── saas-housekeeper-order-service -- 订单中心 ├── saas-housekeeper-service-publish-service -- 服务发布中心 ├── saas-housekeeper-task-service -- 任务中心 ├── saas-housekeeper-tenant-router-starter -- 租户路由插件 ├── saas-housekeeper-tenantinfo-service -- 租户中心 ├── saas-housekeeper-userinfo-service -- 用户中心 ├── saas-housekeeper-web-customer -- 用户管理中心(前端) ├── saas-housekeeper-web-super-admin -- 超级管理员管理中心(前端) ├── saas-housekeeper-web-tenant -- 租户管理中心(前端) └── saas-housekeeper-web-worker -- 任务管理中心(前端) ``` **技术选型** --------------- | 技术 | 说明 | 官网 | |----------------------------|--------------|---------------------------------------------------------------------------| | Istio | 服务网格 | https://support.huaweicloud.com/productdesc-asm/asm_productdesc_0001.html | | K8S | 华为云应用容器引擎CCE | https://support.huaweicloud.com/cce/index.html | | SpringBoot | 容器+MVC框架 | https://spring.io/projects/spring-boot | | MyBatis-plus | ORM框架 | https://baomidou.com/ | | Mysql | 云数据库RDS | https://support.huaweicloud.com/rds/index.html | | Redis | 分布式缓存DCS服务 | https://support.huaweicloud.com/intl/zh-cn/dcs/index.html | | RabbitMQ | 分布式消息队列 DMS | https://support.huaweicloud.com/intl/zh-cn/rabbitmq/index.html | | saas-tenant-router-starter | 多租户路由中间件 | https://gitee.com/HuaweiCloudDeveloper/saas-tenant-router-starter.git | | JWK | JWK登录支持 | https://bitbucket.org/connect2id/nimbus-jose-jwt/wiki/Home | | Lombok | 简化对象封装工具 | https://github.com/rzwitserloot/lombok | | Swagger-UI | 文档生成工具 | https://github.com/swagger-api/swagger-ui | **项目启动** --------------- 请查看[deploy](https://gitee.com/HuaweiCloudDeveloper/huaweicloud-istio-k8s-saas-housekeeper/blob/master-dev/deploy.md)文档 **相关参考** --------------- - 华为云开发者中心SaaS应用开发指导 - [多租路由中间件开源项目](https://gitee.com/HuaweiCloudDeveloper/saas-tenant-router-starter)