failover

package
v0.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TXTRecord format is kuadrant-active-groups.<domain>
	TXTRecordPrefix        = "kuadrant-active-groups."
	GroupSeparator         = "&&"
	TXTRecordVersion       = "1"
	TXTRecordKeysSeparator = ";"
	TXTRecordGroupKey      = "groups"

	GroupRecordTTL = 60
)

Variables

View Source
var AddActiveGroupCMD = &cobra.Command{
	Use:   "add-active-group <groupName> --providerRef <namespace>/<name> --domain <domain>",
	RunE:  addActiveGroup,
	Short: "add group to active groups",
	Long: "Will ensure existence of a TXT record of active groups for provided host. Also will ensure provided group name" +
		"is an active group for tat domain. This action will trigger publishing of all records associated with the group",
	Args: cobra.ExactArgs(1),
}
View Source
var GetActiveGroupsCMD = &cobra.Command{
	Use:   "get-active-groups --providerRef <namespace>/<name> --domain <domain>",
	RunE:  getActiveGroups,
	Short: "list active groups",
	Long:  "Will list all active groups for provided domain. Groups will be grouped by the HostedZone they belong to",
}
View Source
var RemoveActiveGroupCMD = &cobra.Command{
	Use:   "remove-active-group <groupName> --providerRef <namespace>/<name> --domain <domain>",
	RunE:  removeActiveGroup,
	Short: "removes group from active groups",
	Long:  "Will remove group from active groups. If this was the last group will remove the TXT record",
	Args:  cobra.ExactArgs(1),
}

Functions

func EnsureGroupIsActive

func EnsureGroupIsActive(groupName string, existingRecord *endpoint.Endpoint) *endpoint.Endpoint

func GenerateGroupTXTRecord

func GenerateGroupTXTRecord(domain string, groups ...string) *endpoint.Endpoint

func GetActiveGroupsFromTarget

func GetActiveGroupsFromTarget(target string) ([]string, bool)

GetActiveGroupsFromTarget returns a list of active groups from the endpoint target and a boolean indication that it is a current version

func GetDomainRegexp

func GetDomainRegexp(domain string) (*regexp.Regexp, error)

GetDomainRegexp creates regexp to filter zones example.com will become ^example.com$ for an exact match *.example.com will become ^.*example.com$ to search using wildcard domain

func RemoveGroupFromActiveGroups

func RemoveGroupFromActiveGroups(group string, existingRecord *endpoint.Endpoint) *endpoint.Endpoint

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL