-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Conversation
KubernetesObjectUtility.updateImagePullSecrets(inputObject, imagePullSecrets, false); | ||
} | ||
newObjectsList.push(inputObject); | ||
if (!!containers && containers.length > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can remove !!
Tasks/KubernetesManifestV0/src/utils/KubernetesObjectUtility.ts
Outdated
Show resolved
Hide resolved
img = imageName.split(':')[0]; | ||
} | ||
images.forEach(image => { | ||
if (image.startsWith(img + ':') || image === img) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add "list" kind handling.
* [KubernetesManifest] Replacement logic fix * Resolving comments and some extra logic * Adding list support/fixing logic
Fixes #11517