Skip to content

Update providers (non AWS) from external-dns #743

@maksymvavilov

Description

@maksymvavilov

The AWS is here #742

Why

Separate from AWS as it moved to a new SDK version. The rest of the providers did not change much in external-dns. And we also changed them minimally.

What

Take the external-dns code and update dependencies. Then apply our changes:

GCP:

  1. Add a logger (logr.Logger) to the GoogleProvider struct, add context to the constructor (to init logger with context) and replace the old logger with the new one.
  2. Make the constructor consume the config (or ditch the config struct and pass params directly)
  3. Split NewGoogleProvider() into NewGoogleProvider() and NewGoogleProviderWithService()
  4. Get rid of the instrumented client we have it in the caller
  5. Add resourceREcordSetFromEndpoint() - needed for geo/weighted stuff that external-dns is missing
  6. The SoftError type. We will need to adjust accordingly.

Azure:

  1. Same logger stuff as above
  2. Export a bunch of stuff: AzureChangeMap, MapChanges(), RecordSetNameForZone(), NewRecordSet() and so on
  3. Add NewAzureProviderFromConfig(ctx, Config) - the external-dns seems to have it joined.
  4. Add TrafficManager client fields (will need to add this factory).
  5. Add CleanAzureError()
  6. Add provider.EnsureTrailingDot(target) for NS record targets
  7. The same SoftError decision as above.
  8. We use yaml.Unmarshal() for error
  9. We have more stuff in the config instead of passing them one by one to the constructor. Also simplyfies the getConfig() signature
  10. Use transporter from here.
  11. The external-dns added ResourceManagerAudience, ResourceManagerEndpoint for AzureStack to getCouldConfig() - decide whether to keep.

Inmemory:

  1. The same logger stuff
  2. Export stuff (like InMemoryClient)
  3. Add to InMemoryClient struct. Add RLock/RUnlock to read methods, Lock/Unlock to write methods
  4. Add DeleteZonne(), GetZone() and InMemoryWithClient()
  5. Add TXT validation
  6. Replace im.filter.Zones() with im.domain.Match() or update their filter
  7. Change domainFilter to interface version. They seemed to move to interface, but I can't see how that affects us.
  8. Use deep equal for targets in validateChangeBatch
  9. Ignore the "alreadyExists" error in InMemoryInitZones()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions