Skip to content

suvaanshkumar/provider-jfrogartifactory

Repository files navigation

Provider Artifactory

provider-artfactory is a Crossplane provider that is built using Upjet code generation tools and exposes XRM-conformant managed resources for the Artifactory API.

Getting Started

Install the provider by using the following command after changing the image tag to the latest release:

up ctp provider install myorg/provider-artfactory:v0.1.0

Alternatively, you can use declarative installation:

cat <<EOF | kubectl apply -f -
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
  name: provider-artfactory
spec:
  package: myorg/provider-artfactory:v0.1.0
EOF

Notice that in this example Provider resource is referencing ControllerConfig with debug enabled.

You can see the API reference here.

Developing

Run code-generation pipeline:

go run cmd/generator/main.go "$PWD"

Run against a Kubernetes cluster:

make run

Build, push, and install:

make all

Build binary:

make build

Report a Bug

For filing bugs, suggesting improvements, or requesting new features, please open an issue.

Testing

Cannot use OSS Artifactory because it does not support creating repositories through REST APIs. Get a license for Artifactory: https://jfrog.com/start-free/#ft Set the environment variable ARTIFACTORY_LICENSE_KEY in your local ~/.zshrc and restart your IDE.

in a terminal in the dev container:

mage setupE2E
kubectl port-forward --namespace jfrog svc/artifactory-artifactory-nginx 8888:80

in new terminal:

kubectl apply -f package/crds
make run

in new terminal:

kubectl apply -f e2e/providerconfig.yaml
#kubectl apply -f examples/manifests/genericrepository.yaml
mage testE2E

Manual testing by applying resources

Steps to use this provider artifactory

In another terminal run the following

  • Generate an identity token on artifactory to be used here.
  • Create a file similar to creds.json present in examples/manifests/template folder and fill in the url and the and key
  • Base64 encode this file and put it in the secret.yaml file present in examples/manifests/template in data field and apply the secret
  • Apply providerconfigartifactory.yaml present in examples/manifests
  • Apply the genericrepository.yaml or any other resource you want

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •