Commit Graph

86 Commits

Author SHA1 Message Date
D8D Developer
6a548f538a feat(docs): 添加 sprint 状态跟踪和抢占式实例事件处理故事文档
- 新增 sprint-status.yaml 文件用于跟踪项目 sprint 进度和故事状态
- 新增 spot-instance-event-handling.md 详细用户故事文档
- 定义 ECI 抢占式实例 SpotToBeReleased 事件处理的需求和验收标准
- 包含技术实现方案、测试要求和风险缓解措施
2025-11-26 06:48:26 +00:00
D8D Developer
0343d8257f 更新bmad 2025-11-26 06:37:50 +00:00
D8D Developer
f022ae2250 feat(docs): 添加项目文档和配置
- 新增 .claude/settings.local.json 配置文件,添加工作流命令权限
- 创建详细的产品需求文档(PRD),定义项目愿景、功能需求和技术规范
- 包含优雅下线和抢占式实例自动轮转等核心功能设计
2025-11-06 12:35:55 +00:00
D8D Developer
e776084312 feat(docs): 添加完整的项目文档集
- 新增开发指南文档,包含环境设置、构建流程和最佳实践
- 添加项目概览文档,提供项目全面介绍和架构说明
- 创建技术栈分析文档,详细说明使用的技术和依赖
- 添加源树分析文档,解释项目目录结构和关键文件
- 创建文档索引页面,统一管理所有项目文档
- 生成项目扫描报告,记录文档生成过程
- 更新工作流状态配置,指定文档化前提条件
- 添加.gitignore规则,忽略NFS相关文件
2025-11-06 07:38:58 +00:00
D8D Developer
ceb5f90b45 📝 docs(workflow): 添加 BMM 工作流状态跟踪模板
- 新增工作流状态跟踪配置文件
- 定义项目阶段和状态要求(必需/可选/推荐/条件性)
- 包含项目元数据和工作流路径信息
- 支持方法轨道棕地项目的状态跟踪
2025-11-06 07:21:03 +00:00
D8D Developer
5f51832857 📝 docs(product): add product brief for vk-eci project
- 新增产品简介文档,详细介绍vk-eci项目的愿景和目标用户
- 包含执行摘要、核心愿景、目标用户画像和成功指标
- 定义MVP范围和未来发展规划,明确技术选型和架构原则
- 分析市场机会和竞争环境,识别关键风险和缓解策略
2025-11-06 07:09:45 +00:00
D8D Developer
5b88851852 bmadV6 2025-11-06 06:58:55 +00:00
D8D Developer
87fc8b7027 📝 docs(eci): 新增抢占式实例使用文档
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Failing after 59s
- 添加完整的ECI抢占式实例创建和使用指南
- 包含背景信息、计费方式、回收机制和注意事项
- 提供多种配置示例和YAML模板
- 详细说明释放机制和优雅下线流程
- 涵盖预释放事件处理和Pod状态监控
2025-11-06 06:52:31 +00:00
D8D Developer
4e4cbcf65f feat(eci): 添加EIP注解支持并优化配置逻辑
All checks were successful
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Successful in 4m40s
- 新增EIP相关注解支持:k8s.aliyun.com/eci-with-eip和k8s.aliyun.com/eci-eip-instanceid
- 添加EipInstanceId字段到CreateContainerGroupRequest结构体
- 优化EIP配置逻辑:当未配置EIP注解时默认启用自动创建EIP
- 移除硬编码的AutoCreateEip设置,改为基于注解的灵活配置
2025-09-08 12:22:14 +00:00
D8D Developer
fe5cf87558 📝 docs(project): 添加项目文档文件
All checks were successful
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Successful in 5m29s
- 创建 CLAUDE.md 项目说明文档
- 包含项目概述、关键命令、架构说明和开发指南
- 提供主要文件说明和开发环境要求
- 添加测试、构建和 CI/CD 相关信息
2025-09-08 11:19:28 +00:00
D8D Developer
64e6342b95 feat(eci): 支持通过注解指定ECS规格
All checks were successful
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Successful in 4m30s
- 添加对k8s.aliyun.com/eci-use-specs注解的解析
- 将注解值作为InstanceType参数传递给ECI创建请求
2025-07-10 06:18:15 +00:00
D8D Developer
41e03d0f49 🐛 fix(eci): 修正自动创建EIP参数类型
All checks were successful
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Successful in 4m13s
- 将AutoCreateEip参数从布尔值改为使用requests.Boolean类型
- 保持原有功能不变但符合API参数要求
2025-07-01 07:55:52 +00:00
D8D Developer
70ba5ff245 已在 eci/create_container_group.go 文件的 CreateContainerGroupRequest 结构体中添加了 AutoCreateEip 字段
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Failing after 3m50s
2025-07-01 07:42:52 +00:00
D8D Developer
6c0ffc0567 🐛 fix(eci): 移除抢占式实例持续时间配置
All checks were successful
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Successful in 5m16s
- 注释掉 SpotDuration 参数设置
- 在 CreateContainerGroupRequest 结构中注释掉 SpotDuration 字段
2025-07-01 06:51:04 +00:00
df7b5af263 更新 eci.go
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Failing after 3m56s
2025-07-01 05:41:29 +00:00
a01503f2aa 修改 CreatePod 方法以添加抢占式实例配置
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Has been cancelled
2025-07-01 05:40:20 +00:00
f067bf1186 添加 .github/workflows/build.yaml
All checks were successful
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Successful in 4m22s
2025-07-01 03:49:11 +00:00
4838d89b4a 添加 Dockerfile 2025-07-01 03:47:55 +00:00
Brian Goff
633a6061f1 Merge pull request #5 from denverdino/master
Fix go.mod
2020-01-13 09:48:11 -08:00
Li Yi
c9f0567907 Fix go.mod
Signed-off-by: Li Yi <denverdino@gmail.com>
2020-01-04 19:47:29 +08:00
Brian Goff
3858dfe099 Deprecate "provider" flag
This is also deprecated on other provider CLI's since it doesn't make sense to specify one.
2019-06-17 11:47:18 -07:00
Brian Goff
0d635b423d Remove "AZURE*" copy pasta 2019-06-17 11:33:52 -07:00
Brian Goff
34c355d3fa Add project stuff for CI/make/etc 2019-06-14 12:54:53 -07:00
Brian Goff
a894106043 Fixup items after move provider from vk/vk 2019-06-14 12:54:49 -07:00
Brian Goff
38456348d6 Copy cmd/ from vk/vk 2019-06-14 11:52:44 -07:00
Brian Goff
a70d4f9499 Move cli back into cmd/ after filter branch 2019-06-14 11:51:32 -07:00
Brian Goff
9d9bd9cca5 Add license details on file heads. (#665)
Realized as I was starting to copy some stuff to other repos that we
should go ahead and add this.
2019-06-13 10:13:14 -07:00
Brian Goff
bbf5af22c1 Remove resourcemanager from conroller public API (#664)
We still use it internally, but this does not need to be part of the
public API. Instead just have callers pass us the relevent listers and
we create our own resource manager.
2019-06-12 13:42:03 -07:00
Brian Goff
96024a7a0e Move around some packages (#658)
* Move tracing exporter registration

This doesn't belong in the library and should be configured by the
consumer of the opencensus package.

* Rename `vkublet` package to `node`

`vkubelet` does not convey any information to the consumers of the
package.
Really it would be nice to move this package to the root of the repo,
but then you wind up with... interesting... import semantics due to the
repo name... and after thinking about it some, a subpackage is really
not so bad as long as it has a name that convey's some information.

`node` was chosen since this package deals with all the semantics of
operating a node in Kubernetes.
2019-06-12 13:11:49 +01:00
Brian Goff
2b76578994 Move around some packages (#658)
* Move tracing exporter registration

This doesn't belong in the library and should be configured by the
consumer of the opencensus package.

* Rename `vkublet` package to `node`

`vkubelet` does not convey any information to the consumers of the
package.
Really it would be nice to move this package to the root of the repo,
but then you wind up with... interesting... import semantics due to the
repo name... and after thinking about it some, a subpackage is really
not so bad as long as it has a name that convey's some information.

`node` was chosen since this package deals with all the semantics of
operating a node in Kubernetes.
2019-06-12 13:11:49 +01:00
Brian Goff
b6eeb88316 Update node defaults
Do not enable leases by default in the node constructor.
Simplify node constructor to not require a lease client when leases may
not even be enabled.

Updates node status update interval to the kubelet default of 10s (was
5s in vk).
2019-06-10 10:31:37 -07:00
Brian Goff
6afc53f0e9 Use errdefs package 2019-06-04 14:29:23 -07:00
Brian Goff
bbcc1f38c9 Use errdefs package 2019-06-04 14:29:23 -07:00
Brian Goff
76ea287332 Support error handler callback for node status (#648)
This moves the logic for re-creating the a missing node up into the CLI.
We can make this optional, but for now I've just preserved existing
functionality.
2019-06-01 09:46:47 -07:00
Brian Goff
ddee513763 Remove Server object (#629)
This had some weird shared responsibility with the PodController.
Instead just move the functionality to the PodController.
2019-06-01 09:36:38 -07:00
Sargun Dhillon
ae69cc749f Upgrade to Go 1.12 (#630) 2019-05-20 11:39:47 +01:00
Brian Goff
6743e4ff20 Decouple vkubelet/* packages from providers (#626)
This makes the concept of a `Provider` wholely implemented in the cli
implementation in cmd/virtual-kubelet.

It allows us to slim down the interfaces used in vkubelet (and
vkubelet/api) to what is actually used there rather than a huge
interface that is only there to serve the CLI's needs.
2019-05-17 17:01:05 -07:00
Brian Goff
ac947b10b8 Decouple vkubelet/* packages from providers (#626)
This makes the concept of a `Provider` wholely implemented in the cli
implementation in cmd/virtual-kubelet.

It allows us to slim down the interfaces used in vkubelet (and
vkubelet/api) to what is actually used there rather than a huge
interface that is only there to serve the CLI's needs.
2019-05-17 17:01:05 -07:00
Sargun Dhillon
de467d41e9 Add the /runningpods/ api endpoint (#611)
* Add the /runningpods/ api endpoint

This adds an API endpoint from the kubelet (/runningpods/). It is
an endpoint on kubelet which is considered a "debug" endpoint, so
it might be worth exposing through the options, but by default
it is exposed in most k8s configs AFAICT.
2019-05-13 15:10:31 -07:00
Sargun Dhillon
59d021f644 Fix being able to set the VK's listening port 2019-05-08 17:18:42 -07:00
Brian Goff
00ea9dc763 Use I/O stream for provider logs interface
Providers must still update the implementaiton to actually gain any
benefit here, but this makes the provider interface a bit more sane.
2019-05-08 09:17:29 -07:00
Sargun Dhillon
2497028659 Add the ability to configure klog from VK (#595)
All of Kubernetes logging is based on klog. Klog currently does
not output any logging information to logrus, so you're flying
somewhat blind to Kubernetes internals.

This exposes the full set of configurables that klog offers,
but decorates (prefixes) the klog configuration with "klog".
2019-05-08 11:37:04 +01:00
Brian Goff
8eb6a5bcc5 Merge branch 'master' into error-on-zpages-failure 2019-05-07 09:14:08 -07:00
Sargun Dhillon
6762301668 Remove old github.com/Sirupsen/logrus 2019-05-06 17:26:05 -07:00
Sargun Dhillon
6d49bb981c Do not swallow errors from the zpages server silently
If the zpages server exits for any reason, or is unable to bind,
rather than exiting silently, throw an error.
2019-05-06 11:10:17 -07:00
Sargun Dhillon
764cb5a76e Add the concept of startup timeout (#597)
This adds two concepts, where one encompasses the other.

Startup timeout
Startup timeout is how long to wait for the entire kubelet
to get into a functional state. Right now, this only waits
for the pod informer cache for the pod controllerto become
in-sync with API server, but this could be extended to other
informers (like secrets informer).

Wait For Startup
This changes the behaviour of the virtual kubelet to wait
for the pod controller to start before registering the node.

It is to avoid the race condition where the node is registered,
but we cannot actually do any pod operations.
2019-05-06 09:25:00 -07:00
Brian Goff
c346a7f5b8 Refactor exec interface (#578)
This removes the dependence on remotecommand in providers as well as the
need to expose provider ID's for the sake of the ExecInContainer API.
2019-04-26 12:57:56 -07:00
Sargun Dhillon
4b0c6815eb Stop using deprecated method Clientset.Coordination (#581)
Clientset.Coordination is deprecated. We are meant to use the specific
version of the client: CoordinationV1beta1. Clientset.Coordination is
going to be removed in future versions of the client API.
2019-04-23 14:17:15 -07:00
Brian Goff
ed5f478b9b Don't set cancel function to nil on error (#579)
When setting up the http server we return a cancel function to close all
the listeners down.
The issue here is we set the cancel function to nil and thereby cause a
panic when there is an error and the `defer` attempts to call cancel.

This fix just don't set a named return value for the cancel function to
make sure we don't overwrite it with a `return nil, err`.
This ensures that the `defer` can still call `cancel()`.
2019-04-22 10:31:06 -07:00
Brian Goff
57e8ee4b51 Refactor CLI initialization (#562)
This cleans up the CLI code significantly.
Also makes some of this re-usable for providers who want to do so.

This also removes the main.go from the top of the tree of the repro,
instead moving it into cmd/virtual-kubelet.
This allows us to better utilize the package namespace (and e.g. mv the
`vkubelet` package to the top of the tree).
2019-04-19 17:02:39 -07:00