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

[KubernetesManifest] Replacement logic fix #11883

Merged
merged 4 commits into from
Dec 9, 2019

Conversation

thesattiraju
Copy link
Contributor

@thesattiraju thesattiraju commented Dec 4, 2019

Fixes #11517

@thesattiraju thesattiraju requested a review from vithati December 4, 2019 07:08
Tasks/KubernetesManifestV0/src/utils/DeploymentHelper.ts Outdated Show resolved Hide resolved
KubernetesObjectUtility.updateImagePullSecrets(inputObject, imagePullSecrets, false);
}
newObjectsList.push(inputObject);
if (!!containers && containers.length > 0) {
Copy link
Member

Choose a reason for hiding this comment

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

you can remove !!

img = imageName.split(':')[0];
}
images.forEach(image => {
if (image.startsWith(img + ':') || image === img) {
Copy link
Member

Choose a reason for hiding this comment

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

if it is same then no need to replace right. image===img we can remove.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. The check should be different. I'll fix it

KubernetesObjectUtility.updateImagePullSecrets(inputObject, imagePullSecrets, false);
}
newObjectsList.push(inputObject);
if (containers && containers.length > 0) {
Copy link
Member

Choose a reason for hiding this comment

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

Add "list" kind handling.

@thesattiraju thesattiraju merged commit 273f54b into master Dec 9, 2019
leantk pushed a commit that referenced this pull request Dec 23, 2019
* [KubernetesManifest] Replacement logic fix

* Resolving comments and some extra logic

* Adding list support/fixing logic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

KubernetesManifest container substitution regex is not correct in all cases
2 participants