Verify the JFrog Crossplane Providers
Check that the JFrog Crossplane providers can reach JFrog, then create and delete a test repository.
Confirm that your JFrog Crossplane providers work end to end. First, you check that the JFrog URL and token work from the cluster. Then you create and delete a test repository through Kubernetes.
Prerequisites
- The providers are installed and healthy. For more information, see Install the JFrog Crossplane Providers.
- The
jfrog-credsSecret and a ClusterProviderConfig namedjfrogexist. For more information, see Configure Credentials for the JFrog Crossplane Providers. - The namespace
team-aexists. To create it, runkubectl create namespace team-a.
Step 1: Check the JFrog Connection
Run the following command:
kubectl run jf-check --rm -it -n crossplane-system --image=curlimages/curl --restart=Never -- \
curl -s -o /dev/null -w '%{http_code}\n' -H "Authorization: Bearer <token>" <url>/artifactory/api/system/ping # expect 200Replace the following:
<token>: Your JFrog access token.<url>: Your JFrog Platform base URL.
Expected result: The command returns 200.
Step 2: Create a Test Repository
Apply the following manifest:
apiVersion: repository.artifactory.m.crossplane.io/v1alpha1
kind: LocalGenericRepository
metadata:
name: team-a-generic-local
namespace: team-a
spec:
providerConfigRef: {kind: ClusterProviderConfig, name: jfrog}
forProvider:
description: Created by CrossplaneStep 3: Wait for the Repository to Be Ready
Run the following command:
kubectl wait --for=condition=Ready localgenericrepositories.repository.artifactory.m.crossplane.io/team-a-generic-local -n team-a --timeout=3mExpected result: The repository appears in the JFrog UI.
Step 4: Delete the Test Repository
Run the following command:
kubectl delete localgenericrepositories.repository.artifactory.m.crossplane.io/team-a-generic-local -n team-aExpected result: The repository disappears from the JFrog UI.
Verify the Other Providers
To verify the other providers, create and delete an equivalent object.
| Provider | Object to create and delete |
|---|---|
| Xray | SecurityPolicy |
| Project | Project |
| Platform | GlobalRole |
Next Steps
- To learn the building blocks, the reconcile loop, conditions, and identifiers, see How the JFrog Crossplane Providers Work.
- To change how the providers poll and reconcile, see Tune the Providers.
- If a step fails, see Troubleshoot the JFrog Crossplane Providers.
- To move to a new provider version later, see Upgrade the JFrog Crossplane Providers.
Updated about 1 hour ago
Did this page help you?
