Skip to content

Add imagePullPolicy to ContainerSourceSpec API #1272

@csantanapr

Description

@csantanapr

Problem
I hit this today on the ✈️ while writing some container source examples (nodejs), I wanted to set the ImagePullPolicy to Never and the spec doesn't allow it.
I think ImagePullPolicy is one of the basic ContainerSpec in K8s that should be allowed.

Persona:
System Integrator

Exit Criteria
Be able to deploy a container file with ImagePullPolicy for the container source

apiVersion: sources.eventing.knative.dev/v1alpha1
kind: ContainerSource
metadata:
  name: nodejs-custom-source-brk
spec:
  image: docker.io/csantanapr/container-source-nodejs
  imagePullPolicy: Never
  sink:
    apiVersion: eventing.knative.dev/v1alpha1
    kind: Broker
    name: default
  args:
    - node
    - index.js

Time Estimate (optional):
2 days

Additional context (optional)
There might be others to add, but for know I wan to have this one available.
Currently the ImagePullPolicy is currently hardcoded to corev1.PullIfNotPresent here: https://github.com/knative/eventing/blob/master/pkg/reconciler/containersource/resources/deployment.go#L76

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions