Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NE-1323: Add default to AWS credentials field #199

Merged
merged 1 commit into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion api/v1beta1/externaldns_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ type ExternalDNSAWSProviderOptions struct {
// for more information.
//
// +kubebuilder:validation:Required
// +kubebuilder:default:={"name":""}
// +required
Credentials SecretReference `json:"credentials"`

Expand Down Expand Up @@ -491,7 +492,7 @@ const (
)

type ExternalDNSAWSAssumeRoleOptions struct {
// arn is an AWS role ARN that the ExternalDNS
// arn is an IAM role ARN that the ExternalDNS
// operator will assume when making DNS updates.
//
// +kubebuilder:validation:Required
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -576,11 +576,13 @@ spec:
updates.
properties:
arn:
description: arn is an AWS role ARN that the ExternalDNS
description: arn is an IAM role ARN that the ExternalDNS
operator will assume when making DNS updates.
type: string
type: object
credentials:
default:
name: ""
description: "Credentials is a reference to a secret containing
the following keys (with corresponding values): \n * aws_access_key_id
* aws_secret_access_key \n See https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/aws.md
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -578,11 +578,13 @@ spec:
updates.
properties:
arn:
description: arn is an AWS role ARN that the ExternalDNS
description: arn is an IAM role ARN that the ExternalDNS
operator will assume when making DNS updates.
type: string
type: object
credentials:
default:
name: ""
description: "Credentials is a reference to a secret containing
the following keys (with corresponding values): \n * aws_access_key_id
* aws_secret_access_key \n See https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/aws.md
Expand Down
19 changes: 0 additions & 19 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,25 +82,6 @@ spec:
- '{{.Name}}.mydomain.net'
```

**Note**: Due to a limitation of the `v1beta1` API requiring the `credentials` field, OpenShift users will be required
to provide an empty (`""`) credentials field. The empty credentials will be ignored and the secret provided by
OpenShift's Cloud Credentials Operator will be used:

```yaml
apiVersion: externaldns.olm.openshift.io/v1beta1
kind: ExternalDNS
metadata:
name: aws-example
spec:
provider:
type: AWS
aws:
credentials:
name: "" # Empty Credentials
assumeRole:
arn: arn:aws:iam::123456789012:role/role-name # Replace with the desire Role ARN
```

## GovCloud
The operator makes the assumption that `ExternalDNS` instances which target GovCloud DNS also run on the GovCloud. This is needed to detect the AWS region.
As for the rest: the usage is exactly the same as for `AWS`.
Expand Down