Skip to content

Commit

Permalink
chore: rename project
Browse files Browse the repository at this point in the history
Signed-off-by: Yordis Prieto <[email protected]>
  • Loading branch information
yordis committed May 1, 2024
1 parent d871b6c commit ab67bb8
Show file tree
Hide file tree
Showing 75 changed files with 231 additions and 218 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ linters-settings:
goimports:
# put imports beginning with prefix after 3rd-party packages;
# it's a comma-separated list of prefixes
local-prefixes: github.com/straw-hat-team/provider-digitalocean
local-prefixes: github.com/crossplane-contrib/provider-upjet-digitalocean

gocyclo:
# minimal code complexity to report, 30 by default (but we recommend 10-20)
Expand Down
36 changes: 34 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

## How-To

### Getting Started

1. Clone the repository.
2. Run `make submodules` to initialize the submodules.
3. Run `create-secret-yaml` to create the secret yaml file.
4. Fix the configuration of `./examples/providerconfig/secret.yaml` manifest.
5. Run `make k-apply-requires` to apply the required resources.

### Run the local DigitalOcean Provider

1. Run `make run-all` to run the local DigitalOcean provider.
Expand All @@ -24,15 +32,39 @@

#### Test the new resource

1. Add Kubernetes resources under `./tmp` directory.
2. Run `make k-apply-tmp` to apply all the resources under `./tmp` directory.
1. Add Kubernetes resources under `./tmp/manifests` directory.
2. Run `make k-apply-tmp` to apply all the resources under `./tmp/manifests` directory.

Or to be safe, you call apply all the required resources at once:

1. `k-apply-all`

## Explanations

Run code-generation pipeline:

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

Run against a Kubernetes cluster:

```console
make run
```

Build, push, and install:

```console
make all
```

Build binary:

```console
make build
```

### Local Development with IntelliJ IDEA

When developing locally with IntelliJ IDEA, verify that the following environment variables are set:
Expand Down
14 changes: 10 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# ====================================================================================
# Setup Project

PROJECT_NAME ?= provider-digitalocean
PROJECT_REPO ?= github.com/straw-hat-team/$(PROJECT_NAME)
PROJECT_NAME ?= provider-upjet-digitalocean
PROJECT_REPO ?= github.com/crossplane-contrib/$(PROJECT_NAME)

export TERRAFORM_VERSION ?= 1.8.1

Expand Down Expand Up @@ -89,7 +89,7 @@ fallthrough: submodules

# NOTE(hasheddan): we force image building to happen prior to xpkg build so that
# we ensure image is present in daemon.
xpkg.build.provider-digitalocean: do.build.images
xpkg.build.provider-upjet-digitalocean: do.build.images

# NOTE(hasheddan): we ensure up is installed prior to running platform-specific
# build steps in parallel to avoid encountering an installation race condition.
Expand Down Expand Up @@ -247,7 +247,10 @@ k-apply-crds:
@kubectl apply -f ./package/crds

k-apply-tmp:
@kubectl apply -f ./tmp/local
@mkdir -p ./tmp/manifests
@kubectl apply -f ./tmp/manifests

k-apply-requires: k-apply-crds k-apply-providerconfig

k-apply-providerconfig:
@kubectl apply -f ./examples/providerconfig/
Expand All @@ -258,3 +261,6 @@ helm-install-crossplane:
helm install crossplane --namespace crossplane-system --create-namespace crossplane-stable/crossplane

run-all: generate k-apply-all run

create-secret-yaml:
cp ./examples/providerconfig/secret.yaml.tmpl ./examples/providerconfig/secret.yaml
41 changes: 8 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Provider DigitalOcean
# Provider Upjet DigitalOcean

`provider-digitalocean` is a [Crossplane](https://crossplane.io/) provider that
`provider-upjet-digitalocean` is a [Crossplane](https://crossplane.io/) provider that
is built using [Upjet](https://github.com/crossplane/upjet) code
generation tools and exposes XRM-conformant managed resources for the
DigitalOcean 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/straw-hat-team/provider-digitalocean):
to the [latest release](https://marketplace.upbound.io/providers/crossplane-contrib/provider-upjet-digitalocean):
```
up ctp provider install straw-hat-team/provider-digitalocean:v0.1.0
up ctp provider install crossplane-contrib/provider-upjet-digitalocean:v0.1.0
```

Alternatively, you can use declarative installation:
Expand All @@ -19,45 +19,20 @@ cat <<EOF | kubectl apply -f -
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
name: provider-digitalocean
name: provider-upjet-digitalocean
spec:
package: straw-hat-team/provider-digitalocean:v0.1.0
package: crossplane-contrib/provider-upjet-digitalocean:v0.1.0
EOF
```

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

You can see the API reference [here](https://doc.crds.dev/github.com/straw-hat-team/provider-digitalocean).

## Developing

Run code-generation pipeline:
```console
go run cmd/generator/main.go "$PWD"
```

Run against a Kubernetes cluster:

```console
make run
```

Build, push, and install:

```console
make all
```

Build binary:

```console
make build
```
You can see the API reference [here](https://doc.crds.dev/github.com/crossplane-contrib/provider-upjet-digitalocean).

## Report a Bug

For filing bugs, suggesting improvements, or requesting new features, please
open an [issue](https://github.com/straw-hat-team/provider-digitalocean/issues).
open an [issue](https://github.com/crossplane-contrib/provider-upjet-digitalocean/issues).

## Completeness List

Expand Down
6 changes: 3 additions & 3 deletions apis/compute/v1alpha1/zz_droplet_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions apis/compute/v1alpha1/zz_generated.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions apis/database/v1alpha1/zz_cluster_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions apis/database/v1alpha1/zz_generated.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/database/v1alpha1/zz_replica_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/digitalocean/v1alpha1/zz_app_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/digitalocean/v1alpha1/zz_generated.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/droplet/v1alpha1/zz_generated.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/droplet/v1alpha1/zz_snapshot_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/monitor/v1alpha1/zz_alert_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/monitor/v1alpha1/zz_generated.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/networking/v1alpha1/zz_firewall_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/networking/v1alpha1/zz_generated.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/networking/v1alpha1/zz_ip_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/networking/v1alpha1/zz_ipassignment_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/networking/v1alpha1/zz_loadbalancer_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/volume/v1alpha1/zz_attachment_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/volume/v1alpha1/zz_generated.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ab67bb8

Please sign in to comment.