Source Controller reference

This topic provides reference documentation for Source Controller.

ImageRepository [Deprecated]

kind: ImageRepository
  image: registry.example/image/repository:tag
  # optional fields
  interval: 5m
  imagePullSecrets: []
  serviceAccountName: default

ImageRepository resolves source code defined in an Open Container Initiative (OCI) image repository, exposing the resulting source artifact at a URL defined by .status.artifact.url.

The interval determines how often to check tagged images for changes. Setting this value too high will result in delays in discovering new sources, while setting it too low may trigger a registry’s rate limits.

Repository credentials can be defined as image pull secrets. You can reference them either directly from the resources at .spec.imagePullSecrets or attach them to a service account referenced at .spec.serviceAccountName. The default service account name "default" is used if not otherwise specified. The default credential helpers for the registry are also used, for example, pulling from Google Container Registry (GCR) on a Google Kubernetes Engine (GKE) cluster.


kind: MavenArtifact
  name: mavenartifact-sample
    groupId: org.springframework.boot
    artifactId: spring-boot
    version: "2.7.0"
  interval: 5m0s
  timeout: 1m0s

MavenArtifact resolves artifact from a Maven repository, exposing the resulting artifact at a URL defined by .status.artifact.url.

The interval determines how often to check artifact for changes. Setting this value too high results in delays in discovering new sources, while setting it too low may trigger a repository’s rate limits.

Repository credentials may be defined as secrets referenced from the resources at .spec.repository.secretRef. Secrets referenced by spec.repository.secretRef is parsed as follows:

apiVersion: v1
kind: Secret
  name: auth-secret
type: Opaque
  username: <BASE64>
  password: <BASE64>
  caFile:   <BASE64>   // PEM Encoded certificate data for Custom CA
  certFile: <BASE64>   // PEM-encoded client certificate
  keyFile:  <BASE64>   // Private Key

Maven supports a broad set of version syntax. Source Controller supports a strict subset of Maven’s version syntax in order to ensure compatibility and avoid user confusion. The subset of supported syntax may grow over time, but will never expand past the syntax defined directly by Maven. This behavior means that we can use mvn as a reference implementation for artifact resolution.

Version support implemented in the following order:

  1. Pinned version - an exact match of a version in2 maven-metadata.xml (versioning/versions/version).

  2. RELEASE - metaversion defined in maven-metadata.xml (versioning/release).

  3. *-SNAPSHOT - the newest artifact for a snapshot version.

  4. LATEST - metaversion defined in maven-metadata.xml (versioning/latest).

  5. Version ranges - Support is planned for a future release.


Pinned versions should be immutable, all other versions are dynamic and can change at any time. The .spec.interval defines how frequently to check for updated artifacts.

check-circle-line exclamation-circle-line close-line
Scroll to top icon