Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager) error

    Add creates a new DNSZone Controller and adds it to the Manager with default RBAC. The Manager will set fields on the Controller and Start it when the Manager is Started.

    Types

    type AWSActuator

    type AWSActuator struct {
    	// contains filtered or unexported fields
    }

      AWSActuator manages getting the desired state, getting the current state and reconciling the two.

      func NewAWSActuator

      func NewAWSActuator(
      	logger log.FieldLogger,
      	secret *corev1.Secret,
      	dnsZone *hivev1.DNSZone,
      	awsClientBuilder awsClientBuilderType,
      ) (*AWSActuator, error)

        NewAWSActuator creates a new AWSActuator object. A new AWSActuator is expected to be created for each controller sync.

        func (*AWSActuator) Create

        func (a *AWSActuator) Create() error

          Create makes an AWS Route53 hosted zone given the DNSZone object.

          func (*AWSActuator) Delete

          func (a *AWSActuator) Delete() error

            Delete removes an AWS Route53 hosted zone, typically because the DNSZone object is in a deleting state.

            func (*AWSActuator) Exists

            func (a *AWSActuator) Exists() (bool, error)

              Exists determines if the route53 hosted zone corresponding to the DNSZone exists

              func (*AWSActuator) GetNameServers

              func (a *AWSActuator) GetNameServers() ([]string, error)

                GetNameServers returns the nameservers listed in the route53 hosted zone NS record.

                func (*AWSActuator) ModifyStatus

                func (a *AWSActuator) ModifyStatus() error

                  ModifyStatus updates the DnsZone's status with AWS specific information.

                  func (*AWSActuator) Refresh

                  func (a *AWSActuator) Refresh() error

                    Refresh gets the AWS object for the zone. If a zone cannot be found or no longer exists, actuator.zoneID remains unset.

                    func (*AWSActuator) UpdateMetadata

                    func (a *AWSActuator) UpdateMetadata() error

                      UpdateMetadata ensures that the Route53 hosted zone metadata is current with the DNSZone

                      type Actuator

                      type Actuator interface {
                      	// Create tells the actuator to make a zone in the dns provider.
                      	Create() error
                      
                      	// Delete tells the actuator to remove the zone from the dns provider.
                      	Delete() error
                      
                      	// Exists queries if the zone is in the dns provider.
                      	Exists() (bool, error)
                      
                      	// UpdateMetadata tells the actuator to update the zone's metadata in the dns provider.
                      	UpdateMetadata() error
                      
                      	// ModifyStatus allows the actuator to modify the kube DnsZoneStatus object before it is committed to kube.
                      	ModifyStatus() error
                      
                      	// GetNameServers returns a list of nameservers that service the zone in the dns provider.
                      	GetNameServers() ([]string, error)
                      
                      	// Refresh signals to the actuator that it should get the latest version of the zone from the dns provider.
                      	// Refresh MUST be called before any other function is called by the actuator.
                      	Refresh() error
                      }

                        Actuator interface is the interface that is used to add dns provider support to the dnszone controller.

                        type GCPActuator

                        type GCPActuator struct {
                        	// contains filtered or unexported fields
                        }

                          GCPActuator attempts to make the current state reflect the given desired state.

                          func NewGCPActuator

                          func NewGCPActuator(
                          	logger log.FieldLogger,
                          	secret *corev1.Secret,
                          	dnsZone *hivev1.DNSZone,
                          	gcpClientBuilder gcpClientBuilderType,
                          ) (*GCPActuator, error)

                            NewGCPActuator creates a new GCPActuator object. A new GCPActuator is expected to be created for each controller sync.

                            func (*GCPActuator) Create

                            func (a *GCPActuator) Create() error

                              Create implements the Create call of the actuator interface

                              func (*GCPActuator) Delete

                              func (a *GCPActuator) Delete() error

                                Delete implements the Delete call of the actuator interface

                                func (*GCPActuator) Exists

                                func (a *GCPActuator) Exists() (bool, error)

                                  Exists implements the Exists call of the actuator interface

                                  func (*GCPActuator) GetNameServers

                                  func (a *GCPActuator) GetNameServers() ([]string, error)

                                    GetNameServers implements the GetNameServers call of the actuator interface

                                    func (*GCPActuator) ModifyStatus

                                    func (a *GCPActuator) ModifyStatus() error

                                      ModifyStatus implements the ModifyStatus call of the actuator interface

                                      func (*GCPActuator) Refresh

                                      func (a *GCPActuator) Refresh() error

                                        Refresh implements the Refresh call of the actuator interface

                                        func (*GCPActuator) UpdateMetadata

                                        func (a *GCPActuator) UpdateMetadata() error

                                          UpdateMetadata implements the UpdateMetadata call of the actuator interface

                                          type ReconcileDNSZone

                                          type ReconcileDNSZone struct {
                                          	client.Client
                                          	// contains filtered or unexported fields
                                          }

                                            ReconcileDNSZone reconciles a DNSZone object

                                            func (*ReconcileDNSZone) Reconcile

                                            func (r *ReconcileDNSZone) Reconcile(request reconcile.Request) (reconcile.Result, error)

                                              Reconcile reads that state of the cluster for a DNSZone object and makes changes based on the state read and what is in the DNSZone.Spec