Skip to content

Commit

Permalink
Release 0.10.13
Browse files Browse the repository at this point in the history
  • Loading branch information
anbarasantr committed May 30, 2024
1 parent d26ea70 commit d2e1b74
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/k8s.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ function copyPackageInfoToPodMetaData(yamlObject, kind) {
let spec = yamlObject.spec;
spec.podMetadata = spec.podMetadata || {};
if (metadata.labels && metadata.labels[ANNOTATION_VERSION]) {
spec.podMetadata.labels = spec.podMetadata.labels || {};
spec.podMetadata.labels[ANNOTATION_VERSION] = metadata.labels[ANNOTATION_VERSION];
spec.podMetadata.annotations = spec.podMetadata.annotations || {};
spec.podMetadata.annotations[ANNOTATION_VERSION] = metadata.labels[ANNOTATION_VERSION];
}
if (metadata.annotations && metadata.annotations[LABEL_NAME]) {
spec.podMetadata.annotations = spec.podMetadata.annotations || {};
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "argopm",
"version": "0.10.12",
"version": "0.10.13",
"description": "Argo package manager",
"main": "./lib/index.js",
"scripts": {
Expand Down
4 changes: 1 addition & 3 deletions tests/k8s.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,11 @@ describe("copyPackageInfoToPodMetaData", () => {
expect(result.metadata.labels).toEqual({
"package.argoproj.io/version": "0.34.217",
});
expect(result.spec.podMetadata.labels).toEqual({
"package.argoproj.io/version": "0.34.217",
});
expect(result.metadata.annotations).toEqual({
"package.argoproj.io/name": "whalesay",
});
expect(result.spec.podMetadata.annotations).toEqual({
"package.argoproj.io/version": "0.34.217",
"package.argoproj.io/name": "whalesay",
});
});
Expand Down

0 comments on commit d2e1b74

Please sign in to comment.