Skip to content

Commit

Permalink
WIP: Proof of concept for Shared VPC support
Browse files Browse the repository at this point in the history
  • Loading branch information
gcs278 committed Jun 26, 2023
1 parent 0cd8bee commit 842551b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/v1beta1/externaldns_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ type ExternalDNSSpec struct {
// +kubebuilder:validation:Optional
// +optional
Zones []string `json:"zones,omitempty"`

// AWSRoleARN is a string
// +kubebuilder:validation:Optional
// +optional
AWSRoleARN *string `json:"awsRoleARN,omitempty"`
}

// ExternalDNSDomain describes how sets of included
Expand Down
5 changes: 5 additions & 0 deletions api/v1beta1/zz_generated.deepcopy.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,9 @@ spec:
description: spec is the specification of the desired behavior of the
ExternalDNS.
properties:
awsRoleARN:
description: AWSRoleARN is a string
type: string
domains:
description: "Domains specifies which domains that ExternalDNS should
create DNS records for. Multiple domain values can be specified
Expand Down
4 changes: 4 additions & 0 deletions pkg/operator/controller/externaldns/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ func (b *externalDNSContainerBuilder) fillProviderAgnosticFields(seq int, zone s
args = append(args, "--ignore-hostname-annotation")
}

if b.externalDNS.Spec.AWSRoleARN != nil {
args = append(args, fmt.Sprintf("--aws-assume-role=%s", *b.externalDNS.Spec.AWSRoleARN))
}

if len(b.externalDNS.Spec.Source.FQDNTemplate) > 0 {
args = append(args, fmt.Sprintf("--fqdn-template=%s", strings.Join(b.externalDNS.Spec.Source.FQDNTemplate, ",")))
} else {
Expand Down

0 comments on commit 842551b

Please sign in to comment.