Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Use DNSProvider secret ref in DNSPolicy #406

Closed
mikenairn opened this issue Aug 4, 2023 · 4 comments
Closed

Use DNSProvider secret ref in DNSPolicy #406

mikenairn opened this issue Aug 4, 2023 · 4 comments
Assignees
Milestone

Comments

@mikenairn
Copy link
Member

mikenairn commented Aug 4, 2023

Could alternately be be called "Remove ManagedZones API" but we might not want to do that. We do however want to remove the lookup of ManagedZones during the processing of Gateway listeners in favour of matching up hostnames to zones currently accessible in the configured dns provider.

Related Investigation task: #382
POC removing ManagedZones: mikenairn@3aa68f8

What

Remove the requirement for a ManagedZone to be configured for a host in order for the DNSPolicy to create dns records for it.

How

Replace the logic where we try and find a matching zone by looking up ManagedZones in favour of just listing zones in the currently configured dns Provider.

  • DNSProvider secrets
    • Allow provider credentials to be added as per provider requirements (Already done for MZs)
    • Add prvider config to be added to secrets such as zoneIDilter to limit what zones we want to work with from
  • Update DNSPolicy
    • Add provider.secrefRef in order to attach provider credentials directly
  • Update DNSRecord
    • Add provider field. Copied from the dnspolicy when it creates records.
    • Add zoneId field, the zone id selected to publish into. (This shouldn't change during dnspolicy reconcile after initial selection)
  • Remove ManagedZone API and controller (TBD, we might decide to leave it as standalone API).
  • Add ZoneList to provider interface, needs implemented in each provider.
  • Update dnsrecord_controller to load provider from it's own spec.
  • Update dnspolicy_dnsrecords to find a suitable zone by listing zones available from the provider.

Examples:

Secret:

data:
   <credentials>
   config:
      zoneIDFilter:
        - Z04114632NOABXYWH93QUl

DNSPolicy:

apiVersion: kuadrant.io/v1alpha1
kind: DNSPolicy
metadata:
  name: prod-web
  namespace: multi-cluster-gateways
spec:
  targetRef:
    name: prod-web
    group: gateway.networking.k8s.io
    kind: Gateway
  providerRef:
      name: mgc-aws-credentials
      namespace: multi-cluster-gateways

DNSRecord:

apiVersion: kuadrant.io/v1alpha1
kind: DNSRecord
metadata:
  name: myapp.mn.hcpapps.net
  namespace: multi-cluster-gateways
spec:
  providerRef:
      name: mgc-aws-credentials
      namespace: multi-cluster-gateways
  zoneId: Z04114632NOABXYWH93QU
  endpoints:
  - dnsName: test1.myapp.mn.hcpapps.net
    recordTTL: 60
    recordType: A
    targets:
    - 172.32.200.0
@maleck13 maleck13 changed the title Lookup zones from provider instead of ManagedZones Use DNSProvider secret ref in DNSPolicy Sep 26, 2023
@mikenairn mikenairn self-assigned this Oct 18, 2023
@mikenairn mikenairn moved this from Todo to In Progress in Multicluster Gateway Controller Oct 18, 2023
@maleck13 maleck13 moved this to In Progress in Kuadrant Nov 17, 2023
@maleck13 maleck13 added this to the v0.3.0 milestone Nov 17, 2023
@mikenairn mikenairn moved this from In Progress to Review in Multicluster Gateway Controller Dec 6, 2023
@maleck13
Copy link
Contributor

#636

@maleck13 maleck13 removed this from the v0.3.0 milestone Dec 11, 2023
@alexsnaps alexsnaps added this to the v0.4.0 milestone Dec 18, 2023
@philbrookes
Copy link
Contributor

This issue is stale because it has been open for 60 days with no activity.

@philbrookes
Copy link
Contributor

This issue is stale because it has been open for 60 days with no activity.

@philbrookes
Copy link
Contributor

This issue was closed because it has been inactive for 30 days since being marked as stale.

@github-project-automation github-project-automation bot moved this from In Progress to Done in Kuadrant May 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: Done
Status: Review
Development

No branches or pull requests

4 participants