Skip to content

Commit

Permalink
Explicitly set the image pull policy to IfNotPresent
Browse files Browse the repository at this point in the history
  • Loading branch information
carbonin committed Jun 16, 2020
1 parent 1e9c2d4 commit 2080ae5
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ spec:
- name: OPERATOR_NAME
value: manageiq-operator
image: docker.io/manageiq/manageiq-operator:v0.0.1
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
name: manageiq-operator
resources:
limits:
Expand Down
2 changes: 1 addition & 1 deletion manageiq-operator/deploy/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
image: docker.io/manageiq/manageiq-operator:v0.0.1
command:
- manageiq-operator
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
env:
- name: WATCH_NAMESPACE
valueFrom:
Expand Down
1 change: 1 addition & 0 deletions manageiq-operator/pkg/helpers/miq-components/httpd.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ func assignHttpdPorts(privileged bool, c *corev1.Container) {
func initializeHttpdContainer(spec *miqv1alpha1.ManageIQSpec, privileged bool, c *corev1.Container) error {
c.Name = "httpd"
c.Image = httpdImage(spec.HttpdImageNamespace, spec.HttpdImageTag, privileged)
c.ImagePullPolicy = corev1.PullIfNotPresent
if privileged {
c.LivenessProbe = &corev1.Probe{
Handler: corev1.Handler{
Expand Down
10 changes: 6 additions & 4 deletions manageiq-operator/pkg/helpers/miq-components/kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,9 @@ func ZookeeperService(cr *miqv1alpha1.ManageIQ) *corev1.Service {

func KafkaDeployment(cr *miqv1alpha1.ManageIQ) (*appsv1.Deployment, error) {
container := corev1.Container{
Name: "kafka",
Image: cr.Spec.KafkaImageName + ":" + cr.Spec.KafkaImageTag,
Name: "kafka",
Image: cr.Spec.KafkaImageName + ":" + cr.Spec.KafkaImageTag,
ImagePullPolicy: corev1.PullIfNotPresent,
Ports: []corev1.ContainerPort{
corev1.ContainerPort{
ContainerPort: 9092,
Expand Down Expand Up @@ -248,8 +249,9 @@ func KafkaDeployment(cr *miqv1alpha1.ManageIQ) (*appsv1.Deployment, error) {

func ZookeeperDeployment(cr *miqv1alpha1.ManageIQ) (*appsv1.Deployment, error) {
container := corev1.Container{
Name: "zookeeper",
Image: cr.Spec.ZookeeperImageName + ":" + cr.Spec.ZookeeperImageTag,
Name: "zookeeper",
Image: cr.Spec.ZookeeperImageName + ":" + cr.Spec.ZookeeperImageTag,
ImagePullPolicy: corev1.PullIfNotPresent,
Ports: []corev1.ContainerPort{
corev1.ContainerPort{
ContainerPort: 2181,
Expand Down
7 changes: 3 additions & 4 deletions manageiq-operator/pkg/helpers/miq-components/memcached.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@ import (

func NewMemcachedDeployment(cr *miqv1alpha1.ManageIQ, scheme *runtime.Scheme) (*appsv1.Deployment, controllerutil.MutateFn, error) {
container := corev1.Container{
Name: "memcached",
Image: cr.Spec.MemcachedImageName + ":" + cr.Spec.MemcachedImageTag,

Name: "memcached",
Image: cr.Spec.MemcachedImageName + ":" + cr.Spec.MemcachedImageTag,
ImagePullPolicy: corev1.PullIfNotPresent,
Ports: []corev1.ContainerPort{
corev1.ContainerPort{
ContainerPort: 11211,
Protocol: "TCP",
},
},

LivenessProbe: &corev1.Probe{
Handler: corev1.Handler{
TCPSocket: &corev1.TCPSocketAction{
Expand Down
5 changes: 3 additions & 2 deletions manageiq-operator/pkg/helpers/miq-components/postgresql.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,9 @@ func NewPostgresqlService(cr *miqv1alpha1.ManageIQ) *corev1.Service {
func NewPostgresqlDeployment(cr *miqv1alpha1.ManageIQ) (*appsv1.Deployment, error) {
var initialDelaySecs int32 = 60
container := corev1.Container{
Name: "postgresql",
Image: cr.Spec.PostgresqlImageName + ":" + cr.Spec.PostgresqlImageTag,
Name: "postgresql",
Image: cr.Spec.PostgresqlImageName + ":" + cr.Spec.PostgresqlImageTag,
ImagePullPolicy: corev1.PullIfNotPresent,
Ports: []corev1.ContainerPort{
corev1.ContainerPort{
ContainerPort: 5432,
Expand Down

0 comments on commit 2080ae5

Please sign in to comment.