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

gc namespace for k8sspark k8sflink #3392

Merged

Conversation

chengjoey
Copy link
Contributor

@chengjoey chengjoey commented Dec 16, 2021

What type of this PR

Add one of the following kinds:
/kind feature

What this PR does / why we need it:

gc namespace for k8sspark k8sflink

Which issue(s) this PR fixes:

Specified Reviewers:

/assign @your-reviewer

ChangeLog

Language Changelog
🇺🇸 English Support gc namespace for k8sspark k8sflink
🇨🇳 中文 实现k8sspark和k8sflink类型的pipeline gc namespace

Need cherry-pick to release versions?

Add comment like /cherry-pick release/1.0 when this PR is merged.

For details on the cherry pick process, see the cherry pick requests section under CONTRIBUTING.md.

@chengjoey chengjoey added feature pipeline pipeline service bug labels Dec 16, 2021
@codecov
Copy link

codecov bot commented Dec 16, 2021

Codecov Report

Merging #3392 (d1d562c) into master (22309da) will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3392      +/-   ##
==========================================
+ Coverage   18.00%   18.02%   +0.02%     
==========================================
  Files        1403     1403              
  Lines      145380   145392      +12     
==========================================
+ Hits        26171    26212      +41     
+ Misses     116512   116480      -32     
- Partials     2697     2700       +3     
Impacted Files Coverage Δ
modules/pipeline/pipengine/reconciler/task.go 16.92% <0.00%> (-1.11%) ⬇️
pkg/mock/mock.go 42.42% <0.00%> (-1.02%) ⬇️
...pipeline/pipengine/reconciler/taskrun/framework.go 0.00% <0.00%> (ø)
modules/dop/services/issue/issue.go 8.34% <0.00%> (+0.46%) ⬆️
apistructs/pipeline_task.go 59.49% <0.00%> (+45.60%) ⬆️

@chengjoey
Copy link
Contributor Author

image

@chengjoey chengjoey force-pushed the feature/k8sspark-flink-gc-namespace branch from 0c0d676 to 4c429a6 Compare December 16, 2021 09:09
@@ -112,6 +112,9 @@ type Conf struct {
// scheduler executor refresh interval
ExecutorRefreshIntervalMinute uint64 `env:"EXECUTOR_REFRESH_INTERVAL_MINUTE" default:"20"`
SpecifyImagePullPolicy string `env:"SPECIFY_IMAGE_PULL_POLICY" default:"IfNotPresent"`

// k8s namespace
EnableSpecifiedK8SNamespace string `env:"ENABLE_SPECIFIED_K8S_NAMESPACE"`
Copy link
Member

Choose a reason for hiding this comment

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

I think specified_k8s_namespace should be a request level config.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

adjusted, only use task.Extra.NotPipelineControlledNs

NotPipelineControlledNs is request level config

@@ -112,6 +112,9 @@ type Conf struct {
// scheduler executor refresh interval
ExecutorRefreshIntervalMinute uint64 `env:"EXECUTOR_REFRESH_INTERVAL_MINUTE" default:"20"`
SpecifyImagePullPolicy string `env:"SPECIFY_IMAGE_PULL_POLICY" default:"IfNotPresent"`

// k8s namespace
EnableSpecifiedK8SNamespace string `env:"ENABLE_SPECIFIED_K8S_NAMESPACE"`
Copy link
Member

Choose a reason for hiding this comment

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

use bool

Copy link
Member

Choose a reason for hiding this comment

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

who inject this env


// delete namespace after gc flinkcluster
namespace := task.Extra.Namespace
if conf.EnableSpecifiedK8SNamespace() == "" && !task.Extra.NotPipelineControlledNs {
Copy link
Member

Choose a reason for hiding this comment

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

bad string comparation.

@chengjoey chengjoey force-pushed the feature/k8sspark-flink-gc-namespace branch from 4c429a6 to d1d562c Compare December 16, 2021 11:32
@sfwn
Copy link
Member

sfwn commented Dec 17, 2021

/approve

@erda-bot erda-bot merged commit b7ac3d8 into erda-project:master Dec 17, 2021
@chengjoey chengjoey deleted the feature/k8sspark-flink-gc-namespace branch April 18, 2022 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants