Documentation ¶
Index ¶
- Constants
- Variables
- func FilterKeysWithoutPrefix(object map[string]string, prefix string) map[string]string
- func FilterMap(originalMap map[string]string, substring string) map[string]string
- func GenerateRecordName(hostname, suffix string) string
- func GenerateResourceName(hostname, suffix string) string
- func GenerateSecretName(resourceName string) string
- func GetDNSConfig(ctx context.Context, k8sClient client.Client) (map[string]string, error)
- func GetDNSRecordFromConfig(dnsConfig map[string]string) (string, error)
- func GetIssuerNameFromConfig(dnsConfig map[string]string) (string, error)
- func GetListOptions(set labels.Set) client.ListOptions
- func GetXPProviderFromConfig(dnsConfig map[string]string) (string, error)
- func GetZoneFromConfig(dnsConfig map[string]string) (string, error)
- func IsCustomHostnameSet(hostname string) bool
- func IsDNSRecordAvailable(ctx context.Context, k8sClient client.Client, name, namespace string) (bool, error)
- func IsOnOpenshift(config *rest.Config) (bool, error)
- func MergeMaps(m1 map[string]string, m2 map[string]string) map[string]string
- func TruncateCommonName(s string) string
Constants ¶
const ( CappNS = "capp-operator-system" CappKey = "capp" )
Variables ¶
var ( CappAPIGroup = cappv1alpha1.GroupVersion.Group CappNamespaceKey = CappAPIGroup + "/parent-capp-ns" CappResourceKey = CappAPIGroup + "/parent-capp" ManagedByLabelKey = CappAPIGroup + "/managed-by" )
Functions ¶
func FilterKeysWithoutPrefix ¶
FilterKeysWithoutPrefix removes keys from a map if they don't start with a given prefix
func FilterMap ¶
FilterMap returns a new map containing only the key-value pairs where the key contains the specified substring.
func GenerateRecordName ¶ added in v0.3.0
GenerateRecordName generates the hostname based on the provided suffix and a dot(".") trailing character. It returns the original hostname with the suffix removed if it was present, otherwise the original hostname.
func GenerateResourceName ¶ added in v0.3.0
GenerateResourceName generates the hostname based on the provided suffix and a dot(".") trailing character. If the hostname does not already end with the suffix (minus the trailing dot), it appends the suffix to the hostname.
func GenerateSecretName ¶ added in v0.3.0
GenerateSecretName generates TLS secret name for certificate and domain mapping.
func GetDNSConfig ¶ added in v0.3.0
GetDNSConfig returns the data of the DNS ConfigMap.
func GetDNSRecordFromConfig ¶ added in v0.3.0
GetDNSRecordFromConfig returns the DNSRecord to be used for the record from a ConfigMap.
func GetIssuerNameFromConfig ¶ added in v0.3.3
GetIssuerNameFromConfig returns the name of the Certificate Issuer to be used for the Certificate from a ConfigMap.
func GetListOptions ¶ added in v0.3.0
func GetListOptions(set labels.Set) client.ListOptions
GetListOptions returns a list option object from a given Set.
func GetXPProviderFromConfig ¶ added in v0.3.3
GetXPProviderFromConfig returns the Crossplane provider to be used for the record from a ConfigMap.
func GetZoneFromConfig ¶ added in v0.3.0
GetZoneFromConfig returns the zone to be used for the record from a ConfigMap.
func IsCustomHostnameSet ¶ added in v0.3.2
IsCustomHostnameSet returns a boolean indicating whether a custom hostname is set.
func IsDNSRecordAvailable ¶ added in v0.3.0
func IsDNSRecordAvailable(ctx context.Context, k8sClient client.Client, name, namespace string) (bool, error)
IsDNSRecordAvailable returns a boolean indicating whether a CNAMERecord is currently available.
func IsOnOpenshift ¶
IsOnOpenshift returns true if the cluster has the openshift config group
func MergeMaps ¶
MergeMaps merges two string-string maps by combining their key-value pairs into a new map.
func TruncateCommonName ¶ added in v0.3.3
TruncateCommonName truncates the CommonName string to be no longer than 64 characters.
Types ¶
This section is empty.