Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reuse workload #245

Merged
merged 1 commit into from
Oct 18, 2023
Merged

reuse workload #245

merged 1 commit into from
Oct 18, 2023

Conversation

ii2day
Copy link
Collaborator

@ii2day ii2day commented Oct 10, 2023

feature #204
实现复用 daemonset 作为 workload
若 task 未定义 agentSpec 字段,controller 使用默认的 daemonset 执行任务。
若 task 定义了 agentSpec 字段,controller 创建新的 workload 执行任务。

@ii2day ii2day added the pr/not-ready not ready for merging label Oct 10, 2023
@codecov
Copy link

codecov bot commented Oct 10, 2023

Codecov Report

Merging #245 (aa3e95f) into main (45b512a) will increase coverage by 0.22%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #245      +/-   ##
==========================================
+ Coverage   38.94%   39.16%   +0.22%     
==========================================
  Files           8        8              
  Lines         529      526       -3     
==========================================
  Hits          206      206              
+ Misses        318      315       -3     
  Partials        5        5              
Flag Coverage Δ
unittests 39.16% <0.00%> (+0.22%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
pkg/reportManager/worker.go 18.11% <0.00%> (+0.41%) ⬆️

@ii2day ii2day force-pushed the feat/ii2day/reuse_workload branch 2 times, most recently from 9f06e2f to bcd755e Compare October 11, 2023 11:10
@ii2day ii2day force-pushed the feat/ii2day/reuse_workload branch 5 times, most recently from fe567a7 to ade9eb8 Compare October 13, 2023 10:16
@ii2day ii2day removed the pr/not-ready not ready for merging label Oct 13, 2023
@ii2day ii2day force-pushed the feat/ii2day/reuse_workload branch 2 times, most recently from dab2193 to 1936ab1 Compare October 16, 2023 02:32
@@ -59,10 +59,6 @@ spec:
spec:
properties:
agentSpec:
default:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个feature 对 原理的新建逻辑 为什么有修改

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个 feature 如果不填写 agentSpec 使用默认的 agent 执行任务,所以将原 agent 改为指针类型,原有的 agent 存在 默认值,会导致无论怎么做都有 agentspec 字段,这个默认值 只是 agentspec 的默认值,不是 agentspec里字段的默认值

- name: ENV_GENERAL_AGENT_TYPE
value: DaemonSet
{{- if .Values.feature.enableIPv4 }}
- name: ENV_GENERAL_AGENT_SERVICE_V4_NAME
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这些都是只为default agent ? 建议都加上 default agent 字眼

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -76,6 +76,7 @@ func init() {
globalFlag.StringVar(&types.AgentConfig.ServiceV6Name, "service-ipv6-name", "", "agent IPv6 service name")

globalFlag.BoolVarP(&types.AgentConfig.AppMode, "app-mode", "A", false, "app mode")
globalFlag.BoolVarP(&types.AgentConfig.GeneralAgent, "general-agent", "G", false, "general agent")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default agent 更合适

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@ii2day ii2day force-pushed the feat/ii2day/reuse_workload branch 3 times, most recently from b5f2a7c to 2fc086c Compare October 17, 2023 06:43
Signed-off-by: ii2day <ji.li@daocloud.io>
@weizhoublue weizhoublue merged commit 49beec5 into main Oct 18, 2023
24 of 26 checks passed
@weizhoublue weizhoublue deleted the feat/ii2day/reuse_workload branch October 18, 2023 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants