Skip to content

Commit 7cc07be

Browse files
authored
Merge pull request #504 from ozhuraki/image-pull-policy
Change imagePullPolicy to Always
2 parents 5180380 + 272625c commit 7cc07be

File tree

4 files changed

+36
-0
lines changed

4 files changed

+36
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Table of Contents
2424
* [Developers](#developers)
2525
* [Running e2e Tests](#running-e2e-tests)
2626
* [Supported Kubernetes versions](#supported-kubernetes-versions)
27+
* [Pre-built plugin images](#pre-built-plugin-images)
2728
* [Related code](#related-code)
2829

2930
## Prerequisites
@@ -266,6 +267,14 @@ matching Kubernetes versions are listed below:
266267
[Go environment]: https://golang.org/doc/install
267268
[Kubernetes cluster]: https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/
268269

270+
## Pre-built plugin images
271+
272+
Pre-built images of the plugins are available on the Docker hub. These images are automatically built and uploaded to the hub from the latest master branch of this repository.
273+
274+
Release tagged images of the components are also available on the Docker hub, tagged with their release version numbers in the format x.y.z, corresponding to the branches and releases in this repository.
275+
276+
**Note:** the default deployment files and operators are configured with [imagePullPolicy](https://kubernetes.io/docs/concepts/containers/images/#updating-images) ```IfNotPresent``` and can be changed with ```scripts/set-image-pull-policy.sh```.
277+
269278
## License
270279

271280
All of the source code required to build intel-device-plugins-for-kubernetes

deployments/gpu_plugin/base/intel-gpu-plugin.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ spec:
1616
initContainers:
1717
- name: intel-gpu-initcontainer
1818
image: intel/intel-gpu-initcontainer:devel
19+
imagePullPolicy: IfNotPresent
1920
securityContext:
2021
readOnlyRootFilesystem: true
2122
volumeMounts:

deployments/operator/manager/manager.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ spec:
2424
spec:
2525
containers:
2626
- image: intel/intel-deviceplugin-operator:devel
27+
imagePullPolicy: IfNotPresent
2728
name: manager
2829
resources:
2930
limits:

scripts/set-image-pull-policy.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright 2019-2020 Intel Corporation.
4+
#
5+
# SPDX-License-Identifier: Apache-2.0
6+
#
7+
# Invoke this script with a imagePullPolicy as parameter
8+
# and it will update all hard-coded imagePullPolicy
9+
# in the deployments, demos and controller code
10+
#
11+
# Adapted from https://github.com/intel/pmem-csi/
12+
13+
if [[ $# != 1 ]] || [[ "$1" == "?" ]] || [[ "$1" == "--help" ]] ||
14+
[[ ! $1 =~ IfNotPresent|Always ]]; then
15+
echo "Usage: $0 <IfNotPresent|Always>" >&2
16+
exit 1
17+
fi
18+
19+
IMAGE_PULL_POLICY=$1
20+
21+
echo IMAGE_PULL_POLICY=$IMAGE_PULL_POLICY
22+
23+
sed -i -e "s;\(imagePullPolicy\:\ \).*;\1$IMAGE_PULL_POLICY;" $(git grep -l 'imagePullPolicy' deployments/*.yaml demo/*.yaml)
24+
25+
sed -i -e "s;\(ImagePullPolicy\:\ \).*;\1\"$IMAGE_PULL_POLICY\",;" $(git grep -l 'ImagePullPolicy' pkg/controllers/*/*.go)

0 commit comments

Comments
 (0)