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: Can't use locally built latest images on Kubernetes clusters #2710

Merged
merged 1 commit into from
Jun 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/renderer/src/lib/pod/DeployPodToKube.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ test('When deploying a pod, volumes should not be added (they are deleted by pod
{
name: 'hello',
image: 'hello-world',
imagePullPolicy: 'IfNotPresent',
},
],
},
Expand All @@ -216,6 +217,7 @@ test('When modifying the pod name, metadata.apps.label should also have been cha
{
name: 'hello',
image: 'hello-world',
imagePullPolicy: 'IfNotPresent',
},
],
},
Expand Down Expand Up @@ -245,6 +247,7 @@ test('When deploying a pod, restricted security context is added', async () => {
{
name: 'hello',
image: 'hello-world',
imagePullPolicy: 'IfNotPresent',
securityContext: {
allowPrivilegeEscalation: false,
capabilities: {
Expand Down
1 change: 1 addition & 0 deletions packages/renderer/src/lib/pod/DeployPodToKube.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ onMount(async () => {
container.ports?.forEach((port: any) => {
containerPortArray.push(port.hostPort);
});
container.imagePullPolicy = 'IfNotPresent';
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm wondering if it needs to be all the time or just if we don't specify a tag to the image ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the default if tag is different from latest so it's good to always set it to this value.

});
});

Expand Down
Loading