Skip to content

Commit

Permalink
resolved review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
humoflife committed Mar 5, 2024
1 parent bf3f9fe commit 490aeb4
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 103 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ 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.
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
DATADOG_APP_KEY: ${{ secrets.DATADOG_APP_KEY }}
UPBOUND_MARKETPLACE_PUSH_ROBOT_USR: ${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_USR }}

jobs:
Expand Down
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,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/datadogs/01-delete.yaml.tmpl.
# You can check the basic implementation here: https://github.com/upbound/uptest/blob/main/internal/templates/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 Expand Up @@ -235,10 +235,6 @@ endef
# binary will try to use CROSSPLANE_HELP if it is set, and this is for something different.
export CROSSPLANE_MAKE_HELP

gen-clean:
@find . -name "zz_*.go"|xargs rm
@rm -rf ./examples-generated/*

crossplane.help:
@echo "$$CROSSPLANE_MAKE_HELP"

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ You can see the API reference [here](https://doc.crds.dev/github.com/upbound/pro
Run code-generation pipeline:

```console
make clean; make gen-clean; make generate
make clean; make generate
```

Run against a Kubernetes cluster:
Expand Down
49 changes: 0 additions & 49 deletions apis/v1beta1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,55 +11,6 @@ import (

// A ProviderConfigSpec defines the desired state of a ProviderConfig.
type ProviderConfigSpec struct {
// (String, Sensitive) (Required unless validate is false) Datadog API key.
// This can also be set via the DD_API_KEY environment variable.
// +optional
APIKey string `json:"api_key,omitempty"`

// (String) The API URL. This can also be set via the DD_HOST environment
// variable. Note that this URL must not end with the /api/ path. For
// example, https://api.datadoghq.com/ is a correct value, while
// https://api.datadoghq.com/api/ is not. And if you're working with
// "EU" version of Datadog, use https://api.datadoghq.eu/. Other Datadog
// region examples: https://api.us5.datadoghq.com/,
// https://api.us3.datadoghq.com/ and https://api.ddog-gov.com/.
// See https://docs.datadoghq.com/getting_started/site/ for all available
// regions.
// +optional
APIUrl string `json:"api_url,omitempty"`

// (String, Sensitive) (Required unless validate is false) Datadog APP key.
// This can also be set via the DD_APP_KEY environment variable.
// +optional
AppKey string `json:"app_key,omitempty"`

// (Number) The HTTP request retry back off base. Defaults to 2.
// +optional
HTTPClientRetryBackoffBase int `json:"http_client_retry_backoff_base,omitempty"`

// (Number) The HTTP request retry back off multiplier. Defaults to 2.
// +optional
HTTPClientRetryBackoffMultiplier int `json:"http_client_retry_backoff_multiplier,omitempty"`

// (String) Enables request retries on HTTP status codes 429 and 5xx.
// Valid values are [true, false]. Defaults to true.
// +optional
HTTPClientRetryEnabled string `json:"http_client_retry_enabled,omitempty"`

// (Number) The HTTP request maximum retry number. Defaults to 3.
// +optional
HTTPClientRetryMaxRetries int `json:"http_client_retry_max_retries,omitempty"`

// (Number) The HTTP request retry timeout period. Defaults to 60 seconds.
// +optional
HTTPClientRetryTimeout int `json:"http_client_retry_timeout,omitempty"`

// (String) Enables validation of the provided API key during provider
// initialization. Valid values are [true, false]. Default is true.
// When false, api_key won't be checked.
// +optional
Validate string `json:"validate,omitempty"`

// Credentials required to authenticate to this provider.
// +optional
Credentials ProviderCredentials `json:"credentials"`
Expand Down
2 changes: 1 addition & 1 deletion cluster/images/provider-datadog/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.17.1
FROM alpine:3.17.7
RUN apk --no-cache add ca-certificates bash

ARG TARGETOS
Expand Down
45 changes: 0 additions & 45 deletions package/crds/datadog.upbound.io_providerconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,26 +46,6 @@ spec:
spec:
description: A ProviderConfigSpec defines the desired state of a ProviderConfig.
properties:
api_key:
description: (String, Sensitive) (Required unless validate is false)
Datadog API key. This can also be set via the DD_API_KEY environment
variable.
type: string
api_url:
description: '(String) The API URL. This can also be set via the DD_HOST
environment variable. Note that this URL must not end with the /api/
path. For example, https://api.datadoghq.com/ is a correct value,
while https://api.datadoghq.com/api/ is not. And if you''re working
with "EU" version of Datadog, use https://api.datadoghq.eu/. Other
Datadog region examples: https://api.us5.datadoghq.com/, https://api.us3.datadoghq.com/
and https://api.ddog-gov.com/. See https://docs.datadoghq.com/getting_started/site/
for all available regions.'
type: string
app_key:
description: (String, Sensitive) (Required unless validate is false)
Datadog APP key. This can also be set via the DD_APP_KEY environment
variable.
type: string
credentials:
description: Credentials required to authenticate to this provider.
properties:
Expand Down Expand Up @@ -119,31 +99,6 @@ spec:
required:
- source
type: object
http_client_retry_backoff_base:
description: (Number) The HTTP request retry back off base. Defaults
to 2.
type: integer
http_client_retry_backoff_multiplier:
description: (Number) The HTTP request retry back off multiplier.
Defaults to 2.
type: integer
http_client_retry_enabled:
description: (String) Enables request retries on HTTP status codes
429 and 5xx. Valid values are [true, false]. Defaults to true.
type: string
http_client_retry_max_retries:
description: (Number) The HTTP request maximum retry number. Defaults
to 3.
type: integer
http_client_retry_timeout:
description: (Number) The HTTP request retry timeout period. Defaults
to 60 seconds.
type: integer
validate:
description: (String) Enables validation of the provided API key during
provider initialization. Valid values are [true, false]. Default
is true. When false, api_key won't be checked.
type: string
type: object
status:
description: A ProviderConfigStatus reflects the observed state of a ProviderConfig.
Expand Down

0 comments on commit 490aeb4

Please sign in to comment.