Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/r3drun3/provider-azuredevops
Crossplane provider for azure devops 🍡
https://github.com/r3drun3/provider-azuredevops
azure crossplane-provider
Last synced: 3 months ago
JSON representation
Crossplane provider for azure devops 🍡
- Host: GitHub
- URL: https://github.com/r3drun3/provider-azuredevops
- Owner: R3DRUN3
- License: apache-2.0
- Created: 2023-01-04T09:05:40.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-17T08:55:28.000Z (almost 2 years ago)
- Last Synced: 2024-06-20T10:18:14.322Z (7 months ago)
- Topics: azure, crossplane-provider
- Language: Go
- Homepage:
- Size: 312 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Crossplane AzureDevops Provider
![CI](https://github.com/r3drun3/provider-azuredevops/actions/workflows/ci.yml/badge.svg)
[![Go Report Card](https://goreportcard.com/badge/github.com/r3drun3/provider-azuredevops)](https://goreportcard.com/report/github.com/r3drun3/provider-azuredevops)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/r3drun3/provider-azuredevops)
`provider-azuredevops` is a [Crossplane](https://crossplane.io/) provider that
is built using [Upjet](https://github.com/upbound/upjet) code
generation tools and exposes XRM-conformant managed resources for the
AzureDevops API.## Getting Started
Install the provider by using the following command after changing the image tag
to the [latest release](https://marketplace.upbound.io/providers/r3drun3/provider-azuredevops):
```
up ctp provider install r3drun3/provider-azuredevops:v0.1.0
```Alternatively, you can use declarative installation:
```
cat <Start a local `kubernetes` cluster (we will use `kind`):
```console
kind create cluster --config ./k8s-local/kind-config.yml
```Now we can generate our Upjet Provider:
```console
make generate
````Note`: In case the previous command gave you the `panic: cannot run goimports for apis folder: bash: goimports: command not found` error, on macOS you can run:
```console
export PATH="$PATH:$HOME/go/bin" && make generate
```Apply Custom Resource Definitions:
```console
kubectl apply -f package/crds
```
Under `examples/providerconfig` create a kubernetes secrets with your azuredevops org url and access token:
```console
cat < examples/providerconfig/secret.yaml
apiVersion: v1
kind: Secret
metadata:
name: example-creds
namespace: crossplane-system
type: Opaque
stringData:
credentials: |
{
"personal_access_token": "your azure devops personal access token",
"org_service_url": "your azure devops org url"
}
EOF
```Run the provider:
```console
make run
```*Note*: if you see error when launching the `make` command, try to run the following command first:
```console
git rm --cached build && git submodule add https://github.com/upbound/build build
```Now open a new terminal and apply all the required resources:
```console
kubectl create namespace crossplane-system --dry-run=client -o yaml | kubectl apply -f - \
&& kubectl apply -f examples/providerconfig/ \
&& kubectl apply -f examples/project/project.yaml \
&& kubectl apply -f examples/gitrepository/gitrepository.yaml
```
This will create a new azure devops project in your organization:![](images/az-devops-project.png)
and a repository inside your project:
![](images/az-devops-repo.png)
To retrieve the created resources run the following command:
```console
kubectl get managedNAME READY SYNCED EXTERNAL-NAME AGE
repository.gitrepository.azuredevops.upbound.io/hello-crossplane-repository True False e03861d4-ce5d-43cc-899e-ed4a4c99d5d0 14mNAME READY SYNCED EXTERNAL-NAME AGE
project.project.azuredevops.upbound.io/hello-crossplane-project True True 7482fede-2c79-402c-b730-5dfafb1b5a24 24m
```
If you want to check resource status use the `describe` command, for example:
```console
k describe repository.gitrepository.azuredevops.upbound.io/hello-crossplane-repository
```If you want to delete the created resource on azure, simply run:
```console
kubectl delete -f examples/project/project.yaml
```
## Report a Bug
For filing bugs, suggesting improvements, or requesting new features, please
open an [issue](https://github.com/r3drun3/provider-azuredevops/issues).