Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
skydjol committed Nov 28, 2023
1 parent 439bf10 commit 38aad1d
Show file tree
Hide file tree
Showing 50 changed files with 659 additions and 479 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ env:
# Common users. We can't run a step 'if secrets.XXX != ""' but we can run a
# step 'if env.XXX != ""', so we copy these to succinctly test whether
# credentials have been provided before trying to run steps that need them.
UPBOUND_MARKETPLACE_PUSH_ROBOT_USR: ${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_USR }}
REGISTRY_ORGS: ${{ secrets.REGISTRY_ORGS }}
XPKG_REG_ORGS: ${{ secrets.XPKG_REG_ORGS }}
XPKG_REG_ORGS_NO_PROMOTE: ${{ secrets.XPKG_REG_ORGS_NO_PROMOTE }}

jobs:
detect-noop:
Expand Down Expand Up @@ -256,13 +258,11 @@ jobs:
version: ${{ env.DOCKER_BUILDX_VERSION }}
install: true

- name: Login to Upbound
- name: Login to Docker.io
uses: docker/login-action@v2
if: env.UPBOUND_MARKETPLACE_PUSH_ROBOT_USR != ''
with:
registry: xpkg.upbound.io
username: ${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_USR }}
password: ${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_PSW }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 #v3
Expand Down
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/upbound/upjet-provider-template
local-prefixes: saagie.io/provider-mailgun

gocyclo:
# minimal code complexity to report, 30 by default (but we recommend 10-20)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [YEAR] Upbound Inc. All rights reserved.
Copyright 2023 Upbound Inc. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# ====================================================================================
# Setup Project

PROJECT_NAME ?= upjet-provider-template
PROJECT_REPO ?= github.com/upbound/$(PROJECT_NAME)
PROJECT_NAME ?= provider-mailgun
PROJECT_REPO ?= saagie.io/$(PROJECT_NAME)

export TERRAFORM_VERSION ?= 1.2.1

export TERRAFORM_PROVIDER_SOURCE ?= hashicorp/null
export TERRAFORM_PROVIDER_REPO ?= https://github.com/hashicorp/terraform-provider-null
export TERRAFORM_PROVIDER_VERSION ?= 3.1.0
export TERRAFORM_PROVIDER_DOWNLOAD_NAME ?= terraform-provider-null
export TERRAFORM_PROVIDER_SOURCE ?= wgebis/mailgun
export TERRAFORM_PROVIDER_REPO ?= https://github.com/wgebis/terraform-provider-mailgun
export TERRAFORM_PROVIDER_VERSION ?= 0.7.5
export TERRAFORM_PROVIDER_DOWNLOAD_NAME ?= terraform-provider-mailgun
export TERRAFORM_PROVIDER_DOWNLOAD_URL_PREFIX ?= https://releases.hashicorp.com/$(TERRAFORM_PROVIDER_DOWNLOAD_NAME)/$(TERRAFORM_PROVIDER_VERSION)
export TERRAFORM_NATIVE_PROVIDER_BINARY ?= terraform-provider-null_v3.1.0_x5
export TERRAFORM_NATIVE_PROVIDER_BINARY ?= terraform-provider-mailgun_v0.7.5_x5
export TERRAFORM_DOCS_PATH ?= docs/resources


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.upjet-provider-template: do.build.images
xpkg.build.provider-mailgun: 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 @@ -169,7 +169,7 @@ CROSSPLANE_NAMESPACE = upbound-system
# This target requires the following environment variables to be set:
# - UPTEST_EXAMPLE_LIST, a comma-separated list of examples to test
# To ensure the proper functioning of the end-to-end test resource pre-deletion hook, it is crucial to arrange your resources appropriately.
# You can check the basic implementation here: https://github.com/upbound/uptest/blob/main/internal/templates/01-delete.yaml.tmpl.
# You can check the basic implementation here: https://github.com/upbound/uptest/blob/main/internal/mailguns/01-delete.yaml.tmpl.
# - UPTEST_CLOUD_CREDENTIALS (optional), multiple sets of AWS IAM User credentials specified as key=value pairs.
# The support keys are currently `DEFAULT` and `PEER`. So, an example for the value of this env. variable is:
# DEFAULT='[default]
Expand Down
13 changes: 7 additions & 6 deletions OWNERS.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# OWNERS

This page lists all maintainers for **this** repository. Each repository in the [Upbound
organization](https://github.com/upbound/) will list their repository maintainers in their own
This page lists all maintainers for **this** repository. Each repository in the [Crossplane
organization](https://github.com/crossplane/) will list their repository maintainers in their own
`OWNERS.md` file.

Please see the Crossplane
[GOVERNANCE.md](https://github.com/crossplane/crossplane/blob/master/GOVERNANCE.md) for governance
guidelines and responsibilities for the steering committee and maintainers.

## Maintainers

* Alper Ulucinar <[email protected]> ([ulucinar](https://github.com/ulucinar))
* Sergen Yalcin <[email protected]> ([sergenyalcin](https://github.com/sergenyalcin))

See [CODEOWNERS](./CODEOWNERS) for automatic PR assignment.
* Maintainer 1 <[email protected]> ([maintainer1](https://github.com/maintainer1))
* Maintainer 2 <[email protected]> ([maintainer1](https://github.com/maintainer2))
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Provider Template
# Provider Mailgun

`upjet-provider-template` is a [Crossplane](https://crossplane.io/) provider that
`provider-mailgun` 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
Template API.
Mailgun 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/upbound/upjet-provider-template):
to the [latest release](https://marketplace.upbound.io/providers/saagie/provider-mailgun):
```
up ctp provider install upbound/upjet-provider-template:v0.1.0
up ctp provider install saagie/provider-mailgun:v0.1.0
```

Alternatively, you can use declarative installation:
Expand All @@ -19,15 +19,15 @@ cat <<EOF | kubectl apply -f -
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
name: upjet-provider-template
name: provider-mailgun
spec:
package: upbound/upjet-provider-template:v0.1.0
package: saagie/provider-mailgun: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/upbound/upjet-provider-template).
You can see the API reference [here](https://doc.crds.dev/saagie.io/provider-mailgun).

## Developing

Expand Down Expand Up @@ -57,4 +57,4 @@ make build
## Report a Bug

For filing bugs, suggesting improvements, or requesting new features, please
open an [issue](https://github.com/upbound/upjet-provider-template/issues).
open an [issue](https://saagie.io/provider-mailgun/issues).
126 changes: 126 additions & 0 deletions apis/credential/v1alpha1/zz_credential_types.go

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

Loading

0 comments on commit 38aad1d

Please sign in to comment.