v1alpha1

package
v0.0.0-...-6ae417f Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: Apache-2.0 Imports: 50 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the contrail v1alpha1 API group. +k8s:deepcopy-gen=package,register +groupName=tf.tungsten.io

Index

Constants

View Source
const (
	RHEL   string = "rhel"
	CENTOS string = "centos"
	UBUNTU string = "ubuntu"
)
View Source
const (
	SignerCAMountPath = "/etc/ssl/certs/kubernetes"
	SignerCAFilepath  = SignerCAMountPath + "/" + certificates.CAFilename
)
View Source
const (
	LogLevel                                    string = "debug"
	LogDir                                      string = "/var/log/contrail"
	LogLocal                                    int    = 1
	EncapPriority                               string = "MPLSoUDP,MPLSoGRE,VXLAN"
	DpdkUioDriver                               string = "uio_pci_generic"
	CpuCoreMask                                 string = "0x03"
	DpdkMemPerSocket                            int    = 1024
	DpdkCommandAdditionalArgs                   string = ""
	NicOffloadEnable                            bool   = false
	DistSnatProtoPortList                       string = ""
	FlowExportRate                              int    = 0
	CloudOrchestrator                           string = "kubernetes"
	CloudAdminRole                              string = "admin"
	AaaMode                                     string = "no-auth"
	AuthMode                                    string = "noauth"
	AuthParams                                  string = ""
	SslEnable                                   bool   = true
	SslInsecure                                 bool   = false
	ServerCertfile                              string = "/etc/contrail/ssl/certs/server.pem"
	ServerKeyfile                               string = "/etc/contrail/ssl/private/server-privkey.pem"
	ServerCaCertfile                            string = "/etc/contrail/ssl/certs/ca-cert.pem"
	ServerCaKeyfile                             string = "/etc/contrail/ssl/private/ca-key.pem"
	SelfsignedCertsWithIps                      bool   = true
	ControllerNodes                             string = ""
	AnalyticsAlarmEnable                        bool   = false
	AnalyticsSnmpEnable                         bool   = false
	AnalyticsdbEnable                           bool   = false
	AnalyticsNodes                              string = ""
	AnalyticsdbNodes                            string = ""
	AnalyticsSnmpNodes                          string = ""
	AnalyticsApiPort                            int    = 8081
	AnalyticsApiIntrospectPort                  int    = 8090
	AnalyticsdbPort                             int    = 9160
	AnalyticsdbCqlPort                          int    = 9042
	AnalyticsDataTTL                            int    = 48
	AnalyticsConfigAuditTTL                     int    = 2160
	AnalyticsStatisticsTTL                      int    = 4
	AnalyticsFlowTTL                            int    = 2
	TopologyIntrospectPort                      int    = 5921
	QueryengineIntrospectPort                   int    = 8091
	AnalyticsServers                            string = ""
	AnalyticsdbCqlServers                       string = ""
	AnalyticsApiVip                             string = ""
	AnalyticsAlarmNodes                         string = ""
	AlarmgenIntrospectPort                      int    = 5995
	AlarmgenPartitions                          int    = 30
	AlarmgenRedisAggregateDbOffset              string = "1"
	BgpPort                                     int    = 179
	BgpAutoMesh                                 bool   = true
	BgpEnable4Byte                              bool   = false
	BgpAsn                                      int    = 64512
	CollectorPort                               int    = 8086
	CollectorIntrospectPort                     int    = 8089
	CollectorSyslogPort                         int    = 514
	CollectorSflowPort                          int    = 6343
	CollectorIpfixPort                          int    = 4739
	CollectorProtobufPort                       int    = 3333
	CollectorStructuredSyslogPort               int    = 3514
	SnmpcollectorIntrospectPort                 int    = 5920
	CollectorServers                            string = ""
	CassandraPort                               int    = 9161
	CassandraCqlPort                            int    = 9041
	CassandraSslStoragePort                     int    = 7013
	CassandraStoragePort                        int    = 7012
	CassandraJmxLocalPort                       int    = 7201
	CassandraMinimumDiskGB                      int    = 4
	CassandraReaperEnabled                      bool   = false
	CassandraReaperAppPort                      int    = 8071
	CassandraReaperAdmPort                      int    = 8072
	ConfigNodes                                 string = ""
	ConfigdbNodes                               string = ""
	ConfigApiPort                               int    = 8082
	ConfigApiIntrospectPort                     int    = 8084
	ConfigAPIAdminPort                          int    = 8095
	ConfigdbPort                                int    = 9161
	ConfigdbCqlPort                             int    = 9041
	ConfigServers                               string = ""
	ConfigdbServers                             string = ""
	ConfigdbCqlServers                          string = ""
	ConfigApiVip                                string = ""
	ConfigApiSslEnable                          bool   = true
	ConfigApiServerCertfile                     string = "/etc/contrail/ssl/certs/server.pem"
	ConfigApiServerKeyfile                      string = "/etc/contrail/ssl/private/server-privkey.pem"
	ConfigApiServerCaCertfile                   string = "/etc/contrail/ssl/certs/ca-cert.pem"
	ConfigAPIWorkerCount                        int    = 1
	ConfigSchemaIntrospectPort                  int    = 8087
	ConfigSvcMonitorIntrospectPort              int    = 8088
	ConfigDeviceManagerIntrospectPort           int    = 8096
	CassandraSslEnable                          bool   = true
	CassandraSslCertfile                        string = "/etc/contrail/ssl/certs/server.pem"
	CassandraSslKeyfile                         string = "/etc/contrail/ssl/private/server-privkey.pem"
	CassandraSslCaCertfile                      string = "/etc/contrail/ssl/certs/ca-cert.pem"
	CassandraSslKeystorePassword                string = "astrophytum"
	CassandraSslTruststorePassword              string = "ornatum"
	CassandraSslProtocol                        string = "TLS"
	CassandraSslAlgorithm                       string = "SunX509"
	CassandraSslCipherSuites                    string = "" /* 195-byte string literal not displayed */
	CassandraConfigMemtableFlushWriter          int    = 4
	CassandraConfigConcurrectCompactors         int    = 4
	CassandraConfigCompactionThroughputMbPerSec int    = 256
	CassandraConfigConcurrectReads              int    = 64
	CassandraConfigConcurrectWrites             int    = 64
	CassandraConfigMemtableAllocationType       string = "offheap_objects"
	CNIConfigPath                               string = "/etc/cni"
	CNIBinaryPath                               string = "/opt/cni/bin"
	ControlNodes                                string = ""
	ControlIntrospectPort                       int    = 8083
	DnsNodes                                    string = ""
	DnsServerPort                               int    = 53
	DnsIntrospectPort                           int    = 8092
	RndcKey                                     string = "xvysmOR8lnUQRBcunkC6vg=="
	UseExternalTFTP                             bool   = false
	ZookeeperNodes                              string = ""
	ZookeeperPort                               int    = 2181
	ZookeeperElectionPort                       int    = 2888
	ZookeeperServerPort                         int    = 3888
	ZookeeperAdminEnableServer                  bool   = true
	ZookeeperAdminPort                          int    = 2182
	ZookeeperPorts                              string = "2888:3888"
	ZookeeperServers                            string = ""
	ZookeeperServersSpaceDelim                  string = ""
	RabbitmqNodes                               string = ""
	RabbitmqErlangCookie                        string = "47EFF3BB-4786-46E0-A5BB-58455B3C2CB4"
	RabbitmqNodePort                            int    = 5673
	RabbitmqErlEpmdPort                         int    = 4371
	RabbitmqServers                             string = ""
	RabbitmqSslCertfile                         string = "/etc/contrail/ssl/certs/server.pem"
	RabbitmqSslKeyfile                          string = "/etc/contrail/ssl/private/server-privkey.pem"
	RabbitmqSslCacertfile                       string = "/etc/contrail/ssl/certs/ca-cert.pem"
	RabbitmqSslFailIfNoPeerCert                 bool   = true
	RabbitmqVhost                               string = "/"
	RabbitmqUser                                string = "guest"
	RabbitmqPassword                            string = "guest"
	RabbitmqUseSsl                              bool   = true
	RabbitmqSslVer                              string = "tlsv1_2"
	RabbitmqClientSslCertfile                   string = "/etc/contrail/ssl/certs/server.pem"
	RabbitmqClientSslKeyfile                    string = "/etc/contrail/ssl/private/server-privkey.pem"
	RabbitmqClientSslCacertfile                 string = "/etc/contrail/ssl/certs/ca-cert.pem"
	RabbitmqHeartbeatInterval                   int    = 10
	RabbitmqMirroredQueueMode                   string = "all"
	RabbitmqClusterPartitionHandling            string = "autoheal"
	RedisPort                                   int    = 6389
	RedisSslEnable                              bool   = true
	RedisSslCertfile                            string = "/etc/contrail/ssl/certs/server.pem"
	RedisSslKeyfile                             string = "/etc/contrail/ssl/private/server-privkey.pem"
	KafkaNodes                                  string = ""
	KafkaPort                                   int    = 9092
	KafkaServers                                string = ""
	KafkaSslEnable                              bool   = true
	KafkaSslCertfile                            string = "/etc/contrail/ssl/certs/server.pem"
	KafkaSslKeyfile                             string = "/etc/contrail/ssl/private/server-privkey.pem"
	KafkaSslCacertfile                          string = "/etc/contrail/ssl/certs/ca-cert.pem"
	KeystoneAuthAdminTenant                     string = "admin"
	KeystoneAuthAdminUser                       string = "admin"
	KeystoneAuthAdminPassword                   string = "contrail123"
	KeystoneAuthUserDomainName                  string = "Default"
	KeystoneAuthProjectDomainName               string = "Default"
	KeystoneAuthRegionName                      string = "RegionOne"
	KeystoneAuthUrlVersion                      string = "/v3"
	KeystoneAuthHost                            string = "127.0.0.1"
	KeystoneAuthProto                           string = "https"
	KeystoneAuthAdminPort                       int    = 35357
	KeystoneAuthPort                            int    = 5000
	KeystoneAuthUrlTokens                       string = "/v3/auth/tokens"
	KeystoneAuthInsecure                        bool   = true
	KeystoneAuthCertfile                        string = ""
	KeystoneAuthKeyfile                         string = ""
	KeystoneAuthCaCertfile                      string = ""
	KubemanagerNodes                            string = ""
	KubernetesApiNodes                          string = ""
	KubernetesApiServer                         string = "10.96.0.1"
	KubernetesApiPort                           int    = 8080
	KubernetesApiSSLPort                        int    = 6443
	KubernetesClusterName                       string = "k8s"
	KubernetesDNSDomainName                     string = "k8s"
	KubernetesPodSubnet                         string = "10.32.0.0/12"
	KubernetesIpFabricSubnets                   string = "10.64.0.0/12"
	KubernetesServiceSubnet                     string = "10.96.0.0/12"
	KubernetesIPFabricForwarding                bool   = false
	KubernetesIPFabricSnat                      bool   = true
	KubernetesPublicFIPPoolTemplate             string = "{'project' : '%s-default', 'domain': 'default-domain', 'name': '__fip_pool_public__' , 'network' : '__public__'}"
	KubernetesHostNetworkService                bool   = false
	KubernetesUseKubeadm                        bool   = true
	KubernetesServiceAccount                    string = ""
	VcenterFabricManagerNodes                   string = ""
	MetadataProxySecret                         string = "contrail"
	BarbicanUser                                string = "barbican"
	BarbicanPassword                            string = "contrail123"
	AgentMode                                   string = "kernel"
	ExternalRouters                             string = ""
	Subcluster                                  string = ""
	VrouterComputeNodeAddress                   string = ""
	VrouterCryptInterface                       string = "crypt0"
	VrouterDecryptInterface                     string = "decrypt0"
	VrouterDecryptKey                           int    = 15
	VrouterModuleOptions                        string = ""
	FabricSnatHashTableSize                     int    = 4096
	TsnEvpnMode                                 bool   = false
	TsnNodes                                    string = "[]"
	PriorityId                                  string = ""
	PriorityBandwidth                           string = ""
	PriorityScheduling                          string = ""
	QosQueueId                                  string = ""
	QosLogicalQueues                            string = ""
	QosDefHwQueue                               bool   = false
	PriorityTagging                             bool   = true
	SloDestination                              string = "collector"
	SampleDestination                           string = "collector"
	WebuiNodes                                  string = ""
	WebuiJobServerPort                          int    = 3000
	KueUiPort                                   int    = 3002
	WebuiHttpListenPort                         int    = 8180
	WebuiHttpsListenPort                        int    = 8143
	WebuiSslKeyFile                             string = "/etc/contrail/webui_ssl/cs-key.pem"
	WebuiSslCertFile                            string = "/etc/contrail/webui_ssl/cs-cert.pem"
	WebuiSslCiphers                             string = "" /* 284-byte string literal not displayed */
	WebuiStaticAuthUser                         string = "admin"
	WebuiStaticAuthPassword                     string = "contrail123"
	WebuiStaticAuthRole                         string = "cloudAdmin"
	XmppServerPort                              int    = 5269
	XmppSslEnable                               bool   = true
	XmppServerCertfile                          string = "/etc/contrail/ssl/certs/server.pem"
	XmppServerKeyfile                           string = "/etc/contrail/ssl/private/server-privkey.pem"
	XmppServerCaCertfile                        string = "/etc/contrail/ssl/certs/ca-cert.pem"
	LinklocalServicePort                        int    = 80
	LinklocalServiceName                        string = "metadata"
	LinklocalServiceIp                          string = "169.254.169.254"
	IpfabricServicePort                         int    = 8775
	IntrospectSslEnable                         bool   = true
	IntrospectSslInsecure                       bool   = true
	IntrospectCertfile                          string = "/etc/contrail/ssl/certs/server.pem"
	IntrospectKeyfile                           string = "/etc/contrail/ssl/private/server-privkey.pem"
	IntrospectCaCertfile                        string = "/etc/contrail/ssl/certs/ca-cert.pem"
	IntrospectListenAll                         bool   = true
	SandeshSslEnable                            bool   = true
	SandeshCertfile                             string = "/etc/contrail/ssl/certs/server.pem"
	SandeshKeyfile                              string = "/etc/contrail/ssl/private/server-privkey.pem"
	SandeshCaCertfile                           string = "/etc/contrail/ssl/certs/ca-cert.pem"
	MetadataSslEnable                           bool   = false
	MetadataSslCertfile                         string = ""
	MetadataSslKeyfile                          string = ""
	MetadataSslCaCertfile                       string = ""
	MetadataSslCertType                         string = ""
	ConfigureIptables                           string = "false"
	FwaasEnable                                 bool   = false
	TorAgentOvsKa                               int    = 10000
	TorType                                     string = "ovs"
	TorOvsProtocol                              string = "tcp"
	ToragentSslCertfile                         string = "/etc/contrail/ssl/certs/server.pem"
	ToragentSslKeyfile                          string = "/etc/contrail/ssl/private/server-privkey.pem"
	ToragentSslCacertfile                       string = "/etc/contrail/ssl/certs/ca-cert.pem"
	RabbitmqInstance                            string = "rabbitmq1"
	AnalyticsCassandraInstance                  string = "analyticsdb1"
	CassandraInstance                           string = "configdb1"
	ConfigInstance                              string = "config1"
	RedisInstance                               string = "redis1"
	ZookeeperInstance                           string = "zookeeper1"
	AnalyticsInstance                           string = "analytics1"
	AnalyticsAlarmInstance                      string = "analyticsalarm1"
	AnalyticsSnmpInstance                       string = "analyticssnmp1"
	KubemanagerInstance                         string = "kubemanager1"
	WebuiInstance                               string = "webui1"
	OpenShiftClusterName                        string = "test"
	OpenShiftPodSubnet                          string = "10.128.0.0/14"
	OpenShiftServiceSubnet                      string = "172.30.0.0/16"
	OpenShiftDNSDomain                          string = "example.com"
	OpenShiftCNIConfigPath                      string = "/etc/kubernetes/cni"
	OpenShiftCNIBinaryPath                      string = "/var/lib/cni/bin"
)
View Source
const CassandraInstanceType = "cassandra"

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects.
	SchemeGroupVersion = schema.GroupVersion{Group: "tf.tungsten.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
)
View Source
var ZiuKinds []string

Establishes ZIU staging

View Source
var ZiuKindsAll = append(ZiuKindsNoVrouterCNI, "Kubemanager")
View Source
var ZiuKindsNoVrouterCNI = []string{
	"Config",
	"Analytics",
	"AnalyticsAlarm",
	"AnalyticsSnmp",
	"Redis",
	"QueryEngine",
	"Cassandra",
	"Zookeeper",
	"Rabbitmq",
	"Control",
	"Webui",
}
View Source
var ZiuRestartTime, _ = time.ParseDuration("20s")

Functions

func AddCAVolumeToIntendedDS

func AddCAVolumeToIntendedDS(ds *appsv1.DaemonSet)

AddCAVolumeToIntendedDS adds volumes to a deployment.

func AddCAVolumeToIntendedSTS

func AddCAVolumeToIntendedSTS(sts *appsv1.StatefulSet)

AddCAVolumeToIntendedSTS adds volumes to a deployment.

func AddCertsMounts

func AddCertsMounts(name string, container *corev1.Container)

func AddCommonVolumes

func AddCommonVolumes(podSpec *corev1.PodSpec, configuration PodConfiguration)

AddCommonVolumes append common volumes and mounts

func AddHostMountsToPodSpec

func AddHostMountsToPodSpec(spec *corev1.PodSpec, volumeConfigMapMap map[string]string)

func AddNodemanagerVolumes

func AddNodemanagerVolumes(podSpec *corev1.PodSpec, configuration PodConfiguration)

AddNodemanagerVolumes append common volumes and mounts - /var/run:/var/run:z - /run/runc:/run/runc:z - /sys/fs/cgroup:/sys/fs/cgroup:ro - /sys/fs/selinux:/sys/fs/selinux - /var/lib/containers:/var/lib/containers:shared

func AddSecretVolumesToIntendedDS

func AddSecretVolumesToIntendedDS(ds *appsv1.DaemonSet, name string)

AddSecretVolumesToIntendedDS adds volumes to a deployment.

func AddSecretVolumesToIntendedSTS

func AddSecretVolumesToIntendedSTS(sts *appsv1.StatefulSet, name string)

AddSecretVolumesToIntendedSTS adds volumes to a deployment.

func AddVolumesToIntendedDS

func AddVolumesToIntendedDS(ds *appsv1.DaemonSet, volumeConfigMapMap map[string]string)

AddVolumesToIntendedDS adds volumes to a deployment.

func AddVolumesToIntendedSTS

func AddVolumesToIntendedSTS(sts *appsv1.StatefulSet, volumeConfigMapMap map[string]string)

AddVolumesToIntendedSTS adds volumes to a deployment.

func AddVolumesToPodSpec

func AddVolumesToPodSpec(spec *corev1.PodSpec, volumeConfigMapMap map[string]string)

func CanReconcile

func CanReconcile(resourceKind string, clnt client.Client) (bool, error)

Function check reconsiler request against current ZIU stage and allow reconcile for controllers

func ClusterDNSDomain

func ClusterDNSDomain(client client.Client) (string, error)

ClusterDNSDomain returns Cluster DNS domain set in kubeadm config

func CmpConfigMaps

func CmpConfigMaps(first, second *corev1.ConfigMap) bool

func CommonStartupScript

func CommonStartupScript(command string, configs map[string]string) string

CommonStartupScript prepare common run service script

command - is a final command to run
configs - config files to be waited for and to be linked from configmap mount
 to a destination config folder (if destination is empty no link be done, only wait), e.g.
 { "api.${POD_IP}": "", "vnc_api.ini.${POD_IP}": "vnc_api.ini"}

func CommonStartupScriptEx

func CommonStartupScriptEx(command string, initCommand string, configs map[string]string, srcDir string, dstDir string, updateSignal string) string

CommonStartupScript prepare common run service script

command - is a final command to run
configs - config files to be waited for and to be linked from configmap mount
 to a destination config folder (if destination is empty no link be done, only wait), e.g.
 { "api.${POD_IP}": "", "vnc_api.ini.${POD_IP}": "vnc_api.ini"}

func ContainerFileChanged

func ContainerFileChanged(pod *corev1.Pod, container string, path string, content string) (bool, error)

ContainerFileChanged checks file content

func ContainerFileSha

func ContainerFileSha(pod *corev1.Pod, container string, path string) (string, error)

ContainerFileSha gets sha of file from a container

func ConvertLogLevel

func ConvertLogLevel(logLevel string) string

func CreateConfigMap

func CreateConfigMap(
	configMapName string,
	client client.Client,
	scheme *runtime.Scheme,
	request reconcile.Request,
	instanceType string,
	data map[string]string,
	object v1.Object) (*corev1.ConfigMap, error)

CreateConfigMap creates a config map based on the instance type.

func CreateSecret

func CreateSecret(secretName string,
	client client.Client,
	scheme *runtime.Scheme,
	request reconcile.Request,
	instanceType string,
	object v1.Object) (*corev1.Secret, error)

func CreateSecretEx

func CreateSecretEx(secretName string,
	client client.Client,
	scheme *runtime.Scheme,
	request reconcile.Request,
	instanceType string,
	data map[string][]byte,
	object v1.Object) (*corev1.Secret, error)

CreateSecretEx creates a secret based on the instance type.

func CreateServiceSTS

func CreateServiceSTS(instance v1.Object,
	instanceType string,
	sts *appsv1.StatefulSet,
	cl client.Client,
) (created bool, err error)

CreateServiceSTS creates the service STS, if it is not exists.

func DefaultSecurityContext

func DefaultSecurityContext(podSpec *corev1.PodSpec)

DefaultSecurityContext sets security context if not set yet (it is to be set explicetely as on openshift default is restricted after bootstrap completed)

func EncryptString

func EncryptString(str string) string

EncryptString returns sha

func EnsureCertificatesExist

func EnsureCertificatesExist(instance metav1.Object, pods []corev1.Pod, instanceType string, cl client.Client, scheme *runtime.Scheme) error

EnsureCertificatesExist ensures pod server cert is issued

func EnsureCertificatesExistEx

func EnsureCertificatesExistEx(instance metav1.Object, pods []corev1.Pod, instanceType string, clientAuth bool, cl client.Client, scheme *runtime.Scheme) error

EnsureCertificatesExistEx ensures pod cert is issued

func EnsureServiceAccount

func EnsureServiceAccount(spec *corev1.PodSpec,
	instanceType string,
	imagePullSecret []string,
	client client.Client,
	request reconcile.Request,
	scheme *runtime.Scheme,
	object v1.Object) error

EnsureServiceAccount prepares the intended podList.

func ExecCmdInContainer

func ExecCmdInContainer(pod *corev1.Pod, containerName string, command []string) (stdout, stderr string, err error)

ExecCmdInContainer runs command inside a container

func ExecToContainer

func ExecToContainer(pod *corev1.Pod, container string, command []string, stdin io.Reader) (string, string, error)

ExecToContainer uninterractively exec to the vrouteragent container.

func GetAnalyticsAlarmEnabled

func GetAnalyticsAlarmEnabled(cl client.Client) (bool, error)

Return if analytics-alarm is enabled

func GetAnalyticsAlarmNodes

func GetAnalyticsAlarmNodes(ns string, clnt client.Client) ([]string, error)

func GetAnalyticsCassandraInstance

func GetAnalyticsCassandraInstance(cl client.Client) (string, error)

Return name of casandra depending on setup

func GetAnalyticsNodes

func GetAnalyticsNodes(ns string, clnt client.Client) (string, error)

GetAnalyticsNodes returns analytics nodes list (str comma separated)

func GetAnalyticsSnmpEnabled

func GetAnalyticsSnmpEnabled(cl client.Client) (bool, error)

Return if analytics-snmp is enabled

func GetConfigMap

func GetConfigMap(name, ns string, client client.Client) (*corev1.ConfigMap, error)

GetConfigMap creates a config map based on the instance type.

func GetConfigNodes

func GetConfigNodes(ns string, clnt client.Client) (string, error)

GetConfigNodes requests config api nodes

func GetControlNodes

func GetControlNodes(ns string, controlName string, cidr string, clnt client.Client) (string, error)

GetControlNodes returns control nodes list (str comma separated)

func GetControllerNodes

func GetControllerNodes(c client.Client) ([]corev1.Node, error)

func GetDataAddresses

func GetDataAddresses(pod *corev1.Pod, instanceType string, cidr string) (string, error)

GetDataAddresses gets ip addresses of Control pods in data network

func GetDatabaseNodeType

func GetDatabaseNodeType(cl client.Client) (string, error)

Return NODE_TYPE for database depending on setup

func GetHostname

func GetHostname(pod *corev1.Pod, instanceType string, cidr string) (string, error)

GetHostname depending on existance of dataSubnet

func GetNodes

func GetNodes(labelSelector map[string]string, c client.Client) ([]corev1.Node, error)

func GetPodsHostname

func GetPodsHostname(c client.Client, pod *corev1.Pod) (string, error)

func GetQueryEngineEnabled

func GetQueryEngineEnabled(cl client.Client) (bool, error)

Return if queryengine is enabled

func GetReplicas

func GetReplicas(clnt client.Client, labels client.MatchingLabels) (nodesNumber int32, err error)

func InitCA

func InitCA(cl client.Client, scheme *runtime.Scheme, owner metav1.Object, ownerType string) (err error)

func InitZiu

func InitZiu(clnt client.Client) (err error)

func IsOKForRequeque

func IsOKForRequeque(err error) bool

IsOKForRequeque works for errors from request for update, and returns true if the error occurs from time to time due to asynchronous requests and is treated by restarting the reconciliation. Note that such a solution is suitable only if the update of the same object is not launched twice or more times in the same reconciliation.

func IsUnstructuredActive

func IsUnstructuredActive(kind string, name string, namespace string, clnt client.Client) bool

Got some contrail resource from cluster and check is it active?

func IsVrouterExists

func IsVrouterExists(client client.Client) bool

func IsZiuRequired

func IsZiuRequired(clnt client.Client) (bool, error)

IsZiuRequired Return true if manifests image tag (get kubemanager or webui depending on CNI) is different from deployed STS

func NodeChangeHandler

func NodeChangeHandler(watcher NodeWatcher, cl client.Client) handler.Funcs

func NodemanagerStartupScript

func NodemanagerStartupScript() string

NodemanagerStartupScript returns nodemanagaer runner script

func PodIPListAndIPMapFromInstance

func PodIPListAndIPMapFromInstance(instanceType string,
	request reconcile.Request,
	clnt client.Client, datanetwork string) ([]corev1.Pod, map[string]NodeInfo, error)

PodIPListAndIPMapFromInstance gets a list with POD IPs and a map of POD names and IPs. TODO: Implement selection of returning either ip's or hostnames

func PodsCertSubjects

func PodsCertSubjects(domain string, podList []corev1.Pod, podAltIPs PodAlternativeIPs, clientAuth bool, instanceType string) []certificates.CertificateSubject

PodsCertSubjects iterates over passed list of pods and for every pod prepares certificate subject which can be later used for generating certificate for given pod.

func PrepareSTS

func PrepareSTS(sts *appsv1.StatefulSet,
	commonConfiguration *PodConfiguration,
	instanceType string,
	request reconcile.Request,
	scheme *runtime.Scheme,
	object v1.Object,
	usePralallePodManagementPolicy bool) error

PrepareSTS prepares the intended podList.

func ProvisionerEnvData

func ProvisionerEnvData(clusterNodes *ClusterNodes, hostname string, authParams AuthParameters) string

ProvisionerEnvData returns provisioner env data

func ProvisionerEnvDataEx

func ProvisionerEnvDataEx(
	clusterNodes *ClusterNodes, hostname string, authParams AuthParameters,
	physicalInterface, vrouterGateway, l3mhCidr string) string

ProvisionerEnvDataEx returns provisioner env data for vrouter case

func ProvisionerRunnerData

func ProvisionerRunnerData(configMapName string) string

func QuerySTS

func QuerySTS(name string, namespace string, reconcileClient client.Client) (*appsv1.StatefulSet, error)

QuerySTS queries the STS

func RemoveProvisionerConfigMapData

func RemoveProvisionerConfigMapData(configMapName string, configMap *corev1.ConfigMap)

RemoveProvisionerConfigMapData update provisioner data in config map

func RollingUpdateStrategy

func RollingUpdateStrategy() *appsv1.StatefulSetUpdateStrategy

func SelectPods

func SelectPods(ownerName, instanceType, namespace string, clnt client.Client) (*corev1.PodList, error)

func SendSignal

func SendSignal(pod *corev1.Pod, containerName, signal string) (stdout, stderr string, err error)

SendSignal signal to main container process with pid 1

func SetDSCommonConfiguration

func SetDSCommonConfiguration(ds *appsv1.DaemonSet,
	commonConfiguration *PodConfiguration)

SetDSCommonConfiguration takes common configuration parameters and applies it to the pod.

func SetDeploymentCommonConfiguration

func SetDeploymentCommonConfiguration(deployment *appsv1.Deployment,
	commonConfiguration *PodConfiguration) *appsv1.Deployment

SetDeploymentCommonConfiguration takes common configuration parameters and applies it to the deployment.

func SetInstanceActive

func SetInstanceActive(client client.Client, activeStatus *bool, degradedStatus *bool, sts *appsv1.StatefulSet, request reconcile.Request, object runtime.Object) error

SetInstanceActive sets the instance to active.

func SetLogLevelEnv

func SetLogLevelEnv(logLevel string, container *corev1.Container)

func SetSTSCommonConfiguration

func SetSTSCommonConfiguration(sts *appsv1.StatefulSet,
	commonConfiguration *PodConfiguration)

SetSTSCommonConfiguration takes common configuration parameters and applies it to the pod.

func SetZiuStage

func SetZiuStage(stage int, clnt client.Client) error

SetZiuStage sets ZIU stage

func UpdateConfigMap

func UpdateConfigMap(instance v1.Object, instanceType string, data map[string]string, client client.Client) error

func UpdatePodAnnotations

func UpdatePodAnnotations(pod *corev1.Pod, client client.Client) (updated bool, err error)

UpdateAnnotations add hostname to annotation for pod.

func UpdatePodsAnnotations

func UpdatePodsAnnotations(podList []corev1.Pod, client client.Client) (updated bool, err error)

UpdatePodsAnnotations add hostname to annotations for pods in list.

func UpdateSTS

func UpdateSTS(stsName string,
	instanceType string,
	namespace string,
	template *corev1.PodTemplateSpec,
	strategy *appsv1.StatefulSetUpdateStrategy,
	force bool,
	cl client.Client,
) (updated bool, err error)

UpdateSafeSTS query existing statefulset and add to it allowed fields. Allowed fileds are template, replicas and updateStrategy (k8s restrinction). Template will be updated just in case when some container images or container env changed (or use force). Nil values to leave fields unchanged.

func UpdateServiceSTS

func UpdateServiceSTS(instance v1.Object,
	instanceType string,
	sts *appsv1.StatefulSet,
	force bool,
	clnt client.Client,
) (updated bool, err error)

UpdateServiceSTS safe update for service statefulsets

Types

type AAAMode

type AAAMode string

AAAMode aaa mode +k8s:openapi-gen=true +kubebuilder:validation:Enum=noauth;rbac

const (
	// AAAModeNoAuth no auth
	AAAModeNoAuth AAAMode = "no-auth"
	// AAAModeRBAC auth mode rbac
	AAAModeRBAC AAAMode = "rbac"
	// AAAModeCloudAdmin auth mode cloud-admin
	AAAModeCloudAdmin AAAMode = "cloud-admin"
)

type AgentServiceStatus

type AgentServiceStatus string

AgentServiceStatus is the status value: Starting, Ready, Updating +k8s:openapi-gen=true

type AgentStatus

type AgentStatus struct {
	Name            string             `json:"name,omitempty"`
	Status          AgentServiceStatus `json:"status,omitempty"`
	ControlNodes    string             `json:"controlNodes,omitempty"`
	ConfigNodes     string             `json:"configNodes,omitempty"`
	AnalyticsNodes  string             `json:"analyticsNodes,omitempty"`
	EncryptedParams string             `json:"encryptedParams,omitempty"`
}

AgentStatus is the Status of the agent. +k8s:openapi-gen=true

type Analytics

type Analytics struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   AnalyticsSpec   `json:"spec,omitempty"`
	Status AnalyticsStatus `json:"status,omitempty"`
}

Analytics is the Schema for the analytics API. +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:resource:path=analytics,scope=Namespaced +kubebuilder:printcolumn:name="Endpoint",type=string,JSONPath=`.status.endpoint` +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +kubebuilder:printcolumn:name="Active",type=boolean,JSONPath=`.status.active`

func (*Analytics) AddVolumesToIntendedSTS

func (c *Analytics) AddVolumesToIntendedSTS(sts *appsv1.StatefulSet, volumeConfigMapMap map[string]string)

AddVolumesToIntendedSTS adds volumes to the analytics statefulset

func (*Analytics) CommonStartupScript

func (c *Analytics) CommonStartupScript(command string, configs map[string]string) string

CommonStartupScript prepare common run service script

command - is a final command to run
configs - config files to be waited for and to be linked from configmap mount
 to a destination config folder (if destination is empty no link be done, only wait), e.g.
 { "api.${POD_IP}": "", "vnc_api.ini.${POD_IP}": "vnc_api.ini"}

func (*Analytics) ConfigurationParameters

func (c *Analytics) ConfigurationParameters() AnalyticsConfiguration

ConfigurationParameters create analytics struct

func (*Analytics) CreateConfigMap

func (c *Analytics) CreateConfigMap(configMapName string,
	client client.Client,
	scheme *runtime.Scheme,
	request reconcile.Request) (*corev1.ConfigMap, error)

CreateConfigMap makes default empty ConfigMap

func (*Analytics) CreateSecret

func (c *Analytics) CreateSecret(secretName string,
	client client.Client,
	scheme *runtime.Scheme,
	request reconcile.Request) (*corev1.Secret, error)

CreateSecret creates a secret.

func (*Analytics) DeepCopy

func (in *Analytics) DeepCopy() *Analytics

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Analytics.

func (*Analytics) DeepCopyInto

func (in *Analytics) DeepCopyInto(out *Analytics)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Analytics) DeepCopyObject

func (in *Analytics) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Analytics) InstanceConfiguration

func (c *Analytics) InstanceConfiguration(podList []corev1.Pod, client client.Client,
) (data map[string]string, err error)

InstanceConfiguration configures and updates configmaps

func (*Analytics) IsActive

func (c *Analytics) IsActive(name string, namespace string, client client.Client) bool

IsActive returns true if instance is active

func (*Analytics) ManageNodeStatus

func (c *Analytics) ManageNodeStatus(podNameIPMap map[string]NodeInfo,
	client client.Client) (updated bool, err error)

ManageNodeStatus updates nodes in status

func (*Analytics) PodIPListAndIPMapFromInstance

func (c *Analytics) PodIPListAndIPMapFromInstance(request reconcile.Request, reconcileClient client.Client) ([]corev1.Pod, map[string]NodeInfo, error)

PodIPListAndIPMapFromInstance gets a list with POD IPs and a map of POD names and IPs.

func (*Analytics) PrepareSTS

func (c *Analytics) PrepareSTS(sts *appsv1.StatefulSet, commonConfiguration *PodConfiguration, request reconcile.Request, scheme *runtime.Scheme) error

PrepareSTS prepares the intented statefulset for the analytics object

func (*Analytics) SetEndpointInStatus

func (c *Analytics) SetEndpointInStatus(client client.Client, clusterIP string) error

func (*Analytics) SetInstanceActive

func (c *Analytics) SetInstanceActive(client client.Client, activeStatus *bool, degradedStatus *bool, sts *appsv1.StatefulSet, request reconcile.Request) error

SetInstanceActive sets the Analytics instance to active

type AnalyticsAlarm

type AnalyticsAlarm struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   AnalyticsAlarmSpec   `json:"spec,omitempty"`
	Status AnalyticsAlarmStatus `json:"status,omitempty"`
}

AnalyticsAlarm is the Schema for the Analytics Alarm API. +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:resource:path=analyticsalarm,scope=Namespaced +kubebuilder:printcolumn:name="Active",type=boolean,JSONPath=`.status.active`

func (*AnalyticsAlarm) CommonStartupScript

func (c *AnalyticsAlarm) CommonStartupScript(command string, configs map[string]string) string

CommonStartupScript prepare common run service script

command - is a final command to run
configs - config files to be waited for and to be linked from configmap mount
 to a destination config folder (if destination is empty no link be done, only wait), e.g.
 { "api.${POD_IP}": "", "vnc_api.ini.${POD_IP}": "vnc_api.ini"}

func (*AnalyticsAlarm) CreateConfigMap

func (c *AnalyticsAlarm) CreateConfigMap(configMapName string,
	client client.Client,
	scheme *runtime.Scheme,
	request reconcile.Request) (*corev1.ConfigMap, error)

CreateConfigMap creates analytics alarm config map

func (*AnalyticsAlarm) CreateSecret

func (c *AnalyticsAlarm) CreateSecret(secretName string,
	client client.Client,
	scheme *runtime.Scheme,
	request reconcile.Request) (*corev1.Secret, error)

CreateSecret creates a secret.

func (*AnalyticsAlarm) DeepCopy

func (in *AnalyticsAlarm) DeepCopy() *AnalyticsAlarm

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AnalyticsAlarm.

func (*AnalyticsAlarm) DeepCopyInto

func (in *AnalyticsAlarm) DeepCopyInto(out *AnalyticsAlarm)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AnalyticsAlarm) DeepCopyObject

func (in *AnalyticsAlarm) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*AnalyticsAlarm) InstanceConfiguration

func (c *AnalyticsAlarm) InstanceConfiguration(podList []corev1.Pod, client client.Client,
) (data map[string]string, err error)

InstanceConfiguration create config data

func (*AnalyticsAlarm) ManageNodeStatus

func (c *AnalyticsAlarm) ManageNodeStatus(podNameIPMap map[string]NodeInfo,
	client client.Client) (updated bool, err error)

ManageNodeStatus updates nodes in status

func (*AnalyticsAlarm) PodIPListAndIPMapFromInstance

func (c *AnalyticsAlarm) PodIPListAndIPMapFromInstance(instanceType string, request reconcile.Request, reconcileClient client.Client) ([]corev1.Pod, map[string]NodeInfo, error)

PodIPListAndIPMapFromInstance gets a list with POD IPs and a map of POD names and IPs.

func (*AnalyticsAlarm) SetInstanceActive

func (c *AnalyticsAlarm) SetInstanceActive(client client.Client, activeStatus *bool, degradedStatus *bool, sts *appsv1.StatefulSet, request reconcile.Request) error

SetInstanceActive sets instance to active.

type AnalyticsAlarmClusterConfiguration

type AnalyticsAlarmClusterConfiguration struct {
	AnalyticsAlarmServerIPList []string `json:"analyticsAlarmServerIPList,omitempty"`
}

func NewAnalyticsAlarmClusterConfiguration

func NewAnalyticsAlarmClusterConfiguration(name, namespace string, client client.Client) (AnalyticsAlarmClusterConfiguration, error)

type AnalyticsAlarmConfiguration

type AnalyticsAlarmConfiguration struct {
	LogFilePath                    string       `json:"logFilePath,omitempty"`
	LogLocal                       string       `json:"logLocal,omitempty"`
	AlarmgenRedisAggregateDbOffset *int         `json:"alarmgenRedisAggregateDbOffset,omitempty"`
	AlarmgenPartitions             *int         `json:"alarmgenPartitions,omitempty"`
	AlarmgenIntrospectListenPort   *int         `json:"alarmgenIntrospectListenPort,omitempty"`
	AlarmgenLogFileName            string       `json:"alarmgenLogFileName,omitempty"`
	Containers                     []*Container `json:"containers,omitempty"`
}

AnalyticsAlarmConfiguration is the Spec for the Analytics Alarm API. +k8s:openapi-gen=true

func (*AnalyticsAlarmConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AnalyticsAlarmConfiguration.

func (*AnalyticsAlarmConfiguration) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AnalyticsAlarmInput

type AnalyticsAlarmInput struct {
	Metadata Metadata           `json:"metadata,omitempty"`
	Spec     AnalyticsAlarmSpec `json:"spec,omitempty"`
}

AnalyticsAlarmInput is the Schema for the analytics API. +k8s:openapi-gen=true

func (*AnalyticsAlarmInput) DeepCopyInto

func (in *AnalyticsAlarmInput) DeepCopyInto(out *AnalyticsAlarmInput)

type AnalyticsAlarmList

type AnalyticsAlarmList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []AnalyticsAlarm `json:"items"`
}

AnalyticsAlarmList contains a list of AnalyticsAlarm. +k8s:openapi-gen=true

func (*AnalyticsAlarmList) DeepCopy

func (in *AnalyticsAlarmList) DeepCopy() *AnalyticsAlarmList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlList.

func (*AnalyticsAlarmList) DeepCopyInto

func (in *AnalyticsAlarmList) DeepCopyInto(out *AnalyticsAlarmList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AnalyticsAlarmList) DeepCopyObject

func (in *AnalyticsAlarmList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type AnalyticsAlarmSpec

type AnalyticsAlarmSpec struct {
	CommonConfiguration  PodConfiguration            `json:"commonConfiguration,omitempty"`
	ServiceConfiguration AnalyticsAlarmConfiguration `json:"serviceConfiguration"`
}

AnalyticsAlarmSpec is the Spec for the Analytics Alarm API. +k8s:openapi-gen=true

func (*AnalyticsAlarmSpec) DeepCopy

func (in *AnalyticsAlarmSpec) DeepCopy() *AnalyticsAlarmSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AnalyticsAlarmSpec.

func (*AnalyticsAlarmSpec) DeepCopyInto

func (in *AnalyticsAlarmSpec) DeepCopyInto(out *AnalyticsAlarmSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AnalyticsAlarmStatus

type AnalyticsAlarmStatus struct {
	CommonStatus `json:",inline"`
}

AnalyticsAlarmStatus is the Status for the Analytics Alarm API. +k8s:openapi-gen=true

func (*AnalyticsAlarmStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AnalyticsAlarmStatus.

func (*AnalyticsAlarmStatus) DeepCopyInto

func (in *AnalyticsAlarmStatus) DeepCopyInto(out *AnalyticsAlarmStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AnalyticsClusterConfiguration

type AnalyticsClusterConfiguration struct {
	AnalyticsServerPort   int      `json:"analyticsServerPort,omitempty"`
	AnalyticsServerIPList []string `json:"analyticsServerIPList,omitempty"`
	AnalyticsDataTTL      int      `json:"analyticsDataTTL,omitempty"`
	CollectorPort         int      `json:"collectorPort,omitempty"`
	CollectorServerIPList []string `json:"collectorServerIPList,omitempty"`
}

AnalyticsConfiguration stores all information about service's endpoints under the Contrail Analytics

func NewAnalyticsClusterConfiguration

func NewAnalyticsClusterConfiguration(name, namespace string, client client.Client) (AnalyticsClusterConfiguration, error)

NewAnalyticsClusterConfiguration gets a struct containing various representations of Analytics nodes string.

func (*AnalyticsClusterConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AnalyticsClusterConfiguration.

func (*AnalyticsClusterConfiguration) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AnalyticsClusterConfiguration) FillWithDefaultValues

func (c *AnalyticsClusterConfiguration) FillWithDefaultValues()

FillWithDefaultValues sets the default port values if they are set to the zero value

type AnalyticsConfiguration

type AnalyticsConfiguration struct {
	Containers                 []*Container `json:"containers,omitempty"`
	AnalyticsPort              *int         `json:"analyticsPort,omitempty"`
	CollectorPort              *int         `json:"collectorPort,omitempty"`
	AnalyticsApiIntrospectPort *int         `json:"analyticsIntrospectPort,omitempty"`
	CollectorIntrospectPort    *int         `json:"collectorIntrospectPort,omitempty"`
	AAAMode                    AAAMode      `json:"aaaMode,omitempty"`
	// Time (in hours) that the analytics object and log data stays in the Cassandra database. Defaults to 48 hours.
	AnalyticsDataTTL *int `json:"analyticsDataTTL,omitempty"`
	// Time (in hours) the analytics config data entering the collector stays in the Cassandra database. Defaults to 2160 hours.
	AnalyticsConfigAuditTTL *int `json:"analyticsConfigAuditTTL,omitempty"`
	// Time to live (TTL) for statistics data in hours. Defaults to 4 hours.
	AnalyticsStatisticsTTL *int `json:"analyticsStatisticsTTL,omitempty"`
	// Time to live (TTL) for flow data in hours. Defaults to 2 hours.
	AnalyticsFlowTTL *int `json:"analyticsFlowTTL,omitempty"`
}

AnalyticsConfiguration is the Spec for the Analytics API. +k8s:openapi-gen=true

func (*AnalyticsConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AnalyticsConfiguration.

func (*AnalyticsConfiguration) DeepCopyInto

func (in *AnalyticsConfiguration) DeepCopyInto(out *AnalyticsConfiguration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AnalyticsInput

type AnalyticsInput struct {
	Metadata Metadata      `json:"metadata,omitempty"`
	Spec     AnalyticsSpec `json:"spec,omitempty"`
}

AnalyticsInput is the Schema for the analytics API. +k8s:openapi-gen=true

type AnalyticsList

type AnalyticsList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Analytics `json:"items"`
}

AnalyticsList contains a list of Analytics. +k8s:openapi-gen=true

func (*AnalyticsList) DeepCopy

func (in *AnalyticsList) DeepCopy() *AnalyticsList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AnalyticsList.

func (*AnalyticsList) DeepCopyInto

func (in *AnalyticsList) DeepCopyInto(out *AnalyticsList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AnalyticsList) DeepCopyObject

func (in *AnalyticsList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type AnalyticsSnmp

type AnalyticsSnmp struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   AnalyticsSnmpSpec   `json:"spec,omitempty"`
	Status AnalyticsSnmpStatus `json:"status,omitempty"`
}

AnalyticsSnmp is the Schema for the Analytics SNMP API. +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:resource:path=analyticssnmp,scope=Namespaced +kubebuilder:printcolumn:name="Active",type=boolean,JSONPath=`.status.active`

func (*AnalyticsSnmp) CommonStartupScript

func (c *AnalyticsSnmp) CommonStartupScript(command string, configs map[string]string) string

CommonStartupScript prepare common run service script

command - is a final command to run
configs - config files to be waited for and to be linked from configmap mount
 to a destination config folder (if destination is empty no link be done, only wait), e.g.
 { "api.${POD_IP}": "", "vnc_api.ini.${POD_IP}": "vnc_api.ini"}

func (*AnalyticsSnmp) CreateConfigMap

func (c *AnalyticsSnmp) CreateConfigMap(configMapName string,
	client client.Client,
	scheme *runtime.Scheme,
	request reconcile.Request) (*corev1.ConfigMap, error)

CreateConfigMap creates analytics snmp config map

func (*AnalyticsSnmp) DeepCopy

func (in *AnalyticsSnmp) DeepCopy() *AnalyticsSnmp

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AnalyticsSnmp.

func (*AnalyticsSnmp) DeepCopyInto

func (in *AnalyticsSnmp) DeepCopyInto(out *AnalyticsSnmp)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AnalyticsSnmp) DeepCopyObject

func (in *AnalyticsSnmp) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*AnalyticsSnmp) InstanceConfiguration

func (c *AnalyticsSnmp) InstanceConfiguration(podList []corev1.Pod, client client.Client,
) (data map[string]string, err error)

InstanceConfiguration create config data

func (*AnalyticsSnmp) ManageNodeStatus

func (c *AnalyticsSnmp) ManageNodeStatus(podNameIPMap map[string]NodeInfo,
	client client.Client) (updated bool, err error)

ManageNodeStatus updates nodes in status

func (*AnalyticsSnmp) PodIPListAndIPMapFromInstance

func (c *AnalyticsSnmp) PodIPListAndIPMapFromInstance(instanceType string, request reconcile.Request, reconcileClient client.Client) ([]corev1.Pod, map[string]NodeInfo, error)

PodIPListAndIPMapFromInstance gets a list with POD IPs and a map of POD names and IPs.

func (*AnalyticsSnmp) SetInstanceActive

func (c *AnalyticsSnmp) SetInstanceActive(client client.Client, activeStatus *bool, degradedStatus *bool, sts *appsv1.StatefulSet, request reconcile.Request) error

SetInstanceActive sets instance to active.

type AnalyticsSnmpConfiguration

type AnalyticsSnmpConfiguration struct {
	LogFilePath                       string       `json:"logFilePath,omitempty"`
	LogLocal                          string       `json:"logLocal,omitempty"`
	SnmpCollectorScanFrequency        *int         `json:"snmpCollectorScanFrequency,omitempty"`
	SnmpCollectorFastScanFrequency    *int         `json:"snmpCollectorFastScanFrequency,omitempty"`
	SnmpCollectorIntrospectListenPort *int         `json:"snmpCollectorIntrospectListenPort,omitempty"`
	SnmpCollectorLogFileName          string       `json:"snmpCollectorLogFileName,omitempty"`
	TopologyScanFrequency             *int         `json:"topologySnmpFrequency,omitempty"`
	TopologyIntrospectListenPort      *int         `json:"topologyIntrospectListenPort,omitempty"`
	TopologyLogFileName               string       `json:"topologyLogFileName,omitempty"`
	Containers                        []*Container `json:"containers,omitempty"`
}

AnalyticsSnmpConfiguration is the Spec for the Analytics SNMP API. +k8s:openapi-gen=true

func (*AnalyticsSnmpConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AnalyticsSnmpConfiguration.

func (*AnalyticsSnmpConfiguration) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AnalyticsSnmpInput

type AnalyticsSnmpInput struct {
	Metadata Metadata          `json:"metadata,omitempty"`
	Spec     AnalyticsSnmpSpec `json:"spec,omitempty"`
}

AnalyticsSnmpInput is the Schema for the analytics API. +k8s:openapi-gen=true

func (*AnalyticsSnmpInput) DeepCopyInto

func (in *AnalyticsSnmpInput) DeepCopyInto(out *AnalyticsSnmpInput)

type AnalyticsSnmpList

type AnalyticsSnmpList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []AnalyticsSnmp `json:"items"`
}

AnalyticsSnmpList contains a list of AnalyticsSnmp. +k8s:openapi-gen=true

func (*AnalyticsSnmpList) DeepCopy

func (in *AnalyticsSnmpList) DeepCopy() *AnalyticsSnmpList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlList.

func (*AnalyticsSnmpList) DeepCopyInto

func (in *AnalyticsSnmpList) DeepCopyInto(out *AnalyticsSnmpList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AnalyticsSnmpList) DeepCopyObject

func (in *AnalyticsSnmpList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type AnalyticsSnmpSpec

type AnalyticsSnmpSpec struct {
	CommonConfiguration  PodConfiguration           `json:"commonConfiguration,omitempty"`
	ServiceConfiguration AnalyticsSnmpConfiguration `json:"serviceConfiguration"`
}

AnalyticsSnmpSpec is the Spec for the Analytics SNMP API. +k8s:openapi-gen=true

func (*AnalyticsSnmpSpec) DeepCopy

func (in *AnalyticsSnmpSpec) DeepCopy() *AnalyticsSnmpSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AnalyticsSnmpSpec.

func (*AnalyticsSnmpSpec) DeepCopyInto

func (in *AnalyticsSnmpSpec) DeepCopyInto(out *AnalyticsSnmpSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AnalyticsSnmpStatus

type AnalyticsSnmpStatus struct {
	CommonStatus `json:",inline"`
}

AnalyticsSnmpStatus is the Status for the Analytics SNMP API. +k8s:openapi-gen=true

func (*AnalyticsSnmpStatus) DeepCopy

func (in *AnalyticsSnmpStatus) DeepCopy() *AnalyticsSnmpStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AnalyticsSnmpStatus.

func (*AnalyticsSnmpStatus) DeepCopyInto

func (in *AnalyticsSnmpStatus) DeepCopyInto(out *AnalyticsSnmpStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AnalyticsSpec

type AnalyticsSpec struct {
	CommonConfiguration  PodConfiguration       `json:"commonConfiguration,omitempty"`
	ServiceConfiguration AnalyticsConfiguration `json:"serviceConfiguration"`
}

AnalyticsSpec is the Spec for the Analytics API. +k8s:openapi-gen=true

func (*AnalyticsSpec) DeepCopy

func (in *AnalyticsSpec) DeepCopy() *AnalyticsSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AnalyticsSpec.

func (*AnalyticsSpec) DeepCopyInto

func (in *AnalyticsSpec) DeepCopyInto(out *AnalyticsSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AnalyticsStatus

type AnalyticsStatus struct {
	CommonStatus `json:",inline"`
	Endpoint     string `json:"endpoint,omitempty"`
}

AnalyticsStatus status of Analytics +k8s:openapi-gen=true

func (*AnalyticsStatus) DeepCopy

func (in *AnalyticsStatus) DeepCopy() *AnalyticsStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AnalyticsStatus.

func (*AnalyticsStatus) DeepCopyInto

func (in *AnalyticsStatus) DeepCopyInto(out *AnalyticsStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AuthParameters

type AuthParameters struct {
	AuthMode               AuthenticationMode     `json:"authMode,omitempty"`
	KeystoneAuthParameters KeystoneAuthParameters `json:"keystoneAuthParameters,omitempty"`
	KeystoneSecretName     *string                `json:"keystoneSecretName,omitempty"`
}

AuthParameters is Keystone auth options +k8s:openapi-gen=true

func (*AuthParameters) DeepCopy

func (in *AuthParameters) DeepCopy() *AuthParameters

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthParameters.

func (*AuthParameters) DeepCopyInto

func (in *AuthParameters) DeepCopyInto(out *AuthParameters)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AuthParameters) Prepare

func (ap *AuthParameters) Prepare(namespace string, client client.Client) error

Prepare makes default empty AuthParameters

type AuthenticationMode

type AuthenticationMode string

AuthenticationMode auth mode +k8s:openapi-gen=true +kubebuilder:validation:Enum=noauth;keystone

const (
	// AuthenticationModeNoAuth No auth mode
	AuthenticationModeNoAuth AuthenticationMode = "noauth"
	// AuthenticationModeKeystone Keytsone auth mode
	AuthenticationModeKeystone AuthenticationMode = "keystone"
)

type BGPPeer

type BGPPeer struct {
	Up     string `json:"up,omitempty"`
	Number string `json:"number,omitempty"`
}

BGPPeer bgp peer status +k8s:openapi-gen=true

func (*BGPPeer) DeepCopy

func (in *BGPPeer) DeepCopy() *BGPPeer

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BGPPeer.

func (*BGPPeer) DeepCopyInto

func (in *BGPPeer) DeepCopyInto(out *BGPPeer)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CNIConfig

type CNIConfig struct {
	ConfigPath string `json:"configPath,omitempty"`
	BinaryPath string `json:"binaryPath,omitempty"`
}

CNIConfig k8s cluster cni parameters +k8s:openapi-gen=true

type Cassandra

type Cassandra struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   CassandraSpec   `json:"spec,omitempty"`
	Status CassandraStatus `json:"status,omitempty"`
}

Cassandra is the Schema for the cassandras API. +k8s:openapi-gen=true +kubebuilder:subresource:status

func (*Cassandra) AddVolumesToIntendedSTS

func (c *Cassandra) AddVolumesToIntendedSTS(sts *appsv1.StatefulSet, volumeConfigMapMap map[string]string)

AddVolumesToIntendedSTS adds volumes to the Cassandra deployment.

func (*Cassandra) CommonStartupScript

func (c *Cassandra) CommonStartupScript(command string, configs map[string]string) string

CommonStartupScript prepare common run service script

command - is a final command to run
configs - config files to be waited for and to be linked from configmap mount
 to a destination config folder (if destination is empty no link be done, only wait), e.g.
 { "api.${POD_IP}": "", "vnc_api.ini.${POD_IP}": "vnc_api.ini"}

func (*Cassandra) ConfigurationParameters

func (c *Cassandra) ConfigurationParameters() *CassandraConfiguration

ConfigurationParameters sets the default for the configuration parameters.

func (*Cassandra) CreateConfigMap

func (c *Cassandra) CreateConfigMap(configMapName string,
	client client.Client,
	scheme *runtime.Scheme,
	request reconcile.Request) (*corev1.ConfigMap, error)

CreateConfigMap creates a configmap for cassandra service.

func (*Cassandra) CreateSecret

func (c *Cassandra) CreateSecret(secretName string,
	client client.Client,
	scheme *runtime.Scheme,
	request reconcile.Request) (*corev1.Secret, error)

CreateSecret creates a secret.

func (*Cassandra) DeepCopy

func (in *Cassandra) DeepCopy() *Cassandra

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cassandra.

func (*Cassandra) DeepCopyInto

func (in *Cassandra) DeepCopyInto(out *Cassandra)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Cassandra) DeepCopyObject

func (in *Cassandra) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Cassandra) InstanceConfiguration

func (c *Cassandra) InstanceConfiguration(request reconcile.Request,
	podList []corev1.Pod,
	nodes map[string]NodeInfo,
	seedsIPList []string,
	client client.Client) error

InstanceConfiguration creates the cassandra instance configuration.

func (*Cassandra) IsActive

func (c *Cassandra) IsActive(name string, namespace string, client client.Client) bool

IsActive returns true if instance is active.

func (*Cassandra) IsUpgrading

func (c *Cassandra) IsUpgrading(name string, namespace string, client client.Client) bool

IsUpgrading returns true if instance is upgrading.

func (*Cassandra) PodIPListAndIPMapFromInstance

func (c *Cassandra) PodIPListAndIPMapFromInstance(instanceType string, request reconcile.Request, reconcileClient client.Client) ([]corev1.Pod, map[string]NodeInfo, error)

PodIPListAndIPMapFromInstance gets a list with POD IPs and a map of POD names and IPs.

func (*Cassandra) PrepareSTS

func (c *Cassandra) PrepareSTS(sts *appsv1.StatefulSet, commonConfiguration *PodConfiguration, request reconcile.Request, scheme *runtime.Scheme) error

PrepareSTS prepares the intended deployment for the Cassandra object.

func (*Cassandra) QuerySTS

func (c *Cassandra) QuerySTS(name string, namespace string, reconcileClient client.Client) (*appsv1.StatefulSet, error)

QuerySTS queries the Cassandra STS

func (*Cassandra) UpdateStatus

func (c *Cassandra) UpdateStatus(cassandraConfig *CassandraConfiguration, nodes map[string]NodeInfo, sts *appsv1.StatefulSet) bool

UpdateStatus manages the status of the Cassandra nodes.

type CassandraClusterConfiguration

type CassandraClusterConfiguration struct {
	Port         int      `json:"port,omitempty"`
	CQLPort      int      `json:"cqlPort,omitempty"`
	JMXPort      int      `json:"jmxPort,omitempty"`
	ServerIPList []string `json:"serverIPList,omitempty"`
}

CassandraClusterConfiguration stores all information about Cassandra's endpoints.

func NewCassandraClusterConfiguration

func NewCassandraClusterConfiguration(name string, namespace string, client client.Client) (CassandraClusterConfiguration, error)

NewCassandraClusterConfiguration gets a struct containing various representations of Cassandra nodes string.

func (*CassandraClusterConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CassandraClusterConfiguration.

func (*CassandraClusterConfiguration) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CassandraClusterConfiguration) FillWithDefaultValues

func (c *CassandraClusterConfiguration) FillWithDefaultValues()

FillWithDefaultValues fills Cassandra config with default values

type CassandraConfigParameters

type CassandraConfigParameters struct {
	CompactionThroughputMbPerSec int `json:"compactionThroughputMbPerSec,omitempty"`
	ConcurrentReads              int `json:"concurrentReads,omitempty"`
	ConcurrentWrites             int `json:"concurrentWrites,omitempty"`
	// +kubebuilder:validation:Enum=heap_buffers;offheap_buffers;offheap_objects
	MemtableAllocationType           string `json:"memtableAllocationType,omitempty"`
	ConcurrentCompactors             int    `json:"concurrentCompactors,omitempty"`
	MemtableFlushWriters             int    `json:"memtableFlushWriters,omitempty"`
	ConcurrentCounterWrites          int    `json:"concurrentCounterWrites,omitempty"`
	ConcurrentMaterializedViewWrites int    `json:"concurrentMaterializedViewWrites,omitempty"`
}

CassandraConfigParameters defines additional parameters for Cassandra confgiuration +k8s:openapi-gen=true

type CassandraConfiguration

type CassandraConfiguration struct {
	Containers          []*Container              `json:"containers,omitempty"`
	ListenAddress       string                    `json:"listenAddress,omitempty"`
	Port                *int                      `json:"port,omitempty"`
	CqlPort             *int                      `json:"cqlPort,omitempty"`
	SslStoragePort      *int                      `json:"sslStoragePort,omitempty"`
	StoragePort         *int                      `json:"storagePort,omitempty"`
	JmxLocalPort        *int                      `json:"jmxLocalPort,omitempty"`
	MaxHeapSize         string                    `json:"maxHeapSize,omitempty"`
	MinHeapSize         string                    `json:"minHeapSize,omitempty"`
	StartRPC            *bool                     `json:"startRPC,omitempty"`
	MinimumDiskGB       *int                      `json:"minimumDiskGB,omitempty"`
	ReaperEnabled       *bool                     `json:"reaperEnabled,omitempty"`
	ReaperAppPort       *int                      `json:"reaperAppPort,omitempty"`
	ReaperAdmPort       *int                      `json:"reaperAdmPort,omitempty"`
	CassandraParameters CassandraConfigParameters `json:"cassandraParameters,omitempty"`
}

CassandraConfiguration is the Spec for the cassandras API. +k8s:openapi-gen=true

func (*CassandraConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CassandraConfiguration.

func (*CassandraConfiguration) DeepCopyInto

func (in *CassandraConfiguration) DeepCopyInto(out *CassandraConfiguration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CassandraInput

type CassandraInput struct {
	Metadata Metadata      `json:"metadata,omitempty"`
	Spec     CassandraSpec `json:"spec,omitempty"`
}

CassandraInput is the Schema for the analytics API. +k8s:openapi-gen=true

func (*CassandraInput) DeepCopyInto

func (in *CassandraInput) DeepCopyInto(out *CassandraInput)

type CassandraList

type CassandraList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Cassandra `json:"items"`
}

CassandraList contains a list of Cassandra. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*CassandraList) DeepCopy

func (in *CassandraList) DeepCopy() *CassandraList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CassandraList.

func (*CassandraList) DeepCopyInto

func (in *CassandraList) DeepCopyInto(out *CassandraList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CassandraList) DeepCopyObject

func (in *CassandraList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CassandraSpec

type CassandraSpec struct {
	CommonConfiguration  PodConfiguration       `json:"commonConfiguration,omitempty"`
	ServiceConfiguration CassandraConfiguration `json:"serviceConfiguration"`
}

CassandraSpec is the Spec for the cassandras API. +k8s:openapi-gen=true

func (*CassandraSpec) DeepCopy

func (in *CassandraSpec) DeepCopy() *CassandraSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CassandraSpec.

func (*CassandraSpec) DeepCopyInto

func (in *CassandraSpec) DeepCopyInto(out *CassandraSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CassandraStatus

type CassandraStatus struct {
	CommonStatus `json:",inline"`
	Ports        CassandraStatusPorts `json:"ports,omitempty"`
}

CassandraStatus defines the status of the cassandra object. +k8s:openapi-gen=true

func (*CassandraStatus) DeepCopy

func (in *CassandraStatus) DeepCopy() *CassandraStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CassandraStatus.

func (*CassandraStatus) DeepCopyInto

func (in *CassandraStatus) DeepCopyInto(out *CassandraStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CassandraStatusPorts

type CassandraStatusPorts struct {
	Port    string `json:"port,omitempty"`
	CqlPort string `json:"cqlPort,omitempty"`
	JmxPort string `json:"jmxPort,omitempty"`
}

CassandraStatusPorts defines the status of the ports of the cassandra object.

func (*CassandraStatusPorts) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CassandraStatusPorts.

func (*CassandraStatusPorts) DeepCopyInto

func (in *CassandraStatusPorts) DeepCopyInto(out *CassandraStatusPorts)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterNodes

type ClusterNodes struct {
	AnalyticsNodes      string
	AnalyticsDBNodes    string
	AnalyticsAlarmNodes string
	AnalyticsSnmpNodes  string
	ConfigNodes         string
	ControlNodes        string
}

type CombinedError

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

CombinedError provides a combined errors object for comfort logging

func (*CombinedError) Error

func (e *CombinedError) Error() string

type CommonStatus

type CommonStatus struct {
	Active        *bool               `json:"active,omitempty"`
	Degraded      *bool               `json:"degraded,omitempty"`
	Nodes         map[string]NodeInfo `json:"nodes,omitempty"`
	ConfigChanged *bool               `json:"configChanged,omitempty"`
}

CommonStatus is the common part of service status. +k8s:openapi-gen=true

func (*CommonStatus) DeepCopyInto

func (in *CommonStatus) DeepCopyInto(out *CommonStatus)

type ConditionStatus

type ConditionStatus string

ConditionStatus is used to indicate state of condition.

const (
	ConditionTrue  ConditionStatus = "True"
	ConditionFalse ConditionStatus = "False"
)

These are valid condition statuses. "ConditionTrue" means a resource is in the condition. "ConditionFalse" means a resource is not in the condition.

type Config

type Config struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ConfigSpec   `json:"spec,omitempty"`
	Status ConfigStatus `json:"status,omitempty"`
}

Config is the Schema for the configs API. +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:resource:path=configs,scope=Namespaced +kubebuilder:printcolumn:name="Endpoint",type=string,JSONPath=`.status.endpoint` +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +kubebuilder:printcolumn:name="Active",type=boolean,JSONPath=`.status.active`

func (*Config) AddVolumesToIntendedSTS

func (c *Config) AddVolumesToIntendedSTS(sts *appsv1.StatefulSet, volumeConfigMapMap map[string]string)

AddVolumesToIntendedSTS adds volumes to the config statefulset

func (*Config) CommonStartupScript

func (c *Config) CommonStartupScript(command string, configs map[string]string) string

CommonStartupScript prepare common run service script

command - is a final command to run
configs - config files to be waited for and to be linked from configmap mount
 to a destination config folder (if destination is empty no link be done, only wait), e.g.
 { "api.${POD_IP}": "", "vnc_api.ini.${POD_IP}": "vnc_api.ini"}

func (*Config) ConfigurationParameters

func (c *Config) ConfigurationParameters() ConfigConfiguration

ConfigurationParameters create config struct

func (*Config) CreateConfigMap

func (c *Config) CreateConfigMap(configMapName string,
	client client.Client,
	scheme *runtime.Scheme,
	request reconcile.Request) (*corev1.ConfigMap, error)

CreateConfigMap makes default empty ConfigMap

func (*Config) CreateSecret

func (c *Config) CreateSecret(secretName string,
	client client.Client,
	scheme *runtime.Scheme,
	request reconcile.Request) (*corev1.Secret, error)

CreateSecret creates a secret.

func (*Config) DeepCopy

func (in *Config) DeepCopy() *Config

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config.

func (*Config) DeepCopyInto

func (in *Config) DeepCopyInto(out *Config)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Config) DeepCopyObject

func (in *Config) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Config) InstanceConfiguration

func (c *Config) InstanceConfiguration(podList []corev1.Pod, client client.Client,
) (data map[string]string, err error)

InstanceConfiguration configures and updates configmaps

func (*Config) IsActive

func (c *Config) IsActive(name string, namespace string, client client.Client) bool

IsActive returns true if instance is active

func (*Config) ManageNodeStatus

func (c *Config) ManageNodeStatus(nodes map[string]NodeInfo,
	client client.Client) (updated bool, err error)

ManageNodeStatus updates nodes in status

func (*Config) PodIPListAndIPMapFromInstance

func (c *Config) PodIPListAndIPMapFromInstance(request reconcile.Request, reconcileClient client.Client) ([]corev1.Pod, map[string]NodeInfo, error)

PodIPListAndIPMapFromInstance gets a list with POD IPs and a map of POD names and IPs.

func (*Config) PrepareSTS

func (c *Config) PrepareSTS(sts *appsv1.StatefulSet, commonConfiguration *PodConfiguration, request reconcile.Request, scheme *runtime.Scheme) error

PrepareSTS prepares the intented statefulset for the config object

func (*Config) SetInstanceActive

func (c *Config) SetInstanceActive(client client.Client, activeStatus *bool, degradedStstus *bool, sts *appsv1.StatefulSet, request reconcile.Request) error

SetInstanceActive sets the Config instance to active

type ConfigClusterConfiguration

type ConfigClusterConfiguration struct {
	APIServerPort   int      `json:"apiServerPort,omitempty"`
	APIServerIPList []string `json:"apiServerIPList,omitempty"`
}

ConfigClusterConfiguration stores all information about service's endpoints under the Contrail Config

func NewConfigClusterConfiguration

func NewConfigClusterConfiguration(name, namespace string, client client.Client) (ConfigClusterConfiguration, error)

NewConfigClusterConfiguration gets a struct containing various representations of Config nodes string.

func (*ConfigClusterConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigClusterConfiguration.

func (*ConfigClusterConfiguration) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ConfigClusterConfiguration) FillWithDefaultValues

func (c *ConfigClusterConfiguration) FillWithDefaultValues()

FillWithDefaultValues sets the default port values if they are set to the zero value

type ConfigConfiguration

type ConfigConfiguration struct {
	Containers                  []*Container            `json:"containers,omitempty"`
	APIAdminPort                *int                    `json:"apiAdminPort,omitempty"`
	APIPort                     *int                    `json:"apiPort,omitempty"`
	ApiIntrospectPort           *int                    `json:"apiIntrospectPort,omitempty"`
	APIWorkerCount              *int                    `json:"apiWorkerCount,omitempty"`
	SchemaIntrospectPort        *int                    `json:"schemaIntrospectPort,omitempty"`
	DeviceManagerIntrospectPort *int                    `json:"deviceManagerIntrospectPort,omitempty"`
	SvcMonitorIntrospectPort    *int                    `json:"svcMonitorIntrospectPort,omitempty"`
	AAAMode                     AAAMode                 `json:"aaaMode,omitempty"`
	FabricMgmtIP                string                  `json:"fabricMgmtIP,omitempty"`
	LinklocalServiceConfig      *LinklocalServiceConfig `json:"linklocalServiceConfig,omitempty"`
	UseExternalTFTP             *bool                   `json:"useExternalTFTP,omitempty"`
	BgpAutoMesh                 *bool                   `json:"bgpAutoMesh,omitempty"`
	BgpEnable4Byte              *bool                   `json:"bgpEnable4Byte,omitempty"`
	GlobalASNNumber             *int                    `json:"globalASNNumber,omitempty"`
}

ConfigConfiguration is the Spec for the Config API. +k8s:openapi-gen=true

func (*ConfigConfiguration) DeepCopy

func (in *ConfigConfiguration) DeepCopy() *ConfigConfiguration

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigConfiguration.

func (*ConfigConfiguration) DeepCopyInto

func (in *ConfigConfiguration) DeepCopyInto(out *ConfigConfiguration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConfigInput

type ConfigInput struct {
	Metadata Metadata   `json:"metadata,omitempty"`
	Spec     ConfigSpec `json:"spec,omitempty"`
}

ConfigInput is the Schema for the analytics API. +k8s:openapi-gen=true

func (*ConfigInput) DeepCopyInto

func (in *ConfigInput) DeepCopyInto(out *ConfigInput)

type ConfigList

type ConfigList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Config `json:"items"`
}

ConfigList contains a list of Config. +k8s:openapi-gen=true

func (*ConfigList) DeepCopy

func (in *ConfigList) DeepCopy() *ConfigList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigList.

func (*ConfigList) DeepCopyInto

func (in *ConfigList) DeepCopyInto(out *ConfigList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ConfigList) DeepCopyObject

func (in *ConfigList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ConfigSpec

type ConfigSpec struct {
	CommonConfiguration  PodConfiguration    `json:"commonConfiguration,omitempty"`
	ServiceConfiguration ConfigConfiguration `json:"serviceConfiguration"`
}

ConfigSpec is the Spec for the Config API. +k8s:openapi-gen=true

func (*ConfigSpec) DeepCopy

func (in *ConfigSpec) DeepCopy() *ConfigSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigSpec.

func (*ConfigSpec) DeepCopyInto

func (in *ConfigSpec) DeepCopyInto(out *ConfigSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConfigStatus

type ConfigStatus struct {
	CommonStatus `json:",inline"`
	Endpoint     string `json:"endpoint,omitempty"`
}

ConfigStatus status of Config +k8s:openapi-gen=true

func (*ConfigStatus) DeepCopy

func (in *ConfigStatus) DeepCopy() *ConfigStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigStatus.

func (*ConfigStatus) DeepCopyInto

func (in *ConfigStatus) DeepCopyInto(out *ConfigStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Connection

type Connection struct {
	Type   string   `json:"type,omitempty"`
	Name   string   `json:"name,omitempty"`
	Status string   `json:"status,omitempty"`
	Nodes  []string `json:"nodes,omitempty"`
}

Connection connection status +k8s:openapi-gen=true

func (*Connection) DeepCopy

func (in *Connection) DeepCopy() *Connection

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Connection.

func (*Connection) DeepCopyInto

func (in *Connection) DeepCopyInto(out *Connection)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Container

type Container struct {
	Name    string   `json:"name,omitempty"`
	Image   string   `json:"image,omitempty"`
	Command []string `json:"command,omitempty"`
}

Container defines name, image and command. +k8s:openapi-gen=true

func (*Container) DeepCopy

func (in *Container) DeepCopy() *Container

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Container.

func (*Container) DeepCopyInto

func (in *Container) DeepCopyInto(out *Container)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Control

type Control struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ControlSpec   `json:"spec,omitempty"`
	Status ControlStatus `json:"status,omitempty"`
}

Control is the Schema for the controls API. +k8s:openapi-gen=true +kubebuilder:subresource:status

func (*Control) AddVolumesToIntendedSTS

func (c *Control) AddVolumesToIntendedSTS(sts *appsv1.StatefulSet, volumeConfigMapMap map[string]string)

AddVolumesToIntendedSTS adds volumes to the Control deployment.

func (*Control) CommonStartupScript

func (c *Control) CommonStartupScript(command string, configs map[string]string) string

CommonStartupScript prepare common run service script

command - is a final command to run
configs - config files to be waited for and to be linked from configmap mount
 to a destination config folder (if destination is empty no link be done, only wait), e.g.
 { "api.${POD_IP}": "", "vnc_api.ini.${POD_IP}": "vnc_api.ini"}

func (*Control) ConfigurationParameters

func (c *Control) ConfigurationParameters() ControlConfiguration

ConfigurationParameters makes ControlConfiguration

func (*Control) CreateConfigMap

func (c *Control) CreateConfigMap(configMapName string,
	client client.Client,
	scheme *runtime.Scheme,
	request reconcile.Request) (*corev1.ConfigMap, error)

CreateConfigMap creates configmap

func (*Control) CreateSecret

func (c *Control) CreateSecret(secretName string,
	client client.Client,
	scheme *runtime.Scheme,
	request reconcile.Request) (*corev1.Secret, error)

CreateSecret creates a secret.

func (*Control) DeepCopy

func (in *Control) DeepCopy() *Control

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Control.

func (*Control) DeepCopyInto

func (in *Control) DeepCopyInto(out *Control)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Control) DeepCopyObject

func (in *Control) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Control) InstanceConfiguration

func (c *Control) InstanceConfiguration(podList []corev1.Pod, client client.Client,
) (data map[string]string, err error)

InstanceConfiguration prepares control configmap

func (*Control) IsActive

func (c *Control) IsActive(name string, namespace string, client client.Client) bool

IsActive returns true if instance is active.

func (*Control) ManageNodeStatus

func (c *Control) ManageNodeStatus(nodes map[string]NodeInfo,
	client client.Client) (updated bool, err error)

func (*Control) PodIPListAndIPMapFromInstance

func (c *Control) PodIPListAndIPMapFromInstance(instanceType string, request reconcile.Request, reconcileClient client.Client) ([]corev1.Pod, map[string]NodeInfo, error)

PodIPListAndIPMapFromInstance gets a list with POD IPs and a map of POD names and IPs.

func (*Control) PrepareSTS

func (c *Control) PrepareSTS(sts *appsv1.StatefulSet, commonConfiguration *PodConfiguration, request reconcile.Request, scheme *runtime.Scheme) error

PrepareSTS prepares the intended deployment for the Control object.

func (*Control) SetInstanceActive

func (c *Control) SetInstanceActive(client client.Client, activeStatus *bool, degradedStatus *bool, sts *appsv1.StatefulSet, request reconcile.Request) error

SetInstanceActive sets instance to active.

type ControlClusterConfiguration

type ControlClusterConfiguration struct {
	XMPPPort            int      `json:"xmppPort,omitempty"`
	BGPPort             int      `json:"bgpPort,omitempty"`
	DNSPort             int      `json:"dnsPort,omitempty"`
	DNSIntrospectPort   int      `json:"dnsIntrospectPort,omitempty"`
	ControlServerIPList []string `json:"controlServerIPList,omitempty"`
}

ControlClusterConfiguration stores all information about services' endpoints under the Contrail Control

func NewControlClusterConfiguration

func NewControlClusterConfiguration(name string, namespace string, myclient client.Client) (ControlClusterConfiguration, error)

NewControlClusterConfiguration gets a struct containing various representations of Control nodes string.

func (*ControlClusterConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlClusterConfiguration.

func (*ControlClusterConfiguration) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ControlClusterConfiguration) FillWithDefaultValues

func (c *ControlClusterConfiguration) FillWithDefaultValues()

FillWithDefaultValues sets the default port values if they are set to the zero value

type ControlConfiguration

type ControlConfiguration struct {
	Containers        []*Container `json:"containers,omitempty"`
	BGPPort           *int         `json:"bgpPort,omitempty"`
	ASNNumber         *int         `json:"asnNumber,omitempty"`
	XMPPPort          *int         `json:"xmppPort,omitempty"`
	DNSPort           *int         `json:"dnsPort,omitempty"`
	DNSIntrospectPort *int         `json:"dnsIntrospectPort,omitempty"`
	Subcluster        string       `json:"subcluster,omitempty"`
	RndcKey           string       `json:"rndckey,omitempty"`
	// DataSubnet allow to set alternative network in which control, nodemanager
	// and dns services will listen. Local pod address from this subnet will be
	// discovered and used both in configuration for hostip directive and provision
	// script.
	// +kubebuilder:validation:Pattern=`^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$`
	DataSubnet string `json:"dataSubnet,omitempty"`
}

ControlConfiguration is the Spec for the controls API. +k8s:openapi-gen=true

func (*ControlConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlConfiguration.

func (*ControlConfiguration) DeepCopyInto

func (in *ControlConfiguration) DeepCopyInto(out *ControlConfiguration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ControlInput

type ControlInput struct {
	Metadata Metadata    `json:"metadata,omitempty"`
	Spec     ControlSpec `json:"spec,omitempty"`
}

ControlInput is the Schema for the analytics API. +k8s:openapi-gen=true

func (*ControlInput) DeepCopyInto

func (in *ControlInput) DeepCopyInto(out *ControlInput)

type ControlList

type ControlList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Control `json:"items"`
}

ControlList contains a list of Control. +k8s:openapi-gen=true

func (*ControlList) DeepCopy

func (in *ControlList) DeepCopy() *ControlList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlList.

func (*ControlList) DeepCopyInto

func (in *ControlList) DeepCopyInto(out *ControlList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ControlList) DeepCopyObject

func (in *ControlList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ControlSpec

type ControlSpec struct {
	CommonConfiguration  PodConfiguration     `json:"commonConfiguration,omitempty"`
	ServiceConfiguration ControlConfiguration `json:"serviceConfiguration"`
}

ControlSpec is the Spec for the controls API. +k8s:openapi-gen=true

func (*ControlSpec) DeepCopy

func (in *ControlSpec) DeepCopy() *ControlSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlSpec.

func (*ControlSpec) DeepCopyInto

func (in *ControlSpec) DeepCopyInto(out *ControlSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ControlStatus

type ControlStatus struct {
	CommonStatus `json:",inline"`
	Ports        ControlStatusPorts `json:"ports,omitempty"`
	Subcluster   string             `json:"subcluster,omitempty"`
	ASNNumber    string             `json:"asnNumber,omitempty"`
}

ControlStatus defines the observed state of Control. +k8s:openapi-gen=true

func (*ControlStatus) DeepCopy

func (in *ControlStatus) DeepCopy() *ControlStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlStatus.

func (*ControlStatus) DeepCopyInto

func (in *ControlStatus) DeepCopyInto(out *ControlStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ControlStatusPorts

type ControlStatusPorts struct {
	BGPPort           string `json:"bgpPort,omitempty"`
	XMPPPort          string `json:"xmppPort,omitempty"`
	DNSPort           string `json:"dnsPort,omitempty"`
	DNSIntrospectPort string `json:"dnsIntrospectPort,omitempty"`
}

ControlStatusPorts status of connection ports +k8s:openapi-gen=true

func (*ControlStatusPorts) DeepCopy

func (in *ControlStatusPorts) DeepCopy() *ControlStatusPorts

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlStatusPorts.

func (*ControlStatusPorts) DeepCopyInto

func (in *ControlStatusPorts) DeepCopyInto(out *ControlStatusPorts)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CrdStatus

type CrdStatus struct {
	Name   string `json:"name,omitempty"`
	Active *bool  `json:"active,omitempty"`
}

CrdStatus tracks status of CRD. +k8s:openapi-gen=true

func (*CrdStatus) DeepCopy

func (in *CrdStatus) DeepCopy() *CrdStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrdStatus.

func (*CrdStatus) DeepCopyInto

func (in *CrdStatus) DeepCopyInto(out *CrdStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KeystoneAuthParameters

type KeystoneAuthParameters struct {
	AuthProtocol      string  `json:"authProtocol,omitempty"`
	Address           string  `json:"address,omitempty"`
	Port              *int    `json:"port,omitempty"`
	AdminPort         *int    `json:"adminPort,omitempty"`
	AdminTenant       string  `json:"adminTenant,omitempty"`
	AdminUsername     string  `json:"adminUsername,omitempty"`
	AdminPassword     *string `json:"adminPassword,omitempty"`
	Region            string  `json:"region,omitempty"`
	UserDomainName    string  `json:"userDomainName,omitempty"`
	ProjectDomainName string  `json:"projectDomainName,omitempty"`
	Insecure          *bool   `json:"insecure,omitempty"`
}

KeystoneAuthParameters keystone parameters +k8s:openapi-gen=true

func (*KeystoneAuthParameters) DeepCopyInto

func (in *KeystoneAuthParameters) DeepCopyInto(out *KeystoneAuthParameters)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Kubemanager

type Kubemanager struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   KubemanagerSpec   `json:"spec,omitempty"`
	Status KubemanagerStatus `json:"status,omitempty"`
}

Kubemanager is the Schema for the kubemanager API. +k8s:openapi-gen=true +kubebuilder:subresource:status

func (*Kubemanager) AddVolumesToIntendedSTS

func (c *Kubemanager) AddVolumesToIntendedSTS(sts *appsv1.StatefulSet, volumeConfigMapMap map[string]string)

AddVolumesToIntendedSTS adds volumes to the Kubemanager deployment.

func (*Kubemanager) CommonStartupScript

func (c *Kubemanager) CommonStartupScript(command string, configs map[string]string) string

CommonStartupScript prepare common run service script

command - is a final command to run
configs - config files to be waited for and to be linked from configmap mount
 to a destination config folder (if destination is empty no link be done, only wait), e.g.
 { "api.${POD_IP}": "", "vnc_api.ini.${POD_IP}": "vnc_api.ini"}

func (*Kubemanager) ConfigurationParameters

func (c *Kubemanager) ConfigurationParameters(cinfo *KubernetesClusterConfig) (*KubemanagerConfiguration, error)

ConfigurationParameters creates KubemanagerConfiguration

func (*Kubemanager) CreateConfigMap

func (c *Kubemanager) CreateConfigMap(configMapName string, client client.Client, scheme *runtime.Scheme, request reconcile.Request) (*corev1.ConfigMap, error)

CreateConfigMap creates empty configmap

func (*Kubemanager) CreateSecret

func (c *Kubemanager) CreateSecret(secretName string,
	client client.Client,
	scheme *runtime.Scheme,
	request reconcile.Request) (*corev1.Secret, error)

CreateSecret creates a secret.

func (*Kubemanager) DeepCopy

func (in *Kubemanager) DeepCopy() *Kubemanager

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Kubemanager.

func (*Kubemanager) DeepCopyInto

func (in *Kubemanager) DeepCopyInto(out *Kubemanager)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Kubemanager) DeepCopyObject

func (in *Kubemanager) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Kubemanager) InstanceConfiguration

func (c *Kubemanager) InstanceConfiguration(podList []corev1.Pod, client client.Client,
) (data map[string]string, err error)

InstanceConfiguration creates kubemanager's instance sonfiguration

func (*Kubemanager) IsActive

func (c *Kubemanager) IsActive(name string, namespace string, client client.Client) bool

IsActive returns true if instance is active.

func (*Kubemanager) ManageNodeStatus

func (c *Kubemanager) ManageNodeStatus(nodes map[string]NodeInfo,
	client client.Client) (updated bool, err error)

ManageNodeStatus updates node status

func (*Kubemanager) PodIPListAndIPMapFromInstance

func (c *Kubemanager) PodIPListAndIPMapFromInstance(instanceType string, request reconcile.Request, reconcileClient client.Client) ([]corev1.Pod, map[string]NodeInfo, error)

PodIPListAndIPMapFromInstance gets a list with POD IPs and a map of POD names and IPs.

func (*Kubemanager) PrepareSTS

func (c *Kubemanager) PrepareSTS(sts *appsv1.StatefulSet, commonConfiguration *PodConfiguration, request reconcile.Request, scheme *runtime.Scheme) error

PrepareSTS prepares the intended deployment for the Kubemanager object.

func (*Kubemanager) SetInstanceActive

func (c *Kubemanager) SetInstanceActive(client client.Client, activeStatus *bool, degradedStatus *bool, sts *appsv1.StatefulSet, request reconcile.Request) error

SetInstanceActive sets the Kubemanager instance to active.

type KubemanagerConfiguration

type KubemanagerConfiguration struct {
	Containers           []*Container `json:"containers,omitempty"`
	CloudOrchestrator    string       `json:"cloudOrchestrator,omitempty"`
	KubernetesAPIServer  string       `json:"kubernetesAPIServer,omitempty"`
	KubernetesAPIPort    *int         `json:"kubernetesAPIPort,omitempty"`
	KubernetesAPISSLPort *int         `json:"kubernetesAPISSLPort,omitempty"`
	PodSubnet            string       `json:"podSubnet,omitempty"`
	ServiceSubnet        string       `json:"serviceSubnet,omitempty"`
	IPFabricSubnets      string       `json:"ipFabricSubnets,omitempty"`
	IPFabricForwarding   *bool        `json:"ipFabricForwarding,omitempty"`
	IPFabricSnat         *bool        `json:"ipFabricSnat,omitempty"`
	HostNetworkService   *bool        `json:"hostNetworkService,omitempty"`
	KubernetesTokenFile  string       `json:"kubernetesTokenFile,omitempty"`
	PublicFIPPool        string       `json:"publicFIPPool,omitempty"`
}

KubemanagerConfiguration is the configuration for the kubemanager API. +k8s:openapi-gen=true

func (*KubemanagerConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubemanagerConfiguration.

func (*KubemanagerConfiguration) DeepCopyInto

func (in *KubemanagerConfiguration) DeepCopyInto(out *KubemanagerConfiguration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KubemanagerInput

type KubemanagerInput struct {
	Metadata Metadata        `json:"metadata,omitempty"`
	Spec     KubemanagerSpec `json:"spec,omitempty"`
}

KubemanagerInput is the Schema for the analytics API. +k8s:openapi-gen=true

func (*KubemanagerInput) DeepCopyInto

func (in *KubemanagerInput) DeepCopyInto(out *KubemanagerInput)

type KubemanagerList

type KubemanagerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Kubemanager `json:"items"`
}

KubemanagerList contains a list of Kubemanager. +k8s:openapi-gen=true

func (*KubemanagerList) DeepCopy

func (in *KubemanagerList) DeepCopy() *KubemanagerList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubemanagerList.

func (*KubemanagerList) DeepCopyInto

func (in *KubemanagerList) DeepCopyInto(out *KubemanagerList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*KubemanagerList) DeepCopyObject

func (in *KubemanagerList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type KubemanagerSpec

type KubemanagerSpec struct {
	CommonConfiguration  PodConfiguration         `json:"commonConfiguration,omitempty"`
	ServiceConfiguration KubemanagerConfiguration `json:"serviceConfiguration"`
}

KubemanagerSpec is the Spec for the kubemanager API. +k8s:openapi-gen=true

func (*KubemanagerSpec) DeepCopy

func (in *KubemanagerSpec) DeepCopy() *KubemanagerSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubemanagerSpec.

func (*KubemanagerSpec) DeepCopyInto

func (in *KubemanagerSpec) DeepCopyInto(out *KubemanagerSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KubemanagerStatus

type KubemanagerStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file
	// Add custom validation using kubebuilder tags: https://book.kubebuilder.io/beyond_basics/generating_crd.html
	CommonStatus `json:",inline"`
}

KubemanagerStatus is the Status for the kubemanager API. +k8s:openapi-gen=true

func (*KubemanagerStatus) DeepCopy

func (in *KubemanagerStatus) DeepCopy() *KubemanagerStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubemanagerStatus.

func (*KubemanagerStatus) DeepCopyInto

func (in *KubemanagerStatus) DeepCopyInto(out *KubemanagerStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KubernetesClusterConfig

type KubernetesClusterConfig struct {
	ControlPlaneEndpoint string                      `json:"controlPlaneEndpoint,omitempty"`
	ClusterName          string                      `json:"clusterName,omitempty"`
	Networking           KubernetesClusterNetworking `json:"networking,omitempty"`
}

KubernetesClusterConfig k8s cluster parameters +k8s:openapi-gen=true

func ClusterParameters

func ClusterParameters(client client.Client) (*KubernetesClusterConfig, error)

ClusterParameters returns cluster configuration, merged from manager configuration and system configmaps

func (*KubernetesClusterConfig) KubernetesAPISSLPort

func (c *KubernetesClusterConfig) KubernetesAPISSLPort() (int, error)

KubernetesAPISSLPort gathers SSL Port from Kubernetes Cluster via kubeadm-config ConfigMap

func (*KubernetesClusterConfig) KubernetesAPIServer

func (c *KubernetesClusterConfig) KubernetesAPIServer() (string, error)

KubernetesAPIServer gathers API Server from Kubernetes Cluster via kubeadm-config ConfigMap

type KubernetesClusterNetworking

type KubernetesClusterNetworking struct {
	DNSDomain     string    `json:"dnsDomain,omitempty"`
	PodSubnet     string    `json:"podSubnet,omitempty"`
	ServiceSubnet string    `json:"serviceSubnet,omitempty"`
	CNIConfig     CNIConfig `json:"cniConfig,omitempty"`
}

KubernetesClusterNetworking k8s cluster networking parameters +k8s:openapi-gen=true

type LinklocalServiceConfig

type LinklocalServiceConfig struct {
	IPFabricServiceHost string  `json:"ipFabricServiceHost,omitempty"`
	IPFabricServicePort *int    `json:"ipFabricServicePort,omitempty"`
	Name                *string `json:"name,omitempty"`
	Port                *int    `json:"port,omitempty"`
	IP                  *string `json:"ip,omitempty"`
}

LinklocalServiceConfig is the Spec for link local coniguration +k8s:openapi-gen=true

func (*LinklocalServiceConfig) DeepCopyInto

func (in *LinklocalServiceConfig) DeepCopyInto(out *LinklocalServiceConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Manager

type Manager struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ManagerSpec   `json:"spec,omitempty"`
	Status ManagerStatus `json:"status,omitempty"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object Manager is the Schema for the managers API. +k8s:openapi-gen=true +kubebuilder:subresource:status

func GetManagerObject

func GetManagerObject(clnt client.Client) (*Manager, error)

func (*Manager) Cassandra

func (m *Manager) Cassandra() *Cassandra

func (*Manager) Create

func (m *Manager) Create(client client.Client) error

func (*Manager) DeepCopy

func (in *Manager) DeepCopy() *Manager

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Manager.

func (*Manager) DeepCopyInto

func (in *Manager) DeepCopyInto(out *Manager)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Manager) DeepCopyObject

func (in *Manager) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Manager) Delete

func (m *Manager) Delete(client client.Client) error

func (*Manager) Get

func (m *Manager) Get(client client.Client, request reconcile.Request) error

func (*Manager) GetObjectFromObjectList

func (m *Manager) GetObjectFromObjectList(objectList *[]*interface{}, request reconcile.Request) interface{}

func (Manager) IsClusterReady

func (m Manager) IsClusterReady() bool

func (*Manager) IsVrouterActiveOnControllers

func (m *Manager) IsVrouterActiveOnControllers(clnt client.Client) bool

IsVrouterActiveOnControllers checks if vrouters are active on master nodes

func (*Manager) Update

func (m *Manager) Update(client client.Client) error

type ManagerCondition

type ManagerCondition struct {
	// Type of manager condition.
	Type ManagerConditionType `json:"type"`
	// Status of the condition, one of True or False.
	Status ConditionStatus `json:"status"`
}

ManagerCondition is used to represent cluster condition

func (*ManagerCondition) DeepCopy

func (in *ManagerCondition) DeepCopy() *ManagerCondition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagerCondition.

func (*ManagerCondition) DeepCopyInto

func (in *ManagerCondition) DeepCopyInto(out *ManagerCondition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ManagerConditionType

type ManagerConditionType string

ManagerConditionType is used to represent condition of manager.

const (
	ManagerReady ManagerConditionType = "Ready"
)

These are valid conditions of manager.

type ManagerConfiguration

type ManagerConfiguration struct {
	// NodeSelector is a selector which must be true for the pod to fit on a node.
	// Selector which must match a node's labels for the pod to be scheduled on that node.
	// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/.
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty" protobuf:"bytes,7,rep,name=nodeSelector"`
	// ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec.
	ImagePullSecrets []string `json:"imagePullSecrets,omitempty"`
	// If specified, the pod's tolerations.
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty" protobuf:"bytes,22,opt,name=tolerations"`
	// AuthParameters auth parameters
	// +optional
	AuthParameters AuthParameters `json:"authParameters,omitempty"`
	// Kubernetes Cluster Configuration
	// +kubebuilder:validation:Enum=info;debug;warning;error;critical;none
	// +optional
	LogLevel string `json:"logLevel,omitempty"`
	// OS family
	// +optional
	Distribution *string `json:"distribution,omitempty"`
	// Certificate private key length
	// +optional
	CertKeyLength int `json:"certKeyLength,omitempty"`
	// Certificate signer
	// +optional
	CertSigner *string `json:"certSigner,omitempty"`
}

ManagerConfiguration is the common services struct. +k8s:openapi-gen=true

func (*ManagerConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagerConfiguration.

func (*ManagerConfiguration) DeepCopyInto

func (in *ManagerConfiguration) DeepCopyInto(out *ManagerConfiguration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ManagerList

type ManagerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Manager `json:"items"`
}

ManagerList contains a list of Manager.

func (*ManagerList) DeepCopy

func (in *ManagerList) DeepCopy() *ManagerList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagerList.

func (*ManagerList) DeepCopyInto

func (in *ManagerList) DeepCopyInto(out *ManagerList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ManagerList) DeepCopyObject

func (in *ManagerList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ManagerSpec

type ManagerSpec struct {
	// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
	// Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file
	// Add custom validation using kubebuilder tags: https://book.kubebuilder.io/beyond_basics/generating_crd.html
	CommonConfiguration ManagerConfiguration `json:"commonConfiguration,omitempty"`
	Services            Services             `json:"services,omitempty"`
}

ManagerSpec defines the desired state of Manager. +k8s:openapi-gen=true

func (*ManagerSpec) DeepCopy

func (in *ManagerSpec) DeepCopy() *ManagerSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagerSpec.

func (*ManagerSpec) DeepCopyInto

func (in *ManagerSpec) DeepCopyInto(out *ManagerSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ManagerStatus

type ManagerStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file
	// Add custom validation using kubebuilder tags: https://book.kubebuilder.io/beyond_basics/generating_crd.html
	AnalyticsSnmp  *ServiceStatus   `json:"analyticsSnmp,omitempty"`
	AnalyticsAlarm *ServiceStatus   `json:"analyticsAlarm,omitempty"`
	Analytics      *ServiceStatus   `json:"analytics,omitempty"`
	Config         *ServiceStatus   `json:"config,omitempty"`
	Controls       []*ServiceStatus `json:"controls,omitempty"`
	Kubemanager    *ServiceStatus   `json:"kubemanager,omitempty"`
	QueryEngine    *ServiceStatus   `json:"queryengine,omitempty"`
	Webui          *ServiceStatus   `json:"webui,omitempty"`
	Vrouters       []*ServiceStatus `json:"vrouters,omitempty"`
	Cassandras     []*ServiceStatus `json:"cassandras,omitempty"`
	Zookeeper      *ServiceStatus   `json:"zookeeper,omitempty"`
	Rabbitmq       *ServiceStatus   `json:"rabbitmq,omitempty"`
	Redis          []*ServiceStatus `json:"redis,omitempty"`
	CrdStatus      []CrdStatus      `json:"crdStatus,omitempty"`
	ZiuState       ZIUStatus        `json:"ziuState,omitempty"`
	// +optional
	// +patchMergeKey=type
	// +patchStrategy=merge
	Conditions []ManagerCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
}

ManagerStatus defines the observed state of Manager. +k8s:openapi-gen=true

func (*ManagerStatus) DeepCopy

func (in *ManagerStatus) DeepCopy() *ManagerStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagerStatus.

func (*ManagerStatus) DeepCopyInto

func (in *ManagerStatus) DeepCopyInto(out *ManagerStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Metadata

type Metadata struct {
	Name   string            `json:"name,omitempty"`
	Labels map[string]string `json:"labels,omitempty"`
}

Input data is the Schema for the analytics API. +k8s:openapi-gen=true

type NodeInfo

type NodeInfo struct {
	IP       string `json:"ip,omitempty"`
	Hostname string `json:"hostname,omitempty"`
}

type NodeWatcher

type NodeWatcher interface {
	GetEmptyListObject() runtime.Object
	GetItems(list interface{}) []types.NamespacedName
}

type PodAlternativeIPs

type PodAlternativeIPs struct {
	// Function which operate over pod object
	// to retrieve additional IP addresses used
	// by this pod.
	Retriever podAltIPsRetriver
	// ServiceIP through which pod can be reached.
	ServiceIP string
}

PodAlternativeIPs alternative IPs list for cert alt names subject +k8s:deepcopy-gen=false

type PodConfiguration

type PodConfiguration struct {
	// NodeSelector is a selector which must be true for the pod to fit on a node.
	// Selector which must match a node's labels for the pod to be scheduled on that node.
	// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/.
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty" protobuf:"bytes,7,rep,name=nodeSelector"`
	// ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec.
	ImagePullSecrets []string `json:"imagePullSecrets,omitempty"`
	// If specified, the pod's tolerations.
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty" protobuf:"bytes,22,opt,name=tolerations"`
	// AuthParameters auth parameters
	// +optional
	AuthParameters AuthParameters `json:"authParameters,omitempty"`
	// Kubernetes Cluster Configuration
	// +kubebuilder:validation:Enum=info;debug;warning;error;critical;none
	// +optional
	LogLevel string `json:"logLevel,omitempty"`
	// OS family
	// +optional
	Distribution *string `json:"distribution,omitempty"`
}

PodConfiguration is the common services struct. +k8s:openapi-gen=true

func (*PodConfiguration) DeepCopy

func (in *PodConfiguration) DeepCopy() *PodConfiguration

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodConfiguration.

func (*PodConfiguration) DeepCopyInto

func (in *PodConfiguration) DeepCopyInto(out *PodConfiguration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PodConfiguration) IntrospectionListenAddress

func (cc *PodConfiguration) IntrospectionListenAddress(addr string) string

IntrospectionListenAddress returns listen address for instrospection

type QueryEngine

type QueryEngine struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   QueryEngineSpec   `json:"spec,omitempty"`
	Status QueryEngineStatus `json:"status,omitempty"`
}

QueryEngine is the Schema for the analyticsdb query engine. +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:resource:path=queryengine,scope=Namespaced +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +kubebuilder:printcolumn:name="Active",type=boolean,JSONPath=`.status.active`

func (*QueryEngine) AddVolumesToIntendedSTS

func (c *QueryEngine) AddVolumesToIntendedSTS(sts *appsv1.StatefulSet, volumeConfigMapMap map[string]string)

AddVolumesToIntendedSTS adds volumes to the queryengine statefulset

func (*QueryEngine) CommonStartupScript

func (c *QueryEngine) CommonStartupScript(command string, configs map[string]string) string

CommonStartupScript prepare common run service script

command - is a final command to run
configs - config files to be waited for and to be linked from configmap mount
 to a destination config folder (if destination is empty no link be done, only wait), e.g.
 { "api.${POD_IP}": "", "vnc_api.ini.${POD_IP}": "vnc_api.ini"}

func (*QueryEngine) ConfigurationParameters

func (c *QueryEngine) ConfigurationParameters() QueryEngineConfiguration

ConfigurationParameters create queryengine struct

func (*QueryEngine) CreateConfigMap

func (c *QueryEngine) CreateConfigMap(configMapName string,
	client client.Client,
	scheme *runtime.Scheme,
	request reconcile.Request) (*corev1.ConfigMap, error)

CreateConfigMap makes default empty ConfigMap

func (*QueryEngine) CreateSecret

func (c *QueryEngine) CreateSecret(secretName string,
	client client.Client,
	scheme *runtime.Scheme,
	request reconcile.Request) (*corev1.Secret, error)

CreateSecret creates a secret.

func (*QueryEngine) DeepCopy

func (in *QueryEngine) DeepCopy() *QueryEngine

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueryEngine.

func (*QueryEngine) DeepCopyInto

func (in *QueryEngine) DeepCopyInto(out *QueryEngine)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*QueryEngine) DeepCopyObject

func (in *QueryEngine) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*QueryEngine) InstanceConfiguration

func (c *QueryEngine) InstanceConfiguration(podList []corev1.Pod, client client.Client,
) (data map[string]string, err error)

InstanceConfiguration configures and updates configmaps

func (*QueryEngine) IsActive

func (c *QueryEngine) IsActive(name string, namespace string, client client.Client) bool

IsActive returns true if instance is active

func (*QueryEngine) ManageNodeStatus

func (c *QueryEngine) ManageNodeStatus(nodes map[string]NodeInfo,
	client client.Client) (updated bool, err error)

ManageNodeStatus updates nodes in status

func (*QueryEngine) PodIPListAndIPMapFromInstance

func (c *QueryEngine) PodIPListAndIPMapFromInstance(request reconcile.Request, reconcileClient client.Client) ([]corev1.Pod, map[string]NodeInfo, error)

PodIPListAndIPMapFromInstance gets a list with POD IPs and a map of POD names and IPs.

func (*QueryEngine) PrepareSTS

func (c *QueryEngine) PrepareSTS(sts *appsv1.StatefulSet, commonConfiguration *PodConfiguration, request reconcile.Request, scheme *runtime.Scheme) error

PrepareSTS prepares the intented statefulset for the queryengine object

func (*QueryEngine) SetInstanceActive

func (c *QueryEngine) SetInstanceActive(client client.Client, activeStatus *bool, degradedStatus *bool, sts *appsv1.StatefulSet, request reconcile.Request) error

SetInstanceActive sets the QueryEngine instance to active

type QueryEngineClusterConfiguration

type QueryEngineClusterConfiguration struct {
	QueryEngineServerPort   int      `json:"analyticsdbServerPort,omitempty"`
	QueryEngineServerIPList []string `json:"analyticsdbServerIPList,omitempty"`
}

QueryEngineConfiguration stores all information about service's endpoints under the Contrail AnalyticsDB query engine

func NewQueryEngineClusterConfiguration

func NewQueryEngineClusterConfiguration(name, namespace string, client client.Client) (QueryEngineClusterConfiguration, error)

NewQueryEngineClusterConfiguration gets a struct containing various representations of QueryEngine nodes string.

func (*QueryEngineClusterConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueryEngineClusterConfiguration.

func (*QueryEngineClusterConfiguration) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*QueryEngineClusterConfiguration) FillWithDefaultValues

func (c *QueryEngineClusterConfiguration) FillWithDefaultValues()

FillWithDefaultValues sets the default port values if they are set to the zero value

type QueryEngineConfiguration

type QueryEngineConfiguration struct {
	AnalyticsdbPort           *int         `json:"analyticsdbPort,omitempty"`
	AnalyticsdbIntrospectPort *int         `json:"analyticsdbIntrospectPort,omitempty"`
	Containers                []*Container `json:"containers,omitempty"`
}

QueryEngineConfiguration is the Spec for the AnalyticsDB query engine. +k8s:openapi-gen=true

func (*QueryEngineConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueryEngineConfiguration.

func (*QueryEngineConfiguration) DeepCopyInto

func (in *QueryEngineConfiguration) DeepCopyInto(out *QueryEngineConfiguration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type QueryEngineInput

type QueryEngineInput struct {
	Metadata Metadata        `json:"metadata,omitempty"`
	Spec     QueryEngineSpec `json:"spec,omitempty"`
}

QueryEngineInput is the Schema for the analytics API. +k8s:openapi-gen=true

type QueryEngineList

type QueryEngineList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []QueryEngine `json:"items"`
}

QueryEngineList contains a list of QueryEngine. +k8s:openapi-gen=true

func (*QueryEngineList) DeepCopy

func (in *QueryEngineList) DeepCopy() *QueryEngineList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueryEngineList.

func (*QueryEngineList) DeepCopyInto

func (in *QueryEngineList) DeepCopyInto(out *QueryEngineList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*QueryEngineList) DeepCopyObject

func (in *QueryEngineList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type QueryEngineSpec

type QueryEngineSpec struct {
	CommonConfiguration  PodConfiguration         `json:"commonConfiguration,omitempty"`
	ServiceConfiguration QueryEngineConfiguration `json:"serviceConfiguration"`
}

QueryEngineSpec is the Spec for the AnalyticsDB query engine. +k8s:openapi-gen=true

func (*QueryEngineSpec) DeepCopy

func (in *QueryEngineSpec) DeepCopy() *QueryEngineSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueryEngineSpec.

func (*QueryEngineSpec) DeepCopyInto

func (in *QueryEngineSpec) DeepCopyInto(out *QueryEngineSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type QueryEngineStatus

type QueryEngineStatus struct {
	CommonStatus `json:",inline"`
}

QueryEngineStatus status of QueryEngine +k8s:openapi-gen=true

func (*QueryEngineStatus) DeepCopy

func (in *QueryEngineStatus) DeepCopy() *QueryEngineStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueryEngineStatus.

func (*QueryEngineStatus) DeepCopyInto

func (in *QueryEngineStatus) DeepCopyInto(out *QueryEngineStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Rabbitmq

type Rabbitmq struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   RabbitmqSpec   `json:"spec,omitempty"`
	Status RabbitmqStatus `json:"status,omitempty"`
}

Rabbitmq is the Schema for the rabbitmqs API. +k8s:openapi-gen=true +kubebuilder:subresource:status

func (*Rabbitmq) AddVolumesToIntendedSTS

func (c *Rabbitmq) AddVolumesToIntendedSTS(sts *appsv1.StatefulSet, volumeConfigMapMap map[string]string)

AddVolumesToIntendedSTS adds volumes to the Rabbitmq deployment.

func (*Rabbitmq) ConfigurationParameters

func (c *Rabbitmq) ConfigurationParameters()

func (*Rabbitmq) CreateConfigMap

func (c *Rabbitmq) CreateConfigMap(configMapName string,
	client client.Client,
	scheme *runtime.Scheme,
	request reconcile.Request) (*corev1.ConfigMap, error)

func (*Rabbitmq) CreateSecret

func (c *Rabbitmq) CreateSecret(secretName string,
	client client.Client,
	scheme *runtime.Scheme,
	request reconcile.Request) (*corev1.Secret, error)

func (*Rabbitmq) DeepCopy

func (in *Rabbitmq) DeepCopy() *Rabbitmq

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rabbitmq.

func (*Rabbitmq) DeepCopyInto

func (in *Rabbitmq) DeepCopyInto(out *Rabbitmq)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Rabbitmq) DeepCopyObject

func (in *Rabbitmq) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Rabbitmq) InstanceConfiguration

func (c *Rabbitmq) InstanceConfiguration(podList []corev1.Pod, client client.Client,
) (data map[string]string, err error)

InstanceConfiguration prepare rabbit configs

func (*Rabbitmq) IsActive

func (c *Rabbitmq) IsActive(name string, namespace string, client client.Client) bool

IsActive returns true if instance is active.

func (*Rabbitmq) IsUpgrading

func (c *Rabbitmq) IsUpgrading(name string, namespace string, client client.Client) bool

IsUpgrading returns true if instance is upgrading.

func (*Rabbitmq) ManageNodeStatus

func (c *Rabbitmq) ManageNodeStatus(nodes map[string]NodeInfo,
	client client.Client) (updated bool, err error)

func (*Rabbitmq) PodIPListAndIPMapFromInstance

func (c *Rabbitmq) PodIPListAndIPMapFromInstance(instanceType string, request reconcile.Request, reconcileClient client.Client) ([]corev1.Pod, map[string]NodeInfo, error)

PodIPListAndIPMapFromInstance gets a list with POD IPs and a map of POD names and IPs.

func (*Rabbitmq) PrepareSTS

func (c *Rabbitmq) PrepareSTS(sts *appsv1.StatefulSet, commonConfiguration *PodConfiguration, request reconcile.Request, scheme *runtime.Scheme) error

PrepareSTS prepares the intended deployment for the Rabbitmq object.

func (*Rabbitmq) SetInstanceActive

func (c *Rabbitmq) SetInstanceActive(client client.Client, activeStatus *bool, degradedStatus *bool, sts *appsv1.StatefulSet, request reconcile.Request) error

SetInstanceActive sets the Cassandra instance to active.

func (*Rabbitmq) UpdateSecret

func (c *Rabbitmq) UpdateSecret(secret *corev1.Secret, client client.Client) (updated bool, err error)

UpdateSecret

type RabbitmqClusterConfiguration

type RabbitmqClusterConfiguration struct {
	Port         int      `json:"port,omitempty"`
	ServerIPList []string `json:"serverIPList,omitempty"`
	Secret       string   `json:"secret,omitempty"`
}

RabbitmqClusterConfiguration stores all information about Rabbitmq's endpoints.

func NewRabbitmqClusterConfiguration

func NewRabbitmqClusterConfiguration(name, namespace string, client client.Client) (RabbitmqClusterConfiguration, error)

NewRabbitmqClusterConfiguration gets a struct containing various representations of Rabbitmq nodes string.

func (*RabbitmqClusterConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RabbitmqClusterConfiguration.

func (*RabbitmqClusterConfiguration) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RabbitmqClusterConfiguration) FillWithDefaultValues

func (c *RabbitmqClusterConfiguration) FillWithDefaultValues()

FillWithDefaultValues fills Rabbitmq config with default values

type RabbitmqConfiguration

type RabbitmqConfiguration struct {
	Containers   []*Container `json:"containers,omitempty"`
	Port         *int         `json:"port,omitempty"`
	ErlEpmdPort  *int         `json:"erlEpmdPort,omitempty"`
	ErlangCookie string       `json:"erlangCookie,omitempty"`
	Vhost        string       `json:"vhost,omitempty"`
	User         string       `json:"user,omitempty"`
	Password     string       `json:"password,omitempty"`
	Secret       string       `json:"secret,omitempty"`
	// +kubebuilder:validation:Enum=exactly;all;nodes
	MirroredQueueMode        *string                 `json:"mirroredQueueMode,omitempty"`
	ClusterPartitionHandling *string                 `json:"clusterPartitionHandling,omitempty"`
	TCPListenOptions         *TCPListenOptionsConfig `json:"tcpListenOptions,omitempty"`
}

RabbitmqConfiguration is the Spec for the cassandras API. +k8s:openapi-gen=true

func (*RabbitmqConfiguration) DeepCopyInto

func (in *RabbitmqConfiguration) DeepCopyInto(out *RabbitmqConfiguration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RabbitmqInput

type RabbitmqInput struct {
	Metadata Metadata     `json:"metadata,omitempty"`
	Spec     RabbitmqSpec `json:"spec,omitempty"`
}

RabbitmqInput is the Schema for the analytics API. +k8s:openapi-gen=true

func (*RabbitmqInput) DeepCopyInto

func (in *RabbitmqInput) DeepCopyInto(out *RabbitmqInput)

type RabbitmqList

type RabbitmqList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Rabbitmq `json:"items"`
}

RabbitmqList contains a list of Rabbitmq.

func (*RabbitmqList) DeepCopy

func (in *RabbitmqList) DeepCopy() *RabbitmqList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RabbitmqList.

func (*RabbitmqList) DeepCopyInto

func (in *RabbitmqList) DeepCopyInto(out *RabbitmqList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RabbitmqList) DeepCopyObject

func (in *RabbitmqList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RabbitmqSpec

type RabbitmqSpec struct {
	CommonConfiguration  PodConfiguration      `json:"commonConfiguration,omitempty"`
	ServiceConfiguration RabbitmqConfiguration `json:"serviceConfiguration"`
}

RabbitmqSpec is the Spec for the cassandras API. +k8s:openapi-gen=true

func (*RabbitmqSpec) DeepCopy

func (in *RabbitmqSpec) DeepCopy() *RabbitmqSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RabbitmqSpec.

func (*RabbitmqSpec) DeepCopyInto

func (in *RabbitmqSpec) DeepCopyInto(out *RabbitmqSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RabbitmqStatus

type RabbitmqStatus struct {
	CommonStatus `json:",inline"`
	Secret       string `json:"secret,omitempty"`
}

RabbitmqStatus +k8s:openapi-gen=true

func (*RabbitmqStatus) DeepCopy

func (in *RabbitmqStatus) DeepCopy() *RabbitmqStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RabbitmqStatus.

func (*RabbitmqStatus) DeepCopyInto

func (in *RabbitmqStatus) DeepCopyInto(out *RabbitmqStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Redis

type Redis struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   RedisSpec   `json:"spec,omitempty"`
	Status RedisStatus `json:"status,omitempty"`
}

Redis is the Schema for the redis API. +k8s:openapi-gen=true +kubebuilder:subresource:status

func (*Redis) AddVolumesToIntendedSTS

func (c *Redis) AddVolumesToIntendedSTS(sts *appsv1.StatefulSet, volumeConfigMapMap map[string]string)

AddVolumesToIntendedSTS adds volumes to the Redis deployment.

func (*Redis) CommonStartupScript

func (c *Redis) CommonStartupScript(command string, configs map[string]string) string

CommonStartupScript prepare common run service script

command - is a final command to run
configs - config files to be waited for and to be linked from configmap mount
 to a destination config folder (if destination is empty no link be done, only wait), e.g.
 { "api.${POD_IP}": "", "vnc_api.ini.${POD_IP}": "vnc_api.ini"}

func (*Redis) ConfigurationParameters

func (c *Redis) ConfigurationParameters() *RedisConfiguration

ConfigurationParameters sets the default for the configuration parameters.

func (*Redis) CreateConfigMap

func (c *Redis) CreateConfigMap(configMapName string,
	client client.Client,
	scheme *runtime.Scheme,
	request reconcile.Request) (*corev1.ConfigMap, error)

CreateConfigMap creates a configmap for redis service.

func (*Redis) CreateSecret

func (c *Redis) CreateSecret(secretName string,
	client client.Client,
	scheme *runtime.Scheme,
	request reconcile.Request) (*corev1.Secret, error)

CreateSecret creates a secret.

func (*Redis) DeepCopy

func (in *Redis) DeepCopy() *Redis

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Redis.

func (*Redis) DeepCopyInto

func (in *Redis) DeepCopyInto(out *Redis)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Redis) DeepCopyObject

func (in *Redis) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Redis) InstanceConfiguration

func (c *Redis) InstanceConfiguration(podList []corev1.Pod, client client.Client,
) (data map[string]string, err error)

InstanceConfiguration creates the redis instance configuration.

func (*Redis) IsActive

func (c *Redis) IsActive(name string, namespace string, client client.Client) bool

IsActive returns true if instance is active.

func (*Redis) IsUpgrading

func (c *Redis) IsUpgrading(name string, namespace string, client client.Client) bool

IsUpgrading returns true if instance is upgrading.

func (*Redis) ManageNodeStatus

func (c *Redis) ManageNodeStatus(nodes map[string]NodeInfo,
	client client.Client) (updated bool, err error)

ManageNodeStatus updates nodes in status

func (*Redis) PodIPListAndIPMapFromInstance

func (c *Redis) PodIPListAndIPMapFromInstance(instanceType string, request reconcile.Request, reconcileClient client.Client) ([]corev1.Pod, map[string]NodeInfo, error)

PodIPListAndIPMapFromInstance gets a list with POD IPs and a map of POD names and IPs.

func (*Redis) PrepareSTS

func (c *Redis) PrepareSTS(sts *appsv1.StatefulSet, commonConfiguration *PodConfiguration, request reconcile.Request, scheme *runtime.Scheme) error

PrepareSTS prepares the intended deployment for the Redis object.

func (*Redis) QuerySTS

func (c *Redis) QuerySTS(name string, namespace string, reconcileClient client.Client) (*appsv1.StatefulSet, error)

QuerySTS queries the Redis STS

func (*Redis) SetInstanceActive

func (c *Redis) SetInstanceActive(client client.Client, activeStatus *bool, degradedStatus *bool, sts *appsv1.StatefulSet, request reconcile.Request) error

SetInstanceActive sets the Redis instance to active

type RedisClusterConfiguration

type RedisClusterConfiguration struct {
	ServerPort   int      `json:"redisServerPort,omitempty"`
	ServerIPList []string `json:"redisServerIPList,omitempty"`
}

AnalyticsConfiguration stores all information about service's endpoints under the Contrail Analytics

func NewRedisClusterConfiguration

func NewRedisClusterConfiguration(name, namespace string, client client.Client) (RedisClusterConfiguration, error)

NewRedisClusterConfiguration gets a struct containing various representations of Redis nodes string.

func (*RedisClusterConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisClusterConfiguration.

func (*RedisClusterConfiguration) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RedisConfiguration

type RedisConfiguration struct {
	Containers  []*Container `json:"containers,omitempty"`
	ClusterName string       `json:"clusterName,omitempty"`
	RedisPort   *int         `json:"redisPort,omitempty"`
}

RedisConfiguration is the Spec for the redis API. +k8s:openapi-gen=true

func (*RedisConfiguration) DeepCopy

func (in *RedisConfiguration) DeepCopy() *RedisConfiguration

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisConfiguration.

func (*RedisConfiguration) DeepCopyInto

func (in *RedisConfiguration) DeepCopyInto(out *RedisConfiguration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RedisInput

type RedisInput struct {
	Metadata Metadata  `json:"metadata,omitempty"`
	Spec     RedisSpec `json:"spec,omitempty"`
}

RedisInput is the Schema for the analytics API. +k8s:openapi-gen=true

type RedisList

type RedisList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Redis `json:"items"`
}

RedisList contains a list of Redis. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*RedisList) DeepCopy

func (in *RedisList) DeepCopy() *RedisList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisList.

func (*RedisList) DeepCopyInto

func (in *RedisList) DeepCopyInto(out *RedisList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RedisList) DeepCopyObject

func (in *RedisList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RedisSpec

type RedisSpec struct {
	CommonConfiguration  PodConfiguration   `json:"commonConfiguration,omitempty"`
	ServiceConfiguration RedisConfiguration `json:"serviceConfiguration"`
}

RedisSpec is the Spec for the redis API. +k8s:openapi-gen=true

func (*RedisSpec) DeepCopy

func (in *RedisSpec) DeepCopy() *RedisSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisSpec.

func (*RedisSpec) DeepCopyInto

func (in *RedisSpec) DeepCopyInto(out *RedisSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RedisStatus

type RedisStatus struct {
	CommonStatus `json:",inline"`
}

RedisStatus defines the status of the redis object. +k8s:openapi-gen=true

func (*RedisStatus) DeepCopy

func (in *RedisStatus) DeepCopy() *RedisStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisStatus.

func (*RedisStatus) DeepCopyInto

func (in *RedisStatus) DeepCopyInto(out *RedisStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ServiceStatus

type ServiceStatus struct {
	Name    *string `json:"name,omitempty"`
	Active  *bool   `json:"active,omitempty"`
	Created *bool   `json:"created,omitempty"`
}

ServiceStatus provides information on the current status of the service. +k8s:openapi-gen=true

func (*ServiceStatus) DeepCopy

func (in *ServiceStatus) DeepCopy() *ServiceStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceStatus.

func (*ServiceStatus) DeepCopyInto

func (in *ServiceStatus) DeepCopyInto(out *ServiceStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Services

type Services struct {
	AnalyticsSnmp  *AnalyticsSnmpInput  `json:"analyticsSnmp,omitempty"`
	AnalyticsAlarm *AnalyticsAlarmInput `json:"analyticsAlarm,omitempty"`
	Analytics      *AnalyticsInput      `json:"analytics,omitempty"`
	Config         *ConfigInput         `json:"config,omitempty"`
	Controls       []*ControlInput      `json:"controls,omitempty"`
	Kubemanager    *KubemanagerInput    `json:"kubemanager,omitempty"`
	QueryEngine    *QueryEngineInput    `json:"queryengine,omitempty"`
	Webui          *WebuiInput          `json:"webui,omitempty"`
	Vrouters       []*VrouterInput      `json:"vrouters,omitempty"`
	Cassandras     []*CassandraInput    `json:"cassandras,omitempty"`
	Zookeeper      *ZookeeperInput      `json:"zookeeper,omitempty"`
	Rabbitmq       *RabbitmqInput       `json:"rabbitmq,omitempty"`
	Redis          []*RedisInput        `json:"redis,omitempty"`
}

Services defines the desired state of Services. +k8s:openapi-gen=true

func (*Services) DeepCopy

func (in *Services) DeepCopy() *Services

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Services.

func (*Services) DeepCopyInto

func (in *Services) DeepCopyInto(out *Services)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type StaticRoutes

type StaticRoutes struct {
	Down   string `json:"down,omitempty"`
	Number string `json:"number,omitempty"`
}

StaticRoutes statuic routes +k8s:openapi-gen=true

func (*StaticRoutes) DeepCopy

func (in *StaticRoutes) DeepCopy() *StaticRoutes

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StaticRoutes.

func (*StaticRoutes) DeepCopyInto

func (in *StaticRoutes) DeepCopyInto(out *StaticRoutes)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Storage

type Storage struct {
	// +kubebuilder:validation:Pattern=^([0-9]+)([KMGTPE]i)?$
	Size string `json:"size,omitempty"` // The only reason we don't use resource.Quantity directly is we can't have regexp for different type than string
	Path string `json:"path,omitempty"`
}

+k8s:openapi-gen=true

func (*Storage) DeepCopy

func (in *Storage) DeepCopy() *Storage

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Storage.

func (*Storage) DeepCopyInto

func (in *Storage) DeepCopyInto(out *Storage)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Storage) SizeAsQuantity

func (s Storage) SizeAsQuantity() (resource.Quantity, error)

type TCPListenOptionsConfig

type TCPListenOptionsConfig struct {
	Backlog       *int  `json:"backlog,omitempty"`
	Nodelay       *bool `json:"nodelay,omitempty"`
	LingerOn      *bool `json:"lingerOn,omitempty"`
	LingerTimeout *int  `json:"lingerTimeout,omitempty"`
	ExitOnClose   *bool `json:"exitOnClose,omitempty"`
}

TCPListenOptionsConfig is configuration for RabbitMQ TCP listen +k8s:openapi-gen=true

func (*TCPListenOptionsConfig) DeepCopyInto

func (in *TCPListenOptionsConfig) DeepCopyInto(out *TCPListenOptionsConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Vrouter

type Vrouter struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   VrouterSpec   `json:"spec,omitempty"`
	Status VrouterStatus `json:"status,omitempty"`
}

Vrouter is the Schema for the vrouters API. +k8s:openapi-gen=true +kubebuilder:subresource:status

func (*Vrouter) AddVolumesToIntendedDS

func (c *Vrouter) AddVolumesToIntendedDS(ds *appsv1.DaemonSet, volumeConfigMapMap map[string]string)

AddVolumesToIntendedDS adds volumes to a deployment.

func (*Vrouter) CreateCNIConfigMap

func (c *Vrouter) CreateCNIConfigMap(client client.Client, scheme *runtime.Scheme, request reconcile.Request) (*corev1.ConfigMap, error)

CreateCNIConfigMap creates vRouter configMaps with rendered values

func (*Vrouter) CreateConfigMap

func (c *Vrouter) CreateConfigMap(configMapName string,
	client client.Client,
	scheme *runtime.Scheme,
	request reconcile.Request) (*corev1.ConfigMap, error)

CreateConfigMap creates configMap with specified name

func (*Vrouter) CreateDS

func (c *Vrouter) CreateDS(ds *appsv1.DaemonSet,
	commonConfiguration *PodConfiguration,
	instanceType string,
	request reconcile.Request,
	scheme *runtime.Scheme,
	reconcileClient client.Client) error

CreateDS creates the daemonset.

func (*Vrouter) CreateSecret

func (c *Vrouter) CreateSecret(secretName string,
	client client.Client,
	scheme *runtime.Scheme,
	request reconcile.Request) (*corev1.Secret, error)

CreateSecret creates a secret.

func (*Vrouter) DeepCopy

func (in *Vrouter) DeepCopy() *Vrouter

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Vrouter.

func (*Vrouter) DeepCopyInto

func (in *Vrouter) DeepCopyInto(out *Vrouter)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Vrouter) DeepCopyObject

func (in *Vrouter) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Vrouter) GetAgentConfigsForPod

func (c *Vrouter) GetAgentConfigsForPod(vrouterPod *VrouterPod, hostVars *map[string]string) (agentConfig, lbaasAuthConfig, vncAPILibIniConfig, nodemgrConfig string, err error)

GetAgentConfigsForPod returns correct values of `/etc/contrailconfigmaps/config_name.{$pod_ip}` files

func (*Vrouter) GetAgentNodes

func (c *Vrouter) GetAgentNodes(daemonset *appsv1.DaemonSet, clnt client.Client) *corev1.NodeList

GetAgentNodes list of agent nodes

func (*Vrouter) GetCNIConfig

func (c *Vrouter) GetCNIConfig(client client.Client, request reconcile.Request) (string, error)

GetCNIConfig creates CNI plugin config

func (*Vrouter) GetNodeDSPod

func (c *Vrouter) GetNodeDSPod(nodeName string, daemonset *appsv1.DaemonSet, clnt client.Client) *corev1.Pod

GetNodeDSPod returns daemonset pod by name

func (*Vrouter) GetParamsEnv

func (c *Vrouter) GetParamsEnv(clnt client.Client, clusterNodes *ClusterNodes, vrouterHostname string) (string, error)

GetParamsEnv returns agent params (str comma separated)

func (*Vrouter) IsActiveOnControllers

func (c *Vrouter) IsActiveOnControllers(clnt client.Client) (bool, error)

IsActiveOnControllers returns true if agents on master nodes are active

func (*Vrouter) LookupAgentStatus

func (c *Vrouter) LookupAgentStatus(name string) *AgentStatus

LookupAgentStatus lookup AgentStatus for an agent

func (*Vrouter) ManageNodeStatus

func (c *Vrouter) ManageNodeStatus(nodes map[string]NodeInfo,
	client client.Client) (updated bool, err error)

ManageNodeStatus updates nodes map

func (*Vrouter) PodIPListAndIPMapFromInstance

func (c *Vrouter) PodIPListAndIPMapFromInstance(instanceType string, request reconcile.Request, reconcileClient client.Client) ([]corev1.Pod, map[string]NodeInfo, error)

PodIPListAndIPMapFromInstance gets a list with POD IPs and a map of POD names and IPs.

func (*Vrouter) PrepareDaemonSet

func (c *Vrouter) PrepareDaemonSet(ds *appsv1.DaemonSet,
	commonConfiguration *PodConfiguration,
	request reconcile.Request,
	scheme *runtime.Scheme,
	client client.Client) error

PrepareDaemonSet prepares the intended podList.

func (*Vrouter) RemoveAgentConfigMapForPod

func (c *Vrouter) RemoveAgentConfigMapForPod(vrouterPod *VrouterPod,
	configMap *corev1.ConfigMap,
	client client.Client,
) error

RemoveAgentConfigMapForPod removes data

func (*Vrouter) SetInstanceActive

func (c *Vrouter) SetInstanceActive(client client.Client, activeStatus *bool, ds *appsv1.DaemonSet, request reconcile.Request, object runtime.Object) error

SetInstanceActive sets the instance to active.

func (*Vrouter) UpdateAgent

func (c *Vrouter) UpdateAgent(nodeName string, agentStatus *AgentStatus, vrouterPod *VrouterPod, configMap *corev1.ConfigMap, clnt client.Client) (bool, error)

UpdateAgent waits for config updates and reload containers

func (*Vrouter) UpdateAgentConfigMapForPod

func (c *Vrouter) UpdateAgentConfigMapForPod(vrouterPod *VrouterPod,
	clusterNodes *ClusterNodes,
	hostVars *map[string]string,
	configMap *corev1.ConfigMap,
	client client.Client,
) error

UpdateAgentConfigMapForPod recalculates files `/etc/contrailconfigmaps/config_name.{$pod_ip}` in the agent configMap

func (*Vrouter) UpdateAgentParams

func (c *Vrouter) UpdateAgentParams(vrouterPod *VrouterPod,
	params string,
	configMap *corev1.ConfigMap,
	client client.Client,
) error

UpdateAgentParams updates configmap with params data

func (*Vrouter) UpdateDS

func (c *Vrouter) UpdateDS(ds *appsv1.DaemonSet,
	commonConfiguration *PodConfiguration,
	instanceType string,
	request reconcile.Request,
	scheme *runtime.Scheme,
	reconcileClient client.Client) error

UpdateDS updates the daemonset.

func (*Vrouter) VrouterConfigurationParameters

func (c *Vrouter) VrouterConfigurationParameters(client client.Client) (*VrouterConfiguration, error)

VrouterConfigurationParameters is a method for gathering data used in rendering vRouter configuration

type VrouterConfiguration

type VrouterConfiguration struct {
	Containers        []*Container `json:"containers,omitempty"`
	PhysicalInterface string       `json:"physicalInterface,omitempty"`
	// What is it doing?
	// VrouterEncryption   bool              `json:"vrouterEncryption,omitempty"`
	// What is it doing?
	// What is it doing?
	EnvVariablesConfig map[string]string `json:"envVariablesConfig,omitempty"`
	ControlInstance    string            `json:"controlInstance,omitempty"`

	// New params for vrouter configuration
	CloudOrchestrator string `json:"cloudOrchestrator,omitempty"`
	HypervisorType    string `json:"hypervisorType,omitempty"`

	// Collector
	StatsCollectorDestinationPath string `json:"statsCollectorDestinationPath,omitempty"`
	CollectorPort                 string `json:"collectorPort,omitempty"`

	// Config
	ConfigApiPort             string `json:"configApiPort,omitempty"`
	ConfigApiServerCaCertfile string `json:"configApiServerCaCertfile,omitempty"`
	ConfigApiSslEnable        *bool  `json:"configApiSslEnable,omitempty"`

	// DNS
	DnsServerPort string `json:"dnsServerPort,omitempty"`

	// Host
	DpdkUioDriver          string `json:"dpdkUioDriver,omitempty"`
	SriovPhysicalInterface string `json:"sriovPhysicalInterface,omitempty"`
	SriovPhysicalNetwork   string `json:"sriovPhysicalNetwork,omitempty"`
	SriovVf                string `json:"sriovVf,omitempty"`

	// Introspect
	IntrospectSslEnable *bool `json:"introspectSslEnable,omitempty"`

	// Keystone authentication
	KeystoneAuthAdminPort         string `json:"keystoneAuthAdminPort,omitempty"`
	KeystoneAuthCaCertfile        string `json:"keystoneAuthCaCertfile,omitempty"`
	KeystoneAuthCertfile          string `json:"keystoneAuthCertfile,omitempty"`
	KeystoneAuthHost              string `json:"keystoneAuthHost,omitempty"`
	KeystoneAuthInsecure          *bool  `json:"keystoneAuthInsecure,omitempty"`
	KeystoneAuthKeyfile           string `json:"keystoneAuthKeyfile,omitempty"`
	KeystoneAuthProjectDomainName string `json:"keystoneAuthProjectDomainName,omitempty"`
	KeystoneAuthProto             string `json:"keystoneAuthProto,omitempty"`
	KeystoneAuthRegionName        string `json:"keystoneAuthRegionName,omitempty"`
	KeystoneAuthUrlTokens         string `json:"keystoneAuthUrlTokens,omitempty"`
	KeystoneAuthUrlVersion        string `json:"keystoneAuthUrlVersion,omitempty"`
	KeystoneAuthUserDomainName    string `json:"keystoneAuthUserDomainName,omitempty"`
	KeystoneAuthAdminPassword     string `json:"keystoneAuthAdminPassword,omitempty"`

	// Kubernetes
	K8sToken                string `json:"k8sToken,omitempty"`
	K8sTokenFile            string `json:"k8sTokenFile,omitempty"`
	KubernetesApiPort       string `json:"kubernetesApiPort,omitempty"`
	KubernetesApiSecurePort string `json:"kubernetesApiSecurePort,omitempty"`
	KubernetesPodSubnet     string `json:"kubernetesPodSubnet,omitempty"`

	// Logging
	LogDir   string `json:"logDir,omitempty"`
	LogLocal *int   `json:"logLocal,omitempty"`

	// Metadata
	MetadataProxySecret   string `json:"metadataProxySecret,omitempty"`
	MetadataSslCaCertfile string `json:"metadataSslCaCertfile,omitempty"`
	MetadataSslCertfile   string `json:"metadataSslCertfile,omitempty"`
	MetadataSslCertType   string `json:"metadataSslCertType,omitempty"`
	MetadataSslEnable     string `json:"metadataSslEnable,omitempty"`
	MetadataSslKeyfile    string `json:"metadataSslKeyfile,omitempty"`

	// Openstack
	BarbicanTenantName string `json:"barbicanTenantName,omitempty"`
	BarbicanPassword   string `json:"barbicanPassword,omitempty"`
	BarbicanUser       string `json:"barbicanUser,omitempty"`

	// Sandesh
	SandeshCaCertfile     string `json:"sandeshCaCertfile,omitempty"`
	SandeshCertfile       string `json:"sandeshCertfile,omitempty"`
	SandeshKeyfile        string `json:"sandeshKeyfile,omitempty"`
	SandeshServerCertfile string `json:"sandeshServerCertfile,omitempty"`
	SandeshServerKeyfile  string `json:"sandeshServerKeyfile,omitempty"`
	SandeshSslEnable      *bool  `json:"sandeshSslEnable,omitempty"`

	// Server SSL
	ServerCaCertfile string `json:"serverCaCertfile,omitempty"`
	ServerCertfile   string `json:"serverCertfile,omitempty"`
	ServerKeyfile    string `json:"serverKeyfile,omitempty"`
	SslEnable        *bool  `json:"sslEnable,omitempty"`
	SslInsecure      *bool  `json:"sslInsecure,omitempty"`

	// TSN
	TsnAgentMode string `json:"tsnAgentMode,omitempty"`

	// vRouter
	AgentMode                       string `json:"agentMode,omitempty"`
	FabricSnatHashTableSize         string `json:"fabricSntHashTableSize,omitempty"`
	PriorityBandwidth               string `json:"priorityBandwidth,omitempty"`
	PriorityId                      string `json:"priorityId,omitempty"`
	PriorityScheduling              string `json:"priorityScheduling,omitempty"`
	PriorityTagging                 *bool  `json:"priorityTagging,omitempty"`
	QosDefHwQueue                   *bool  `json:"qosDefHwQueue,omitempty"`
	QosLogicalQueues                string `json:"qosLogicalQueues,omitempty"`
	QosQueueId                      string `json:"qosQueueId,omitempty"`
	RequiredKernelVrouterEncryption string `json:"requiredKernelVrouterEncryption,omitempty"`
	SampleDestination               string `json:"sampleDestination,omitempty"`
	SloDestination                  string `json:"sloDestination,omitempty"`
	VrouterCryptInterface           string `json:"vrouterCryptInterface,omitempty"`
	VrouterDecryptInterface         string `json:"vrouterDecryptInterface,omitempty"`
	VrouterDecyptKey                string `json:"vrouterDecryptKey,omitempty"`
	VrouterEncryption               *bool  `json:"vrouterEncryption,omitempty"`
	VrouterGateway                  string `json:"vrouterGateway,omitempty"`
	DataSubnet                      string `json:"dataSubnet,omitempty"`

	// XMPP
	Subcluster           string `json:"subcluster,omitempty"`
	XmppServerCaCertfile string `json:"xmppServerCaCertfile,omitempty"`
	XmppServerCertfile   string `json:"xmppServerCertfile,omitempty"`
	XmppServerKeyfile    string `json:"xmppServerKeyfile,omitempty"`
	XmppServerPort       string `json:"xmppServerPort,omitempty"`
	XmppSslEnable        *bool  `json:"xmmpSslEnable,omitempty"`

	// HugePages
	HugePages2M *int `json:"hugePages2M,omitempty"`
	HugePages1G *int `json:"hugePages1G,omitempty"`

	// L3MH
	L3MHCidr string `json:"l3mhCidr,omitempty"`

	// CniMTU - mtu for virtual tap devices
	CniMTU *int `json:"cniMTU,omitempty"`
}

VrouterConfiguration is the Spec for the vrouter API. +k8s:openapi-gen=true

func (*VrouterConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VrouterConfiguration.

func (*VrouterConfiguration) DeepCopyInto

func (in *VrouterConfiguration) DeepCopyInto(out *VrouterConfiguration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VrouterInput

type VrouterInput struct {
	Metadata Metadata    `json:"metadata,omitempty"`
	Spec     VrouterSpec `json:"spec,omitempty"`
}

VrouterInput is the Schema for the analytics API. +k8s:openapi-gen=true

func (*VrouterInput) DeepCopyInto

func (in *VrouterInput) DeepCopyInto(out *VrouterInput)

type VrouterList

type VrouterList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Vrouter `json:"items"`
}

VrouterList contains a list of Vrouter. +k8s:openapi-gen=true

func (*VrouterList) DeepCopy

func (in *VrouterList) DeepCopy() *VrouterList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VrouterList.

func (*VrouterList) DeepCopyInto

func (in *VrouterList) DeepCopyInto(out *VrouterList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VrouterList) DeepCopyObject

func (in *VrouterList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VrouterPod

type VrouterPod struct {
	Pod *corev1.Pod
}

VrouterPod is a pod, created by vrouter.

func (*VrouterPod) ExecToAgentContainer

func (vrouterPod *VrouterPod) ExecToAgentContainer(command string) (string, string, error)

ExecToAgentContainer uninterractively exec to the vrouteragent container.

func (*VrouterPod) ExecToNodemanagerContainer

func (vrouterPod *VrouterPod) ExecToNodemanagerContainer(command []string) (string, string, error)

ExecToNodemanagerContainer uninterractively exec to the vrouteragent container.

func (*VrouterPod) GetAgentParameters

func (vrouterPod *VrouterPod) GetAgentParameters(hostParams *map[string]string) (string, string, error)

GetAgentParameters gets parametrs from `/parametrs.sh`

func (*VrouterPod) IsAgentConfigsAvaliable

func (vrouterPod *VrouterPod) IsAgentConfigsAvaliable(vrouter *Vrouter, provisionerData string, configMap *corev1.ConfigMap) (bool, error)

IsAgentConfigsAvaliable checks config inside container

func (*VrouterPod) IsAgentContainerRunning

func (vrouterPod *VrouterPod) IsAgentContainerRunning() bool

IsAgentContainerRunning checks if agent running on the vrouteragent container.

func (*VrouterPod) IsFileInAgentContainerEqualTo

func (vrouterPod *VrouterPod) IsFileInAgentContainerEqualTo(path string, content string) (bool, error)

IsFileInAgentContainerEqualTo checks file content

func (*VrouterPod) NeedVhostReload

func (vrouterPod *VrouterPod) NeedVhostReload() (bool, error)

func (*VrouterPod) RecalculateAgentParameters

func (vrouterPod *VrouterPod) RecalculateAgentParameters() (string, string, error)

RecalculateAgentParameters recalculates parameters for agent from `/etc/contrail/params.env` to `/parameters.sh`

func (*VrouterPod) ReloadAgentConfigs

func (vrouterPod *VrouterPod) ReloadAgentConfigs() error

ReloadAgentConfigs sends SIGHUP to the vrouteragent container process to reload config file.

func (*VrouterPod) ReloadNodemanager

func (vrouterPod *VrouterPod) ReloadNodemanager() error

ReloadNodemanager sends sighup to nodemanager

func (*VrouterPod) ValidateVrouterNIC

func (vrouterPod *VrouterPod) ValidateVrouterNIC() (string, string, error)

ValidateVrouterNIC checks if vrouter pod configured on correct NIC

type VrouterSpec

type VrouterSpec struct {
	CommonConfiguration  PodConfiguration     `json:"commonConfiguration,omitempty"`
	ServiceConfiguration VrouterConfiguration `json:"serviceConfiguration"`
}

VrouterSpec is the Spec for the vrouter API. +k8s:openapi-gen=true

func (*VrouterSpec) DeepCopy

func (in *VrouterSpec) DeepCopy() *VrouterSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VrouterSpec.

func (*VrouterSpec) DeepCopyInto

func (in *VrouterSpec) DeepCopyInto(out *VrouterSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VrouterStatus

type VrouterStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file
	// Add custom validation using kubebuilder tags: https://book.kubebuilder.io/beyond_basics/generating_crd.html
	Nodes               map[string]NodeInfo `json:"nodes,omitempty"`
	Active              *bool               `json:"active,omitempty"`
	ActiveOnControllers *bool               `json:"activeOnControllers,omitempty"`
	Agents              []*AgentStatus      `json:"agents,omitempty"`
}

VrouterStatus is the Status for vrouter API. +k8s:openapi-gen=true TODO: after update to controllter-tool v0.4 rework AgentStatus to make it map instead of [] for performance (https://github.com/operator-framework/operator-sdk/issues/2485 https://github.com/kubernetes-sigs/controller-tools/pull/317)

func (*VrouterStatus) DeepCopy

func (in *VrouterStatus) DeepCopy() *VrouterStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VrouterStatus.

func (*VrouterStatus) DeepCopyInto

func (in *VrouterStatus) DeepCopyInto(out *VrouterStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WebUIServiceStatus

type WebUIServiceStatus struct {
	ModuleName  string `json:"moduleName,omitempty"`
	ModuleState string `json:"state"`
}

+k8s:openapi-gen=true

func (*WebUIServiceStatus) DeepCopy

func (in *WebUIServiceStatus) DeepCopy() *WebUIServiceStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebUIServiceStatus.

func (*WebUIServiceStatus) DeepCopyInto

func (in *WebUIServiceStatus) DeepCopyInto(out *WebUIServiceStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WebUIServiceStatusMap

type WebUIServiceStatusMap map[string]WebUIServiceStatus

+k8s:openapi-gen=true

func (WebUIServiceStatusMap) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebUIServiceStatusMap.

func (WebUIServiceStatusMap) DeepCopyInto

func (in WebUIServiceStatusMap) DeepCopyInto(out *WebUIServiceStatusMap)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WebUIStatusPorts

type WebUIStatusPorts struct {
	WebUIHttpPort  int `json:"webUIHttpPort,omitempty"`
	WebUIHttpsPort int `json:"webUIHttpsPort,omitempty"`
}

+k8s:openapi-gen=true

func (*WebUIStatusPorts) DeepCopy

func (in *WebUIStatusPorts) DeepCopy() *WebUIStatusPorts

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebUIStatusPorts.

func (*WebUIStatusPorts) DeepCopyInto

func (in *WebUIStatusPorts) DeepCopyInto(out *WebUIStatusPorts)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Webui

type Webui struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   WebuiSpec   `json:"spec,omitempty"`
	Status WebuiStatus `json:"status,omitempty"`
}

Webui is the Schema for the webuis API. +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Endpoint",type=string,JSONPath=`.status.endpoint` +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +kubebuilder:printcolumn:name="Active",type=boolean,JSONPath=`.status.active`

func (*Webui) AddVolumesToIntendedSTS

func (c *Webui) AddVolumesToIntendedSTS(sts *appsv1.StatefulSet, volumeConfigMapMap map[string]string)

AddVolumesToIntendedSTS adds volumes to the Webui deployment.

func (*Webui) CommonStartupScript

func (c *Webui) CommonStartupScript(command string, configs map[string]string) string

CommonStartupScript prepare common run service script

command - is a final command to run
configs - config files to be waited for and to be linked from configmap mount
 to a destination config folder (if destination is empty no link be done, only wait), e.g.
 { "api.${POD_IP}": "", "vnc_api.ini.${POD_IP}": "vnc_api.ini"}

func (*Webui) CreateConfigMap

func (c *Webui) CreateConfigMap(configMapName string,
	client client.Client,
	scheme *runtime.Scheme,
	request reconcile.Request) (*corev1.ConfigMap, error)

CreateConfigMap create webui configmap

func (*Webui) CreateSecret

func (c *Webui) CreateSecret(secretName string,
	client client.Client,
	scheme *runtime.Scheme,
	request reconcile.Request) (*corev1.Secret, error)

CreateSecret creates a secret.

func (*Webui) DeepCopy

func (in *Webui) DeepCopy() *Webui

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Webui.

func (*Webui) DeepCopyInto

func (in *Webui) DeepCopyInto(out *Webui)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Webui) DeepCopyObject

func (in *Webui) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Webui) InstanceConfiguration

func (c *Webui) InstanceConfiguration(podList []corev1.Pod, client client.Client,
) (data map[string]string, err error)

InstanceConfiguration updates configmaps

func (*Webui) ManageNodeStatus

func (c *Webui) ManageNodeStatus(nodes map[string]NodeInfo,
	client client.Client) (updated bool, err error)

ManageNodeStatus updates nodes map

func (*Webui) PodIPListAndIPMapFromInstance

func (c *Webui) PodIPListAndIPMapFromInstance(instanceType string, request reconcile.Request, reconcileClient client.Client) ([]corev1.Pod, map[string]NodeInfo, error)

PodIPListAndIPMapFromInstance gets a list with POD IPs and a map of POD names and IPs.

func (*Webui) PrepareSTS

func (c *Webui) PrepareSTS(sts *appsv1.StatefulSet, commonConfiguration *PodConfiguration, request reconcile.Request, scheme *runtime.Scheme) error

PrepareSTS prepares the intended deployment for the Webui object.

func (*Webui) SetInstanceActive

func (c *Webui) SetInstanceActive(client client.Client, activeStatus *bool, degradedStatus *bool, sts *appsv1.StatefulSet, request reconcile.Request) error

SetInstanceActive sets the Webui instance to active.

type WebuiConfiguration

type WebuiConfiguration struct {
	ControlInstance string       `json:"controlInstance,omitempty"`
	Containers      []*Container `json:"containers,omitempty"`
}

WebuiConfiguration is the Spec for the cassandras API. +k8s:openapi-gen=true

func (*WebuiConfiguration) DeepCopy

func (in *WebuiConfiguration) DeepCopy() *WebuiConfiguration

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebuiConfiguration.

func (*WebuiConfiguration) DeepCopyInto

func (in *WebuiConfiguration) DeepCopyInto(out *WebuiConfiguration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WebuiInput

type WebuiInput struct {
	Metadata Metadata  `json:"metadata,omitempty"`
	Spec     WebuiSpec `json:"spec,omitempty"`
}

WebuiInput is the Schema for the analytics API. +k8s:openapi-gen=true

func (*WebuiInput) DeepCopyInto

func (in *WebuiInput) DeepCopyInto(out *WebuiInput)

type WebuiList

type WebuiList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Webui `json:"items"`
}

WebuiList contains a list of Webui. +k8s:openapi-gen=true

func (*WebuiList) DeepCopy

func (in *WebuiList) DeepCopy() *WebuiList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebuiList.

func (*WebuiList) DeepCopyInto

func (in *WebuiList) DeepCopyInto(out *WebuiList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*WebuiList) DeepCopyObject

func (in *WebuiList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type WebuiSpec

type WebuiSpec struct {
	CommonConfiguration  PodConfiguration   `json:"commonConfiguration,omitempty"`
	ServiceConfiguration WebuiConfiguration `json:"serviceConfiguration"`
}

WebuiSpec is the Spec for the cassandras API. +k8s:openapi-gen=true

func (*WebuiSpec) DeepCopy

func (in *WebuiSpec) DeepCopy() *WebuiSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebuiSpec.

func (*WebuiSpec) DeepCopyInto

func (in *WebuiSpec) DeepCopyInto(out *WebuiSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WebuiStatus

type WebuiStatus struct {
	CommonStatus  `json:",inline"`
	Ports         WebUIStatusPorts                 `json:"ports,omitempty"`
	ServiceStatus map[string]WebUIServiceStatusMap `json:"serviceStatus,omitempty"`
	Endpoint      string                           `json:"endpoint,omitempty"`
}

+k8s:openapi-gen=true

func (*WebuiStatus) DeepCopy

func (in *WebuiStatus) DeepCopy() *WebuiStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebuiStatus.

func (*WebuiStatus) DeepCopyInto

func (in *WebuiStatus) DeepCopyInto(out *WebuiStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ZIUStatus

type ZIUStatus int32

ZIU status for orchestrating cluster ZIU process -1 not needed 0 not detected 1..x ziu stages

func GetZiuStage

func GetZiuStage(clnt client.Client) (ZIUStatus, error)

Extract ZIU Status from cluster manager resource

type Zookeeper

type Zookeeper struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ZookeeperSpec   `json:"spec,omitempty"`
	Status ZookeeperStatus `json:"status,omitempty"`
}

Zookeeper is the Schema for the zookeeper API. +k8s:openapi-gen=true +kubebuilder:subresource:status

func (*Zookeeper) AddVolumesToIntendedSTS

func (c *Zookeeper) AddVolumesToIntendedSTS(sts *appsv1.StatefulSet, volumeConfigMapMap map[string]string)

AddVolumesToIntendedSTS adds volumes to the Zookeeper deployment.

func (*Zookeeper) AddZKNode

func (c *Zookeeper) AddZKNode(podIPList []corev1.Pod) (nodes map[string]NodeInfo, err error)

func (*Zookeeper) CommonStartupScriptZK

func (c *Zookeeper) CommonStartupScriptZK(command string, configs map[string]string) string

CommonStartupScript prepare common run service script

command - is a final command to run
configs - config files to be waited for and to be linked from configmap mount
 to a destination config folder (if destination is empty no link be done, only wait), e.g.
 { "api.${POD_IP}": "", "vnc_api.ini.${POD_IP}": "vnc_api.ini"}

func (*Zookeeper) ConfigurationParameters

func (c *Zookeeper) ConfigurationParameters() ZookeeperConfiguration

ConfigurationParameters sets the default for the configuration parameters.

func (*Zookeeper) CreateConfigMap

func (c *Zookeeper) CreateConfigMap(configMapName string,
	client client.Client,
	scheme *runtime.Scheme,
	request reconcile.Request) (*corev1.ConfigMap, error)

CreateConfigMap creates a configmap for zookeeper service.

func (*Zookeeper) CreateSecret

func (c *Zookeeper) CreateSecret(secretName string,
	client client.Client,
	scheme *runtime.Scheme,
	request reconcile.Request) (*corev1.Secret, error)

CreateSecret creates a secret.

func (*Zookeeper) DeepCopy

func (in *Zookeeper) DeepCopy() *Zookeeper

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Zookeeper.

func (*Zookeeper) DeepCopyInto

func (in *Zookeeper) DeepCopyInto(out *Zookeeper)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Zookeeper) DeepCopyObject

func (in *Zookeeper) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Zookeeper) InstanceConfiguration

func (c *Zookeeper) InstanceConfiguration(podList []corev1.Pod, client client.Client,
) (data map[string]string, err error)

InstanceConfiguration creates the zookeeper instance configuration.

func (*Zookeeper) IsActive

func (c *Zookeeper) IsActive(name string, namespace string, client client.Client) bool

IsActive returns true if instance is active.

func (*Zookeeper) IsUpgrading

func (c *Zookeeper) IsUpgrading(name string, namespace string, client client.Client) bool

IsUpgrading returns true if instance is upgrading.

func (*Zookeeper) ManageNodeStatus

func (c *Zookeeper) ManageNodeStatus(nodes map[string]NodeInfo,
	client client.Client,
) (requequeNeeded bool, err error)

func (*Zookeeper) PodIPListAndIPMapFromInstance

func (c *Zookeeper) PodIPListAndIPMapFromInstance(instanceType string, request reconcile.Request, reconcileClient client.Client) ([]corev1.Pod, map[string]NodeInfo, error)

PodIPListAndIPMapFromInstance gets a list with POD IPs and a map of POD names and IPs.

func (*Zookeeper) PrepareSTS

func (c *Zookeeper) PrepareSTS(sts *appsv1.StatefulSet, commonConfiguration *PodConfiguration, request reconcile.Request, scheme *runtime.Scheme) error

PrepareSTS prepares the intended deployment for the Zookeeper object.

func (*Zookeeper) SetInstanceActive

func (c *Zookeeper) SetInstanceActive(client client.Client, activeStatus *bool, degradedStatus *bool, sts *appsv1.StatefulSet, request reconcile.Request) error

SetInstanceActive sets the Zookeeper instance to active.

type ZookeeperClusterConfiguration

type ZookeeperClusterConfiguration struct {
	ClientPort   int      `json:"clientPort,omitempty"`
	ServerPort   int      `json:"serverPort,omitempty"`
	ElectionPort int      `json:"electionPort,omitempty"`
	ServerIPList []string `json:"serverIPList,omitempty"`
}

ZookeeperClusterConfiguration stores all information about Zookeeper's endpoints.

func NewZookeeperClusterConfiguration

func NewZookeeperClusterConfiguration(name, namespace string, client client.Client) (ZookeeperClusterConfiguration, error)

NewZookeeperClusterConfiguration gets a struct containing various representations of Zookeeper nodes string.

func (*ZookeeperClusterConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZookeeperClusterConfiguration.

func (*ZookeeperClusterConfiguration) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ZookeeperClusterConfiguration) FillWithDefaultValues

func (c *ZookeeperClusterConfiguration) FillWithDefaultValues()

FillWithDefaultValues fills Zookeeper config with default values

type ZookeeperConfiguration

type ZookeeperConfiguration struct {
	Containers        []*Container `json:"containers,omitempty"`
	ClientPort        *int         `json:"clientPort,omitempty"`
	ElectionPort      *int         `json:"electionPort,omitempty"`
	ServerPort        *int         `json:"serverPort,omitempty"`
	AdminEnableServer *bool        `json:"adminEnabled,omitempty"`
	AdminPort         *int         `json:"adminPort,omitempty"`
}

ZookeeperConfiguration is the Spec for the zookeeper API. +k8s:openapi-gen=true

func (*ZookeeperConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZookeeperConfiguration.

func (*ZookeeperConfiguration) DeepCopyInto

func (in *ZookeeperConfiguration) DeepCopyInto(out *ZookeeperConfiguration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ZookeeperInput

type ZookeeperInput struct {
	Metadata Metadata      `json:"metadata,omitempty"`
	Spec     ZookeeperSpec `json:"spec,omitempty"`
}

ZookeeperInput is the Schema for the analytics API. +k8s:openapi-gen=true

func (*ZookeeperInput) DeepCopyInto

func (in *ZookeeperInput) DeepCopyInto(out *ZookeeperInput)

type ZookeeperList

type ZookeeperList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Zookeeper `json:"items"`
}

ZookeeperList contains a list of Zookeeper. +k8s:openapi-gen=true

func (*ZookeeperList) DeepCopy

func (in *ZookeeperList) DeepCopy() *ZookeeperList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZookeeperList.

func (*ZookeeperList) DeepCopyInto

func (in *ZookeeperList) DeepCopyInto(out *ZookeeperList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ZookeeperList) DeepCopyObject

func (in *ZookeeperList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ZookeeperSpec

type ZookeeperSpec struct {
	CommonConfiguration  PodConfiguration       `json:"commonConfiguration,omitempty"`
	ServiceConfiguration ZookeeperConfiguration `json:"serviceConfiguration"`
}

ZookeeperSpec is the Spec for the zookeeper API. +k8s:openapi-gen=true

func (*ZookeeperSpec) DeepCopy

func (in *ZookeeperSpec) DeepCopy() *ZookeeperSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZookeeperSpec.

func (*ZookeeperSpec) DeepCopyInto

func (in *ZookeeperSpec) DeepCopyInto(out *ZookeeperSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ZookeeperStatus

type ZookeeperStatus struct {
	CommonStatus `json:",inline"`
	Ports        ZookeeperStatusPorts `json:"ports,omitempty"`
}

ZookeeperStatus defines the status of the zookeeper object. +k8s:openapi-gen=true

func (*ZookeeperStatus) DeepCopy

func (in *ZookeeperStatus) DeepCopy() *ZookeeperStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZookeeperStatus.

func (*ZookeeperStatus) DeepCopyInto

func (in *ZookeeperStatus) DeepCopyInto(out *ZookeeperStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ZookeeperStatusPorts

type ZookeeperStatusPorts struct {
	ClientPort string `json:"clientPort,omitempty"`
}

ZookeeperStatusPorts defines the status of the ports of the zookeeper object. +k8s:openapi-gen=true

func (*ZookeeperStatusPorts) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZookeeperStatusPorts.

func (*ZookeeperStatusPorts) DeepCopyInto

func (in *ZookeeperStatusPorts) DeepCopyInto(out *ZookeeperStatusPorts)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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