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

fix(scheduler): compose deployment with imagepullsecrets #2456

Merged
merged 1 commit into from
Oct 28, 2021
Merged

fix(scheduler): compose deployment with imagepullsecrets #2456

merged 1 commit into from
Oct 28, 2021

Conversation

Muzry
Copy link
Contributor

@Muzry Muzry commented Oct 20, 2021

What type of this PR

Add one of the following kinds:
/kind bugfix

What this PR does / why we need it:

  • fix(scheduler): compose deployment with image pull secrets

Which issue(s) this PR fixes:

  • Fixes #your-issue_number
  • [Erda Cloud Issue Link](paste your link here)

Specified Reviewers:

/assign @luobily

ChangeLog

Language Changelog
🇺🇸 English Bugfix: Fix the bug that returns an error when the namespace hasn't aliyun secret in scheduler
🇨🇳 中文 修复了 scheduler 在 namespace 中没有 aliyun secret 报错的问题

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.

@erda-bot erda-bot requested a review from luobily October 20, 2021 07:29
@codecov
Copy link

codecov bot commented Oct 20, 2021

Codecov Report

Merging #2456 (a30de5c) into release/1.3 (255cec7) will increase coverage by 0.13%.
The diff coverage is 53.84%.

Impacted file tree graph

@@               Coverage Diff               @@
##           release/1.3    #2456      +/-   ##
===============================================
+ Coverage        15.95%   16.08%   +0.13%     
===============================================
  Files             1211     1211              
  Lines           122014   122062      +48     
===============================================
+ Hits             19467    19636     +169     
+ Misses          100531   100348     -183     
- Partials          2016     2078      +62     
Impacted Files Coverage Δ
...dules/scheduler/executor/plugins/k8s/deployment.go 25.00% <53.84%> (+25.00%) ⬆️
...ules/scheduler/executor/plugins/k8s/check_quota.go 28.08% <0.00%> (+7.21%) ⬆️

@Muzry Muzry added feature orchestrator workload management labels Oct 27, 2021
@@ -455,6 +457,11 @@ func (k *Kubernetes) newDeployment(service *apistructs.Service, sg *apistructs.S
Labels: make(map[string]string),
},
Spec: apiv1.PodSpec{
ImagePullSecrets: []apiv1.LocalObjectReference{
{
Name: AliyunRegistry,
Copy link
Member

Choose a reason for hiding this comment

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

ImagePullSecrets can be used as an environment variable

if err == nil {
deployment.Spec.Template.Spec.ImagePullSecrets = []apiv1.LocalObjectReference{
{
Name: AliyunRegistry,
Copy link
Member

Choose a reason for hiding this comment

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

+1

@luobily
Copy link
Member

luobily commented Oct 28, 2021

/approve

@erda-bot erda-bot merged commit bc95e50 into erda-project:release/1.3 Oct 28, 2021
@Muzry
Copy link
Contributor Author

Muzry commented Oct 28, 2021

/cherry-pick master

@Muzry
Copy link
Contributor Author

Muzry commented Oct 28, 2021

/cherry-pick release/1.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

3 participants