Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Update the OpenFaaS installation to only pull images if not present #141

Merged
merged 1 commit into from
Oct 31, 2019

Conversation

Waterdrips
Copy link
Contributor

Description

The bootstrap script installed OpenFaaS in a way that the images were
always pulled even if they existed on the node. This has been changed
to pull if they are not present to reduce cold-start times when the
functions are scaled down and up.

Signed-off-by: Alistair Hey [email protected]

Closes #100

@alexellis is this all that is required for #100 ? seems like a small pr

How Has This Been Tested?

Installing OFC onto a new cluster with the new config and testing by calling the functions.
It all worked

Checklist:

I have:

  • checked my changes follow the style of the existing code / OpenFaaS repos
  • updated the documentation and/or roadmap in README.md
  • read the CONTRIBUTION guide
  • signed-off my commits with git commit -s
  • added unit tests

Copy link
Member

@alexellis alexellis left a comment

Choose a reason for hiding this comment

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

LGTM

@alexellis
Copy link
Member

openfaasImagePullPolicy | Image pull policy for openfaas components, can change to IfNotPresent in offline env

https://github.com/openfaas/faas-netes/tree/master/chart/openfaas

Did we get the right setting?

This is to prevent images from being pulled for functions if already present.

@alexellis
Copy link
Member

I think this should be:

faasnetes.imagePullPolicy

Copy link
Member

@alexellis alexellis left a comment

Choose a reason for hiding this comment

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

See comment please

@Waterdrips Waterdrips force-pushed the image-pull-policy-change branch from c8bdeba to 7293dd0 Compare October 30, 2019 22:34
The bootstrap script installed OpenFaaS in a way that the images were
always pulled even if they existed on the node. This has been changed
to pull if they are not present to reduce cold-start times when the
functions are scaled down and up.

Signed-off-by: Alistair Hey <[email protected]>
@Waterdrips Waterdrips force-pushed the image-pull-policy-change branch from 7293dd0 to 3e81c56 Compare October 30, 2019 22:36
@Waterdrips
Copy link
Contributor Author

Good spot @alexellis - sorry!

I have updated the correct image_pull_policy now - Shown after an install below:

image

Copy link
Member

@alexellis alexellis left a comment

Choose a reason for hiding this comment

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

Approved

@alexellis alexellis merged commit d7b93c9 into openfaas:master Oct 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set OpenFaaS image pull policy to IfNotPresent
2 participants