Configuring Tekton to Use ArtifactHub Shim
TOC
OverviewPrerequisitesMigrate Custom Catalogs from the Built-in Tekton HubInspect the Existing Catalog ConfigurationMigrate Git CredentialsRegister the Migrated Catalog SourcesConfigure TektonConfigVerify the ConfigurationOverview
artifacthub-shim provides the Artifact Hub-compatible API used by the Tekton Hub resolver and the DevOps Hub UI. After installing artifacthub-shim, update the TektonConfig resource so that catalog requests use the shim instead of the built-in Tekton Hub components.
This guide uses the default artifacthub-shim Service and namespace. If you want to keep or re-enable the built-in Tekton Hub instead, see Enabling the Built-in Tekton Hub.
Prerequisites
Before you begin, ensure that:
artifacthub-shimis installed and its API workload is ready.- The
artifacthub-shim-apiService exists in theartifacthub-shim-systemnamespace. - The installed
artifacthub-shimversion supports theoptionalandlegacyCatalogAliasesrepository fields. - The
TektonConfigresource namedconfigexists. - You have permission to update
TektonConfigand read workloads in the Tekton target namespace. jqis installed if you plan to use the command in this guide to migrate an existing SSH Secret.
If you are replacing an existing built-in Tekton Hub, do not disable it yet. First follow Migrate Custom Catalogs from the Built-in Tekton Hub, verify the migrated sources, and configure TektonConfig. You can then follow Disabling the Built-in Tekton Hub when you no longer need the old Hub as a fallback.
Migrate Custom Catalogs from the Built-in Tekton Hub
release-4.10 preserves an existing built-in Tekton Hub, but it does not automatically migrate custom catalog configuration to artifacthub-shim. Complete the following steps manually before disabling the built-in Hub.
Inspect the Existing Catalog Configuration
Determine the Tekton target namespace. If spec.targetNamespace is empty, use tekton-pipelines:
Inspect both the TektonHub resource and the rendered API ConfigMap:
The TektonHub resource contains the user-configured spec.catalogs entries. The rendered CATALOGS data can also contain catalog entries and disabledPackages rules. Compare both sources and retain the most complete values for each catalog.
Map each legacy catalog as follows:
The legacy org, type, and provider fields are not required by artifacthub-shim.
Migrate Git Credentials
For a public Git repository, omit credentialRef. For an SSH repository, create a Secret in the same namespace as the repository ConfigMap. The standard legacy Secret is named tekton-hub-api-ssh-crds and stores its private key under id_rsa; artifacthub-shim expects sshPrivateKey or ssh-privatekey and requires known_hosts.
If the legacy Secret contains id_rsa and known_hosts, the following command copies the encoded values without printing the plaintext credential:
The old id_rsa.pub value is not required. If the old Secret uses another private-key field, select that value instead. Verify that known_hosts contains the host key for the Git server before applying the new Secret.
For HTTPS repositories, a referenced Secret can contain username and password, or token. Add ca.crt to the same Secret when the Git server uses an internal CA. Never embed credentials in the Git URL or repository ConfigMap.
Register the Migrated Catalog Sources
Create a labeled ConfigMap in the artifacthub-shim namespace. The following example migrates the legacy catalog team-a, whose resources are stored below catalogs/devops:
When the old contextDir is empty, use task, pipeline, and stepaction as the paths. Keep all three entries even if one of these directories does not exist: optional: true makes an absent or empty kind path Ready with zero packages.
The canonical repository names must be globally unique. legacyCatalogAliases, however, are scoped by resource kind. Therefore, existing Task, Pipeline, and StepAction resolver references can all continue to use catalog: team-a; Pipeline requests resolve to team-a-pipelines, and StepAction requests resolve to team-a-stepactions. API responses return the canonical repository name. New references should use the canonical name directly.
Existing references that explicitly set type: tekton must still be changed to type: artifact. References that omit type use the default-type: artifact value configured later in this guide.
Apply the ConfigMap and inspect its Events:
RepositoryConfigAccepted means the configuration was accepted. Wait for RepositorySourceReady for each source before switching TektonConfig. Test every resource kind used by your old catalog through the DevOps Hub or a Hub resolver reference with type: artifact and the original catalog name.
For the complete repository schema, credential formats, Events, and resolver examples, see Configure Custom Git Repositories.
Configure TektonConfig
Edit TektonConfig/config and merge the following fields into spec.pipeline:
Merge these fields with the existing spec.pipeline configuration. Do not replace the entire section: it contains other feature flags, performance settings, and environment-specific customizations. If options already contains other Deployment or Ingress overrides, preserve them as well.
This configuration makes the following changes:
- Enables the Hub resolver and uses the Artifact Hub-compatible API exposed by
artifacthub-shim. - Uses
catalogfor Tasks andcatalog-pipelinesfor Pipelines. - Uses Artifact Hub resources of kind
taskwhen a resolver reference omits these values. - Scales the legacy
hubs-wrapperDeployment to zero and moves its Ingress away from/hub, allowing theartifacthub-shimplugin to serve the DevOps Hub endpoint. - Keeps the Tekton Pipelines component enabled. The
options.disabled: falsefield does not enablehubs-wrapper; its zero replicas disable that individual Deployment.
If artifacthub-shim is installed in another namespace, replace artifacthub-shim-system in artifact-hub-api. If the Service name was customized, replace artifacthub-shim-api as well.
Verify the Configuration
Wait for TektonConfig to become ready:
Determine the Tekton target namespace if you did not already do so. If spec.targetNamespace is empty, use tekton-pipelines:
Check the resolver configuration reconciled by the operator:
The output must contain these values:
Verify that the Hub resolver is enabled and the legacy wrapper is stopped:
For artifacthub-shim installation options and resolver integration details, see Configure Tekton Integration.