Installing Operators from JFrog Artifactory¶
To install OpenShift operators sourced from JFrog Artifactory, you need to configure OpenShift's Operator Lifecycle Manager (OLM) to treat Artifactory as a private container registry.
In OpenShift, operators are packaged as container images (an index/catalog image, bundle images, and the actual workload operands). Assuming you have already pushed or mirrored your operator images into Artifactory, here is the step-by-step process to install them.
Step 1: Authenticate OpenShift to Artifactory¶
OpenShift needs permission to pull the catalog and operator images from Artifactory. You must add your Artifactory credentials to the global cluster pull secret.
- Create a base64 encoded auth string for your Artifactory credentials:
- Download the current global pull secret:
oc get secret/pull-secret -n openshift-config --template='{{index .data ".dockerconfigjson" | base64decode}}' > pull-secret.json
- Edit the
pull-secret.jsonto include your Artifactory registry:
{
"auths": {
"your-artifactory-domain.com": {
"auth": "<base64-encoded-credentials>",
"email": "admin@example.com"
}
}
}
- Apply the updated secret back to the cluster:
Warning
Updating the global pull secret will trigger a rolling reboot of your worker nodes as the new configuration is applied.
Step 2: Handle Image Redirection (If Mirrored)¶
If you used a tool like oc-mirror to copy public operators (e.g., from registry.redhat.io or quay.io) into Artifactory, the internal manifests of those operators still point to their original public URLs.
You must tell OpenShift to redirect those requests to Artifactory by applying an ImageDigestMirrorSet.
If you used oc-mirror, it will have automatically generated this YAML file for you in its output directory (usually named imageContentSourcePolicy.yaml or imageDigestMirrorSet.yaml). Apply it:
Step 3: Create the CatalogSource¶
A CatalogSource is the resource that tells OpenShift's OperatorHub where to find the index image for your operators.
- Create a file named
artifactory-catalog.yaml:
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: artifactory-catalog
namespace: openshift-marketplace
spec:
sourceType: grpc
image: your-artifactory-domain.com/operator-repo/custom-index:v1.0
displayName: "Artifactory Custom Catalog"
publisher: "Internal"
updateStrategy:
registryPoll:
interval: 45m
- Apply the configuration:
- Verify that the catalog pod is running successfully:
oc get pods -n openshift-marketplace | grep artifactory-catalog
oc get catalogsource -n openshift-marketplace
Step 4: Install the Operator¶
Once the CatalogSource is running, the operators hosted in Artifactory will appear natively in the OpenShift Web Console.
Via the Web Console¶
- Navigate to Ecosystem > Software Catalog
- Filter the sources by your custom
displayName(e.g., "Artifactory Custom Catalog") - Click on the operator you want, select your target namespace, and click Install
Via the CLI¶
If you prefer infrastructure-as-code, you can install the operator by creating an OperatorGroup (to define namespace scope) and a Subscription (to trigger the install).
- Create the
OperatorGroupin your target namespace:
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: my-operator-group
namespace: my-target-namespace
spec:
targetNamespaces:
- my-target-namespace
- Create the
Subscription:
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: my-artifactory-operator
namespace: my-target-namespace
spec:
channel: stable
name: <operator-package-name>
source: artifactory-catalog
sourceNamespace: openshift-marketplace
installPlanApproval: Automatic
- Apply both files: