Documentation ¶
Overview ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func CreateRndcKeySecret() (string, error)
- func DbSyncJob(instance *designatev1beta1.Designate, labels map[string]string, ...) *batchv1.Job
- func GeneratePoolsYamlData(BindMap, MdnsMap, NsRecordsMap map[string]string) (string, error)
- func GetInitVolumeMounts() []corev1.VolumeMount
- func GetNextIP(predParams *NADIpam, allocatedIPs map[string]bool) (string, error)
- func GetOwningDesignateName(instance client.Object) string
- func GetScriptConfigMapName(crName string) string
- func GetServiceConfigConfigMapName(crName string) string
- func GetVolumeMounts(serviceName string) []corev1.VolumeMount
- func GetVolumes(baseConfigMapName string) []corev1.Volume
- func InitContainer(init APIDetails) []corev1.Container
- type APIDetails
- type CatalogZone
- type Database
- type DatabaseStatus
- type Master
- type MessageBus
- type MessageBusStatus
- type NADConfig
- type NADIpam
- type NSRecord
- type Nameserver
- type NetworkParameters
- type Options
- type Pool
- type Target
Constants ¶
const ( // KollaServiceCommand - the command to start the service binary in the kolla container KollaServiceCommand = "/usr/local/bin/kolla_set_configs && /usr/local/bin/kolla_start" // DesignateDatabaseName - the name of the DB to store tha API schema DesignateDatabaseName = "designate" )
const ( // ServiceType - ServiceType = "dns" // ServiceName - ServiceName = "designate" // DatabaseName - DatabaseName = "designate" // DatabaseCRName - Name of the MariaDBDatabase CR DatabaseCRName = "designate" // DatabaseUsernamePrefix - used by EnsureMariaDBAccount when a new username // is to be generated, e.g. "designate_e5a4", "designate_78bc", etc DatabaseUsernamePrefix = "designate" // DesignatePublicPort - DesignatePublicPort int32 = 9001 // DesignateInternalPort - DesignateInternalPort int32 = 9001 DesignateBindKeySecret = "designate-bind-secret" DesignateRndcKey = "rndc-key" MdnsPredIPConfigMap = "designate-mdns-ip-map" NsRecordsConfigMap = "designate-ns-records-params" BindPredIPConfigMap = "designate-bind-ip-map" RndcConfDir = "/etc/designate/rndc-keys" PoolsYamlsConfigMap = "designate-pools-yaml-config-map" PoolsYamlPath = "templates/designatepoolmanager/config/pools.yaml.tmpl" PoolsYamlHash = "pools-yaml-hash" )
const (
// BindProvPredictablePoolSize -
BindProvPredictablePoolSize = 25
)
const (
// DBSyncCommand -
DBSyncCommand = "/usr/local/bin/kolla_set_configs && /usr/local/bin/kolla_start"
)
const (
// InitContainerCommand -
InitContainerCommand = "/usr/local/bin/container-scripts/init.sh"
)
const (
MinPasswordSize = 25
)
Variables ¶
This section is empty.
Functions ¶
func DbSyncJob ¶
func DbSyncJob( instance *designatev1beta1.Designate, labels map[string]string, annotations map[string]string, ) *batchv1.Job
DbSyncJob func
func GeneratePoolsYamlData ¶
func GetInitVolumeMounts ¶
func GetInitVolumeMounts() []corev1.VolumeMount
GetInitVolumeMounts - Designate Control Plane init task VolumeMounts
func GetOwningDesignateName ¶
GetOwningDesignateName - Given a Designate-->API,Central,Worker,Mdns,Producer object, returning the parent Designate object that created it (if any)
func GetScriptConfigMapName ¶
GetScriptConfigMapName returns the name of the ConfigMap used for the config merger and the service init scripts
func GetServiceConfigConfigMapName ¶
GetServiceConfigConfigMapName returns the name of the ConfigMap used to store the service configuration files
func GetVolumeMounts ¶
func GetVolumeMounts(serviceName string) []corev1.VolumeMount
GetVolumeMounts - VolumeMounts to get access to the merged configuration
func GetVolumes ¶
GetVolumes - returns the volumes used for the service deployment and for any jobs needs access for the full service configuration
func InitContainer ¶
func InitContainer(init APIDetails) []corev1.Container
InitContainer - init container for designate api pods
Types ¶
type APIDetails ¶
type APIDetails struct { ContainerImage string DatabaseHost string DatabaseName string OSPSecret string TransportURLSecret string UserPasswordSelector string VolumeMounts []corev1.VolumeMount Privileged bool }
APIDetails information
type CatalogZone ¶
type Database ¶
type Database struct { Database *mariadbv1.Database Status DatabaseStatus }
Database -
type DatabaseStatus ¶
type DatabaseStatus int
DatabaseStatus -
const ( // DBFailed - DBFailed DatabaseStatus = iota // DBCreating - DBCreating DatabaseStatus = iota // DBCompleted - DBCompleted DatabaseStatus = iota )
type MessageBusStatus ¶
type MessageBusStatus int
MessageBusStatus -
const ( // MQFailed - MQFailed MessageBusStatus = iota // MQCreating - MQCreating MessageBusStatus = iota // MQCompleted - MQCompleted MessageBusStatus = iota )
type NADConfig ¶
type NADConfig struct {
IPAM NADIpam `json:"ipam"`
}
NADConfig - IPAM parameters of the NAD
func GetNADConfig ¶
func GetNADConfig( nad *networkv1.NetworkAttachmentDefinition, ) (*NADConfig, error)
type NADIpam ¶
type NADIpam struct { CIDR netip.Prefix `json:"range"` RangeStart netip.Addr `json:"range_start"` RangeEnd netip.Addr `json:"range_end"` }
func GetPredictableIPAM ¶
func GetPredictableIPAM(networkParameters *NetworkParameters) (*NADIpam, error)
GetPredictableIPAM returns a struct describing the available IP range. If the IP pool size does not fit in given networkParameters CIDR it will return an error instead.
type Nameserver ¶
type NetworkParameters ¶
type NetworkParameters struct { CIDR netip.Prefix ProviderAllocationStart netip.Addr ProviderAllocationEnd netip.Addr }
NetworkParameters - Parameters for the Designate networks, based on the config of the NAD
func GetNetworkParametersFromNAD ¶
func GetNetworkParametersFromNAD( nad *networkv1.NetworkAttachmentDefinition, ) (*NetworkParameters, error)
GetNetworkParametersFromNAD - Extract network information from the Network Attachment Definition
type Pool ¶
type Pool struct { Name string Description string Attributes map[string]string NSRecords []NSRecord Nameservers []Nameserver Targets []Target CatalogZone *CatalogZone // it is a pointer because it is optional }