Skip to content

Commit

Permalink
feat: steps make submodules and make provider Cloudian
Browse files Browse the repository at this point in the history
  • Loading branch information
mariatsji committed Nov 20, 2024
1 parent 031eb4c commit bd22c63
Show file tree
Hide file tree
Showing 31 changed files with 66 additions and 765 deletions.
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ====================================================================================
# Setup Project
PROJECT_NAME := provider-template
PROJECT_NAME := provider-cloudian
PROJECT_REPO := github.com/crossplane/$(PROJECT_NAME)

PLATFORMS ?= linux_amd64 linux_arm64
Expand Down Expand Up @@ -30,7 +30,7 @@ GO111MODULE = on
# ====================================================================================
# Setup Images

IMAGES = provider-template
IMAGES = provider-cloudian
-include build/makelib/imagelight.mk

# ====================================================================================
Expand All @@ -40,12 +40,12 @@ XPKG_REG_ORGS ?= xpkg.upbound.io/crossplane
# NOTE(hasheddan): skip promoting on xpkg.upbound.io as channel tags are
# inferred.
XPKG_REG_ORGS_NO_PROMOTE ?= xpkg.upbound.io/crossplane
XPKGS = provider-template
XPKGS = provider-cloudian
-include build/makelib/xpkg.mk

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

fallthrough: submodules
@echo Initial setup complete. Running make again . . .
Expand Down Expand Up @@ -93,9 +93,9 @@ dev: $(KIND) $(KUBECTL)
@$(KUBECTL) cluster-info --context kind-$(PROJECT_NAME)-dev
@$(INFO) Installing Crossplane CRDs
@$(KUBECTL) apply --server-side -k https://github.com/crossplane/crossplane//cluster?ref=master
@$(INFO) Installing Provider Template CRDs
@$(INFO) Installing Provider Cloudian CRDs
@$(KUBECTL) apply -R -f package/crds
@$(INFO) Starting Provider Template controllers
@$(INFO) Starting Provider Cloudian controllers
@$(GO) run cmd/provider/main.go --debug

dev-clean: $(KIND) $(KUBECTL)
Expand All @@ -120,7 +120,7 @@ $(GOMPLATE):

export GOMPLATE

# This target prepares repo for your provider by replacing all "template"
# This target prepares repo for your provider by replacing all "cloudian"
# occurrences with your provider name.
# This target can only be run once, if you want to rerun for some reason,
# consider stashing/resetting your git state.
Expand Down
24 changes: 12 additions & 12 deletions PROVIDER_CHECKLIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ Generally projects are named `provider-<name>`, with `name` being the API being
managed. Example project names are `provider-aws`, `provider-kubernetes`,
and `provider-github`.

The [provider-template](https://github.com/crossplane/provider-template) repository can be
The [provider-cloudian](https://github.com/crossplane/provider-cloudian) repository can be
used as a starting point for new providers. For [terrajet](https://github.com/crossplane/terrajet)-based providers, the
[provider-jet-template](https://github.com/crossplane-contrib/provider-jet-template) is
[provider-jet-cloudian](https://github.com/crossplane-contrib/provider-jet-cloudian) is
available.

## Files
Expand All @@ -43,17 +43,17 @@ Most Crossplane providers include the following files:
[provider-gcp/README.md](https://github.com/crossplane/provider-gcp/blob/master/README.md)
as an example)
- [ ] Code is licensed under the [Apache 2.0
License](https://github.com/crossplane/provider-template/blob/main/LICENSE)
License](https://github.com/crossplane/provider-cloudian/blob/main/LICENSE)
- [ ] Include a “Developer Certificate of Origin”. Example:
[DCO](https://github.com/upbound/build/blob/master/DCO)
- [ ] Include the CNCF [Code of
Conduct](https://github.com/crossplane/crossplane/blob/master/CODE_OF_CONDUCT.md)
- [ ] Update
[OWNERS.md](https://github.com/crossplane/provider-template/blob/main/OWNERS.md)
[OWNERS.md](https://github.com/crossplane/provider-cloudian/blob/main/OWNERS.md)
with contacts for project Owners
- [ ] Ensure `hack/boilerplate.go.txt` (used in Code generation) includes
Crossplane Authors, Apache license and any other Copyright statements:
[https://github.com/crossplane/provider-template/blob/main/hack/boilerplate.go.txt](https://github.com/crossplane/provider-template/blob/main/hack/boilerplate.go.txt)
[https://github.com/crossplane/provider-cloudian/blob/main/hack/boilerplate.go.txt](https://github.com/crossplane/provider-cloudian/blob/main/hack/boilerplate.go.txt)
- [ ] Include Documentation on how to:
- [ ] Install Provider
- [ ] Contribute to Development
Expand All @@ -68,7 +68,7 @@ There are a number of build tools and processes that are common across the
Crossplane ecosystem. Using these ensures a consistent development environment
across projects.

The [provider-template](https://github.com/crossplane/provider-template)
The [provider-cloudian](https://github.com/crossplane/provider-cloudian)
repository contains most of these settings.

- [ ] Use the [Upbound build](https://github.com/upbound/build) submodule. (see
Expand All @@ -81,7 +81,7 @@ repository contains most of these settings.
- [ ] Create a [Crossplane
Package](https://crossplane.io/docs/master/concepts/packages.html)
configuration (see
[package/crossplane.yaml)](https://github.com/crossplane/provider-template/blob/main/package/crossplane.yaml)
[package/crossplane.yaml)](https://github.com/crossplane/provider-cloudian/blob/main/package/crossplane.yaml)

## Deployment of Artifacts

Expand All @@ -96,7 +96,7 @@ the publish and promotion workflows.
In general, providers should:

- [ ] Utilize GitHub workflows from
<https://github.com/crossplane/provider-template/tree/main/.github/workflows>
<https://github.com/crossplane/provider-cloudian/tree/main/.github/workflows>
- [ ] Create OCI image repos to push Package and Controller images.
- [ ] Automatically push Provider images and packages via CI
- [ ] Add GitHub Secrets to push to Docker repository. (To be performed by
Expand All @@ -112,7 +112,7 @@ to grant your project access to the GitHub org scoped secrets.

- [ ] Follow recommendations at
[https://github.com/crossplane/crossplane/blob/master/GOVERNANCE.md#repository-governance](https://github.com/crossplane/crossplane/blob/master/GOVERNANCE.md#repository-governance)
- [ ] Enable Issues on your project and configure Issue templates (examples at:
[.github/ISSUE_TEMPLATE](https://github.com/crossplane/provider-template/tree/master/.github/ISSUE_TEMPLATE))
- [ ] Create Pull Request Templates: (example:
[PULL_REQUEST_TEMPLATE.md](https://github.com/crossplane/provider-template/blob/master/.github/PULL_REQUEST_TEMPLATE.md))
- [ ] Enable Issues on your project and configure Issue cloudians (examples at:
[.github/ISSUE_TEMPLATE](https://github.com/crossplane/provider-cloudian/tree/master/.github/ISSUE_TEMPLATE))
- [ ] Create Pull Request Cloudians: (example:
[PULL_REQUEST_TEMPLATE.md](https://github.com/crossplane/provider-cloudian/blob/master/.github/PULL_REQUEST_TEMPLATE.md))
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# provider-template
# provider-cloudian

`provider-template` is a minimal [Crossplane](https://crossplane.io/) Provider
that is meant to be used as a template for implementing new Providers. It comes
`provider-cloudian` is a minimal [Crossplane](https://crossplane.io/) Provider
that is meant to be used as a cloudian for implementing new Providers. It comes
with the following features that are meant to be refactored:

- A `ProviderConfig` type that only points to a credentials `Secret`.
Expand All @@ -11,7 +11,7 @@ with the following features that are meant to be refactored:

## Developing

1. Use this repository as a template to create a new one.
1. Use this repository as a cloudian to create a new one.
1. Run `make submodules` to initialize the "build" Make submodule we use for CI/CD.
1. Rename the provider by running the following command:
```shell
Expand Down
8 changes: 4 additions & 4 deletions apis/template.go → apis/cloudian.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

// Package apis contains Kubernetes API for the Template provider.
// Package apis contains Kubernetes API for the Cloudian provider.
package apis

import (
"k8s.io/apimachinery/pkg/runtime"

samplev1alpha1 "github.com/crossplane/provider-template/apis/sample/v1alpha1"
templatev1alpha1 "github.com/crossplane/provider-template/apis/v1alpha1"
samplev1alpha1 "github.com/crossplane/provider-cloudian/apis/sample/v1alpha1"
cloudianv1alpha1 "github.com/crossplane/provider-cloudian/apis/v1alpha1"
)

func init() {
// Register the types with the Scheme so the components can map objects to GroupVersionKinds and back
AddToSchemes = append(AddToSchemes,
templatev1alpha1.SchemeBuilder.AddToScheme,
cloudianv1alpha1.SchemeBuilder.AddToScheme,
samplev1alpha1.SchemeBuilder.AddToScheme,
)
}
Expand Down
18 changes: 0 additions & 18 deletions apis/sample/sample.go

This file was deleted.

17 changes: 0 additions & 17 deletions apis/sample/v1alpha1/doc.go

This file was deleted.

40 changes: 0 additions & 40 deletions apis/sample/v1alpha1/groupversion_info.go

This file was deleted.

87 changes: 0 additions & 87 deletions apis/sample/v1alpha1/mytype_types.go

This file was deleted.

Loading

0 comments on commit bd22c63

Please sign in to comment.