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

Explicitly set the image pull policy to IfNotPresent #545

Merged
merged 1 commit into from
Jun 16, 2020
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
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
bdunne marked this conversation as resolved.
Show resolved Hide resolved
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