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

Add Gandi provider #2037

Merged
merged 3 commits into from
Jun 23, 2021
Merged

Conversation

packi
Copy link
Contributor

@packi packi commented Apr 4, 2021

Description

This adds support for domains/zones managed using Gandi LiveDNS using the go-gandi/go-gandi library.

The library has some internal structs that it's using as return values, that makes the mocking a bit cumbersome. I've opended-up a pull-request for that (go-gandi/go-gandi#18).

In the documentation I'm not sure to which release to refer to as the minimal requirement. I've referenced the, as of yet, non-existing release 0.7.7.

Fixes #789

Checklist

  • Unit tests updated
  • End user documentation updated

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 4, 2021
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Apr 4, 2021
@seanmalloy
Copy link
Member

/kind feature

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 13, 2021
Copy link
Member

@njuettner njuettner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding Gandi as new provider, I've only some small nits nothing biggie. As soon as we got this out of the way, I'm happy to merge it ❤️

g := gandi.Config{
SharingID: sharingID,
Debug: false,
// dry-run doesn't work but it won't hurt passing the flag
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this confuses me 😆 , why is the dry-run not working?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently it's only for payment related functions which we're not using at all. The parameter-name is a bit misleading...

}

// StandardResponse copied from go-gandi/internal/gandi.go
type StandardResponse struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest to lower-case all structs, this should only used withing the provider gandi, no need to expose it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah neat, learning something new every time I use go ;)

}

// StandardError copied from go-gandi/internal/gandi.go
type StandardError struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

{
FQDN: "example.com",
FQDNUnicode: "example.com",
Href: "https://api.gandi.net/v5/domain/domains/example.com",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest adding this as a const or something, so in case the version gets updates, you don't need to update on each line 🙂

@packi
Copy link
Contributor Author

packi commented May 3, 2021

Feedback implemented, let me know if I need to rebase the branch or if I should stash the commits.

@packi packi requested a review from njuettner May 3, 2021 18:23
Copy link
Member

@njuettner njuettner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I don't want to block this anymore. Thank you @packi for being so patient 🙏🏻 .
I'll merge it now. We only need to create a follow PR to adjust the external-dns version, this needs to be updated it should be >=0.8.0. Gandi should be in v0.9.0

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 23, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: njuettner, packi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 23, 2021
@k8s-ci-robot k8s-ci-robot merged commit 3b98597 into kubernetes-sigs:master Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: support for Gandi DNS
4 participants