convoy docs
Search

OCIRegistry

An OCI registry as a source. In convoy v0.9.0, convoy pulls only Helm chart artifacts from it.

An OCIRegistry is an OCI registry, for example oci://ghcr.io/stefanprodan/charts. Each Release selects the artifact and the version in spec.source.ociRegistry.artifact.

API groupsource.convoy.kumodo.io/v1alpha1
ScopeNamespaced
Subresources/status
ConditionsReady

Example#

sources/ociregistry-auth-token.yaml
# OCIRegistry with token auth. The token is read from a Secret key and used as the
# registry login password (registries accept a token as the password). For
# username+password, use `type: basic` with `basic.username` + `basic.passwordRef`.
apiVersion: v1
kind: Secret
metadata:
  name: oci-token
  namespace: default
type: Opaque
stringData:
  token: replace_me
---
apiVersion: source.convoy.kumodo.io/v1alpha1
kind: OCIRegistry
metadata:
  name: private-oci-charts
  namespace: default
spec:
  url: oci://ghcr.io/example/charts
  auth:
    type: token
    token:
      tokenRef:
        name: oci-token
        key: token
  defaultContentType: helm
  interval: 1m0s
  minSyncInterval: 30s

Content#

An OCI registry can hold many artifact types. In convoy v0.9.0, convoy pulls only Helm chart artifacts. An artifact without a chart layer fails with no chart layer. To render kustomize or plain manifests, use a GitRepository.

spec.defaultContentType is required, and accepts helm, manifests and kustomize. Only helm content can be fetched. Pulling other OCI artifacts is planned work. Not built

The artifact version must match a tag exactly. Version ranges do not work.

Verification#

The controller sends a request to the /v2/ endpoint of the registry. A 200 or a 401 answer gives Ready=True. This check does not prove that the credentials work. A wrong credential shows only when a Release pulls a chart.

Auth types#

auth.typeImplementedFields
noneYes
basicYesbasic.username and basic.passwordRef
tokenYestoken.tokenRef. convoy logs in with the username convoy and the token as the password.
dockerConfig, oidc, cloudIdentityNoReady=False, reason Unsupported.

TLS#

Only tls.insecureSkipVerify works. tls.caPublicCertRef is accepted, but not used.

Fields#

FieldTypeDescription
specOCIRegistrySpecOCIRegistrySpec defines the desired state of OCIRegistry
spec.auth requiredOCIRegistryAuthSpecAuth is the authentication method used to access the OCI registry.
spec.auth.basicBasicAuthSpecBasic is the basic authentication used to access the OCI registry.
spec.auth.basic.passwordRef requiredSecretKeySelectorPasswordRef is the name and the key of the Secret containing the password.
spec.auth.basic.username requiredstringUsername is the username used for authentication.
spec.auth.cloudIdentityCloudIdentitySpecCloudIdentity is the cloud identity configuration used to access the OCI registry.
spec.auth.cloudIdentity.provider requiredstringProvider is the cloud provider.
  • aws is the cloud provider AWS.
  • azure is the cloud provider Azure.
  • gcp is the cloud provider GCP.
spec.auth.dockerConfigDockerConfigAuthSpecDockerConfig is the Docker config used to access the OCI registry.
spec.auth.dockerConfig.secretRef requiredSecretKeySelectorSecretKeySelector selects a key of a Secret.
spec.auth.oidcOIDAuthSpecOIDC is the OIDC configuration used to access the OCI registry.
spec.auth.oidc.audiencestringAudience is the OIDC audience.
spec.auth.oidc.clientAuth requiredOIDCClientAuthSpecClientAuth is the OIDC authentication method used for authentication.
spec.auth.oidc.clientAuth.clientSecretOIDCAuthClientSecretSpecClientSecret is the reference to the Secret and the key of the Secret containing the OIDC client secret.
spec.auth.oidc.clientAuth.clientSecret.clientSecretRef requiredSecretKeySelectorClientSecretRef is the name and the key of the Secret containing the OIDC client secret.
spec.auth.oidc.clientAuth.privateKeyJWTOIDCAuthPrivateKeyJWTSpecPrivateKeyJWT is the reference to the Secret and the key of the Secret containing the OIDC private key JWT.
spec.auth.oidc.clientAuth.privateKeyJWT.privateKeyRef requiredSecretKeySelectorPrivateKeyRef is the name and the key of the Secret containing the OIDC private key JWT.
spec.auth.oidc.clientAuth.tlsClientAuthOIDCAuthTLSClientAuthSpecTLSClientAuth is the reference to the Secrets and the keys of the Secret(s) containing the OIDC client certificate and key.
spec.auth.oidc.clientAuth.tlsClientAuth.certRef requiredSecretKeySelectorCertRef is the name and the key of the Secret containing the OIDC client certificate.
spec.auth.oidc.clientAuth.tlsClientAuth.keyRef requiredSecretKeySelectorKeyRef is the name and the key of the Secret containing the OIDC client certificate key.
spec.auth.oidc.clientAuth.type requiredstringType is the OIDC authentication method type used for authentication.
  • clientSecret is the OIDC authentication method using a client secret.
  • privateKeyJWT is the OIDC authentication method using a private key JWT.
  • tlsClientAuth is the OIDC authentication method using TLS client authentication.
spec.auth.oidc.clientID requiredstringClientID is the OIDC client ID.
spec.auth.oidc.issuerURL requiredstringIssuerURL is the URL of the OIDC issuer.
spec.auth.oidc.scopes[]stringlist type: atomicScopes are the OIDC scopes.
spec.auth.oidc.tlsTLSSpecTLS is the issuer TLS configuration.
spec.auth.oidc.tls.caPublicCertRef requiredConfigMapKeySelectorCAPublicCertRef is the name and the key of the ConfigMap containing the CA public certificate. The CA certificate is used to verify the IdP server's certificate.
spec.auth.oidc.tls.insecureSkipVerify requiredbooleanInsecureSkipVerify is a flag to skip the certificate verification.
spec.auth.tokenTokenAuthSpecToken is the token used to access the OCI registry.
spec.auth.token.tokenRef requiredSecretKeySelectorTokenRef is the name and the key of the Secret containing the token.
spec.auth.type requiredstringType is the authentication method used to access the OCI registry.
  • basic is the authentication method using basic authentication.
  • cloudIdentity is the authentication method using a cloud identity.
  • dockerConfig is the authentication method using a Docker config.
  • none is the authentication method using no authentication.
  • oidc is the authentication method using OIDC.
  • token is the authentication method using a token.
spec.defaultContentType requiredstringDefaultContentType is the default content type used to fetch content from the OCI registry.
  • helm is the content type used to fetch Helm charts.
  • kustomize is the content type used to fetch kustomize bundles.
  • manifests is the content type used to fetch tarballs of raw manifests.
spec.interval required accepted, not usedDurationInterval is the poll interval for ref resolution and content fetching.
spec.minSyncInterval required accepted, not usedDurationMinSyncInterval is the minimum interval between syncs. Used to rate limit syncs.
spec.tlsTLSSpecTLS is the TLS configuration used to verify the OCI registry.
spec.tls.caPublicCertRef required accepted, not usedConfigMapKeySelectorCAPublicCertRef is the name and the key of the ConfigMap containing the CA public certificate. The CA certificate is used to verify the IdP server's certificate.
spec.tls.insecureSkipVerify requiredbooleanInsecureSkipVerify is a flag to skip the certificate verification.
spec.url requiredstringURL is the URL of the OCI registry.
FieldTypeDescription
statusOCIRegistryStatusOCIRegistryStatus reflects the observed state of OCIRegistry
status.conditions[]Conditionlist type: map, keys: typeConditions is the list of conditions related to the OCIRegistry.
status.lastSuccessfulProbeAtTimeLastSuccessfulProbeAt is the last time source was successfully probe.
status.observedGenerationintegerObservedGeneration is the last generation that was observed by the controller.
status.releaseCountintegerReleaseCount is the number of Release referencing the OCIRegistry.
status.webhooks[]WebhookStatuslist type: map, keys: nameWebhooks is the list of statuses of webhooks that are configured for the OCIRegistry.
status.webhooks[].filteredCountintegerFilteredCount is the number of times the webhook was filtered.
status.webhooks[].lastReceivedTimeLastReceived is the last time the webhook was received.
status.webhooks[].lastRejectionLastRejectionStatusLastRejection is the last time, reason and message the webhook was rejected.
status.webhooks[].lastRejection.messagestringMessage is the message of the webhook rejection.
status.webhooks[].lastRejection.reasonstringReason is the reason the webhook was rejected.
status.webhooks[].lastRejection.rejectedAtTimeRejectedAt is the time the webhook was rejected.
status.webhooks[].lastTriggeredTimeLastTriggered is the last time the webhook was triggered.
status.webhooks[].name requiredstringName is the name of the webhook.
status.webhooks[].receivedCountintegerReceivedCount is the number of times the webhook was received.
status.webhooks[].rejectedCountintegerRejectedCount is the number of times the webhook was rejected.
status.webhooks[].triggersCountintegerTriggersCount is the number of times the webhook was triggered.
status.webhooks[].url requiredstringURL is the URL of the webhook.

Conditions#

Ready · written by convoy-controller-manager

ReasonStatusMeaning
VerifiedTrueThe /v2/ endpoint of the registry answered with 200 or 401. This check does not prove that the credentials work. A wrong credential shows only when a Release pulls a chart.
UnsupportedFalseThe auth type is not implemented. convoy does not retry with backoff. The periodic resync checks the source again.
VerifyFailedFalseconvoy could not reach the registry. convoy retries.

In the code

convoy v0.9.0