Skip to content

Commit e793b4b

Browse files
author
Guan Gui
committed
Add basic generated provider for CloudFlare Workers
1 parent f646fdd commit e793b4b

63 files changed

Lines changed: 3736 additions & 553 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
name: Bug Report
3-
about: Help us diagnose and fix bugs in Template Provider.
3+
about: Help us diagnose and fix bugs in Cloudflare Provider.
44
labels: bug
55
---
66
<!--
7-
Thank you for helping to improve Template Provider!
7+
Thank you for helping to improve Cloudflare Provider!
88
99
Please be sure to search for open issues before raising a new one. We use issues
1010
for bug reports and feature requests. Please find us at https://slack.crossplane.io
@@ -13,7 +13,7 @@ for questions, support, and discussion.
1313

1414
### What happened?
1515
<!--
16-
Please let us know what behaviour you expected and how Template Provider diverged from
16+
Please let us know what behaviour you expected and how Cloudflare Provider diverged from
1717
that behaviour.
1818
-->
1919

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
name: Feature Request
3-
about: Help us make Template Provider more useful
3+
about: Help us make Cloudflare Provider more useful
44
labels: enhancement
55
---
66
<!--
7-
Thank you for helping to improve Template Provider!
7+
Thank you for helping to improve Cloudflare Provider!
88
99
Please be sure to search for open issues before raising a new one. We use issues
1010
for bug reports and feature requests. Please find us at https://slack.crossplane.io
@@ -18,7 +18,7 @@ Leading with this context helps frame the feature request so we can ensure we
1818
implement it sensibly.
1919
--->
2020

21-
### How could Template Provider help solve your problem?
21+
### How could Cloudflare Provider help solve your problem?
2222
<!--
23-
Let us know how you think Template Provider could help with your use case.
23+
Let us know how you think Cloudflare Provider could help with your use case.
2424
-->

.golangci.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ run:
22
deadline: 10m
33

44
skip-files:
5-
- "zz_\\..+\\.go$"
5+
- "zz_\\..+\\.go$"
66

77
output:
88
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
@@ -38,7 +38,7 @@ linters-settings:
3838
goimports:
3939
# put imports beginning with prefix after 3rd-party packages;
4040
# it's a comma-separated list of prefixes
41-
local-prefixes: github.com/crossplane-contrib/provider-jet-template
41+
local-prefixes: github.com/guiguan/provider-jet-template
4242

4343
gocyclo:
4444
# minimal code complexity to report, 30 by default (but we recommend 10-20)
@@ -111,7 +111,7 @@ linters:
111111
- interfacer
112112
- goconst
113113
- goimports
114-
- gofmt # We enable this as well as goimports for its simplify mode.
114+
- gofmt # We enable this as well as goimports for its simplify mode.
115115
- prealloc
116116
- golint
117117
- unconvert
@@ -123,7 +123,6 @@ linters:
123123
- unused
124124
fast: false
125125

126-
127126
issues:
128127
# Excluding configuration per-path and per-linter
129128
exclude-rules:
@@ -136,7 +135,7 @@ issues:
136135
- gosec
137136
- scopelint
138137
- unparam
139-
138+
140139
# Ease some gocritic warnings on test files.
141140
- path: _test\.go
142141
text: "(unnamedResult|exitAfterDefer)"
@@ -148,31 +147,31 @@ issues:
148147
# rather than using a pointer.
149148
- text: "(hugeParam|rangeValCopy):"
150149
linters:
151-
- gocritic
150+
- gocritic
152151

153152
# This "TestMain should call os.Exit to set exit code" warning is not clever
154153
# enough to notice that we call a helper method that calls os.Exit.
155154
- text: "SA3000:"
156155
linters:
157-
- staticcheck
156+
- staticcheck
158157

159158
- text: "k8s.io/api/core/v1"
160159
linters:
161-
- goimports
160+
- goimports
162161

163162
# This is a "potential hardcoded credentials" warning. It's triggered by
164163
# any variable with 'secret' in the same, and thus hits a lot of false
165164
# positives in Kubernetes land where a Secret is an object type.
166165
- text: "G101:"
167166
linters:
168-
- gosec
169-
- gas
167+
- gosec
168+
- gas
170169

171170
# This is an 'errors unhandled' warning that duplicates errcheck.
172171
- text: "G104:"
173172
linters:
174-
- gosec
175-
- gas
173+
- gosec
174+
- gas
176175

177176
# Independently from option `exclude` we use default exclude patterns,
178177
# it can be disabled by this option. To list all

Makefile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# ====================================================================================
22
# Setup Project
33

4-
PROJECT_NAME := provider-jet-template
5-
PROJECT_REPO := github.com/crossplane-contrib/$(PROJECT_NAME)
4+
PROJECT_NAME := provider-jet-cloudflare
5+
PROJECT_REPO := github.com/guiguan/$(PROJECT_NAME)
66

77
export TERRAFORM_VERSION := 1.1.6
88

9-
export TERRAFORM_PROVIDER_SOURCE := hashicorp/null
10-
export TERRAFORM_PROVIDER_VERSION := 3.1.0
11-
export TERRAFORM_PROVIDER_DOWNLOAD_NAME := terraform-provider-null
12-
export TERRAFORM_PROVIDER_DOWNLOAD_URL_PREFIX := https://releases.hashicorp.com/terraform-provider-null/3.1.0
13-
export TERRAFORM_NATIVE_PROVIDER_BINARY := terraform-provider-null_v3.1.0_x5
9+
export TERRAFORM_PROVIDER_SOURCE := cloudflare/cloudflare
10+
export TERRAFORM_PROVIDER_VERSION := 3.19.0
11+
export TERRAFORM_PROVIDER_DOWNLOAD_NAME := terraform-provider-cloudflare
12+
export TERRAFORM_PROVIDER_DOWNLOAD_URL_PREFIX := https://releases.hashicorp.com/terraform-provider-cloudflare/$(TERRAFORM_PROVIDER_VERSION)
13+
export TERRAFORM_NATIVE_PROVIDER_BINARY := terraform-provider-cloudflare_v$(TERRAFORM_PROVIDER_VERSION)
1414

1515
PLATFORMS ?= linux_amd64 linux_arm64
1616

@@ -52,7 +52,7 @@ GO111MODULE = on
5252
# Setup Images
5353

5454
DOCKER_REGISTRY ?= crossplane
55-
IMAGES = provider-jet-template provider-jet-template-controller
55+
IMAGES = provider-jet-cloudflare provider-jet-cloudflare-controller
5656
-include build/makelib/image.mk
5757

5858
# ====================================================================================
@@ -148,4 +148,4 @@ crossplane.help:
148148

149149
help-special: crossplane.help
150150

151-
.PHONY: crossplane.help help-special
151+
.PHONY: crossplane.help help-special

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# Terrajet Template Provider
1+
# Terrajet Cloudflare Provider
22

3-
`provider-jet-template` is a [Crossplane](https://crossplane.io/) provider that
3+
`provider-jet-cloudflare` is a [Crossplane](https://crossplane.io/) provider that
44
is built using [Terrajet](https://github.com/crossplane/terrajet) code
55
generation tools and exposes XRM-conformant managed resources for the
6-
Template API.
6+
Cloudflare API.
77

88
## Getting Started
99

1010
Install the provider by using the following command after changing the image tag
11-
to the [latest release](https://github.com/crossplane-contrib/provider-jet-template/releases):
11+
to the [latest release](https://github.com/guiguan/provider-jet-cloudflare/releases):
1212
```
13-
kubectl crossplane install provider crossplane/provider-jet-template:v0.1.0
13+
kubectl crossplane install provider crossplane/provider-jet-cloudflare:v0.1.0
1414
```
1515

1616
Alternatively, you can use declarative installation:
@@ -20,7 +20,7 @@ kubectl apply -f examples/install.yaml
2020

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

23-
You can see the API reference [here](https://doc.crds.dev/github.com/crossplane-contrib/provider-jet-template).
23+
You can see the API reference [here](https://doc.crds.dev/github.com/guiguan/provider-jet-cloudflare).
2424

2525
## Developing
2626

@@ -50,7 +50,7 @@ make build
5050
## Report a Bug
5151

5252
For filing bugs, suggesting improvements, or requesting new features, please
53-
open an [issue](https://github.com/crossplane-contrib/provider-jet-template/issues).
53+
open an [issue](https://github.com/guiguan/provider-jet-cloudflare/issues).
5454

5555
## Contact
5656

@@ -64,17 +64,17 @@ Please use the following to reach members of the community:
6464

6565
## Governance and Owners
6666

67-
provider-jet-template is run according to the same
67+
provider-jet-cloudflare is run according to the same
6868
[Governance](https://github.com/crossplane/crossplane/blob/master/GOVERNANCE.md)
6969
and [Ownership](https://github.com/crossplane/crossplane/blob/master/OWNERS.md)
7070
structure as the core Crossplane project.
7171

7272
## Code of Conduct
7373

74-
provider-jet-template adheres to the same [Code of
74+
provider-jet-cloudflare adheres to the same [Code of
7575
Conduct](https://github.com/crossplane/crossplane/blob/master/CODE_OF_CONDUCT.md)
7676
as the core Crossplane project.
7777

7878
## Licensing
7979

80-
provider-jet-template is under the Apache 2.0 license.
80+
provider-jet-cloudflare is under the Apache 2.0 license.

apis/null/v1alpha1/zz_generated.deepcopy.go

Lines changed: 0 additions & 169 deletions
This file was deleted.

0 commit comments

Comments
 (0)