containers

package
v0.0.0-...-5d42de7 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// PostgresPort will hold the port number of Postgres
	PostgresPort = int32(5432)
)

Variables

This section is empty.

Functions

func GetHubKnobs

func GetHubKnobs() map[string]string

GetHubKnobs returns the default environs

func GetVersions

func GetVersions() []string

GetVersions will return the supported versions

Types

type ContainerFlavor

type ContainerFlavor struct {
	WebserverMemoryLimit       string
	SolrMemoryLimit            string
	WebappCPULimit             string
	WebappMemoryLimit          string
	WebappHubMaxMemory         string
	ScanReplicas               *int32
	ScanMemoryLimit            string
	ScanHubMaxMemory           string
	JobRunnerReplicas          *int32
	JobRunnerMemoryLimit       string
	JobRunnerHubMaxMemory      string
	CfsslMemoryLimit           string
	LogstashMemoryLimit        string
	RegistrationMemoryLimit    string
	ZookeeperMemoryLimit       string
	AuthenticationMemoryLimit  string
	AuthenticationHubMaxMemory string
	DocumentationMemoryLimit   string
	PostgresMemoryLimit        string
	PostgresCPULimit           string
	BinaryScannerMemoryLimit   string
	RabbitmqMemoryLimit        string
	UploadCacheMemoryLimit     string
}

ContainerFlavor configuration will have the settings for flavored Black Duck Blackduck

func GetContainersFlavor

func GetContainersFlavor(flavor string) *ContainerFlavor

GetContainersFlavor will return the default settings for the flavored Black Duck Blackduck TODO Make this typesafe, make flavor const into an enum.

type Creater

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

Creater will store the configuration to create the hub containers

func NewCreater

func NewCreater(config *protoform.Config, kubeConfig *rest.Config, kubeClient *kubernetes.Clientset, blackDuck *blackduckapi.Blackduck,
	hubContainerFlavor *ContainerFlavor, isBinaryAnalysisEnabled bool) *Creater

NewCreater will return a creater

func (*Creater) GetAuthenticationDeployment

func (c *Creater) GetAuthenticationDeployment(imageName string) (*components.Deployment, error)

GetAuthenticationDeployment will return the authentication deployment

func (*Creater) GetAuthenticationService

func (c *Creater) GetAuthenticationService() *components.Service

GetAuthenticationService will return the authentication service

func (*Creater) GetBinaryScannerDeployment

func (c *Creater) GetBinaryScannerDeployment(imageName string) (*components.Deployment, error)

GetBinaryScannerDeployment will return the binary scanner deployment

func (*Creater) GetCfsslDeployment

func (c *Creater) GetCfsslDeployment(imageName string) (*components.Deployment, error)

GetCfsslDeployment will return the cfssl deployment

func (*Creater) GetCfsslService

func (c *Creater) GetCfsslService() *components.Service

GetCfsslService will return the cfssl service

func (*Creater) GetConfigmaps

func (c *Creater) GetConfigmaps() []*components.ConfigMap

GetConfigmaps will create hub configMaps

func (*Creater) GetDocumentationDeployment

func (c *Creater) GetDocumentationDeployment(imageName string) (*components.Deployment, error)

GetDocumentationDeployment will return the documentation deployment

func (*Creater) GetDocumentationService

func (c *Creater) GetDocumentationService() *components.Service

GetDocumentationService will return the cfssl service

func (*Creater) GetFullContainerNameFromImageRegistryConf

func (c *Creater) GetFullContainerNameFromImageRegistryConf(baseContainer string) string

GetFullContainerNameFromImageRegistryConf returns the tag that is specified for a container by trying to look in the custom tags provided, if those arent filled, it uses the "HubVersion" as a default, which works for blackduck < 5.1.0.

func (*Creater) GetImageTag

func (c *Creater) GetImageTag(name string) string

GetImageTag returns the image tag of the given container

func (*Creater) GetJobRunnerDeployment

func (c *Creater) GetJobRunnerDeployment(imageName string) (*components.Deployment, error)

GetJobRunnerDeployment will return the job runner deployment

func (*Creater) GetLabel

func (c *Creater) GetLabel(name string) map[string]string

GetLabel will return the label

func (*Creater) GetLogStashService

func (c *Creater) GetLogStashService() *components.Service

GetLogStashService will return the logstash service

func (*Creater) GetNodeAffinityConfigs

func (c *Creater) GetNodeAffinityConfigs(podName string) map[horizonapi.AffinityType][]*horizonapi.NodeAffinityConfig

GetNodeAffinityConfigs takes in a podName, and returns all associated []*horizonapi.NodeAffinityConfig based on what the user provided

func (*Creater) GetOpenShiftRoute

func (c *Creater) GetOpenShiftRoute() *api.Route

GetOpenShiftRoute creates the OpenShift route component for the webserver

func (*Creater) GetPVCs

func (c *Creater) GetPVCs() ([]*components.PersistentVolumeClaim, error)

GetPVCs will return the PVCs

func (*Creater) GetPostgres

func (c *Creater) GetPostgres() *postgres.Postgres

GetPostgres will return the postgres object

func (*Creater) GetPostgresConfigmap

func (c *Creater) GetPostgresConfigmap() *components.ConfigMap

GetPostgresConfigmap will return the postgres configMaps

func (*Creater) GetPostgresSecret

func (c *Creater) GetPostgresSecret(adminPassword string, userPassword string, postgresPassword string) *components.Secret

GetPostgresSecret will return the postgres secret

func (*Creater) GetRabbitmqDeployment

func (c *Creater) GetRabbitmqDeployment(imageName string) (*components.Deployment, error)

GetRabbitmqDeployment will return the rabbitmq deployment

func (*Creater) GetRabbitmqService

func (c *Creater) GetRabbitmqService() *components.Service

GetRabbitmqService will return the rabbitmq service

func (*Creater) GetRegistrationDeployment

func (c *Creater) GetRegistrationDeployment(imageName string) (*components.Deployment, error)

GetRegistrationDeployment will return the registration deployment

func (*Creater) GetRegistrationService

func (c *Creater) GetRegistrationService() *components.Service

GetRegistrationService will return the registration service

func (*Creater) GetScanDeployment

func (c *Creater) GetScanDeployment(imageName string) (*components.Deployment, error)

GetScanDeployment will return the scan deployment

func (*Creater) GetScanService

func (c *Creater) GetScanService() *components.Service

GetScanService will return the scan service

func (*Creater) GetSecrets

func (c *Creater) GetSecrets(cert string, key string) []*components.Secret

GetSecrets wil return the secrets

func (*Creater) GetSolrDeployment

func (c *Creater) GetSolrDeployment(imageName string) (*components.Deployment, error)

GetSolrDeployment will return the solr deployment

func (*Creater) GetSolrService

func (c *Creater) GetSolrService() *components.Service

GetSolrService will return the solr service

func (*Creater) GetUploadCacheDeployment

func (c *Creater) GetUploadCacheDeployment(imageName string) (*components.Deployment, error)

GetUploadCacheDeployment will return the uploadCache deployment

func (*Creater) GetUploadCacheService

func (c *Creater) GetUploadCacheService() *components.Service

GetUploadCacheService will return the uploadCache service

func (*Creater) GetVersionLabel

func (c *Creater) GetVersionLabel(name string) map[string]string

GetVersionLabel will retun the label including the version

func (*Creater) GetWebAppService

func (c *Creater) GetWebAppService() *components.Service

GetWebAppService will return the webapp service

func (*Creater) GetWebServerLoadBalancerService

func (c *Creater) GetWebServerLoadBalancerService() *components.Service

GetWebServerLoadBalancerService will return the webserver loadbalancer service

func (*Creater) GetWebServerNodePortService

func (c *Creater) GetWebServerNodePortService() *components.Service

GetWebServerNodePortService will return the webserver nodeport service

func (*Creater) GetWebServerService

func (c *Creater) GetWebServerService() *components.Service

GetWebServerService will return the webserver service

func (*Creater) GetWebappLogstashDeployment

func (c *Creater) GetWebappLogstashDeployment(webappImageName string, logstashImageName string) (*components.Deployment, error)

GetWebappLogstashDeployment will return the webapp and logstash deployment

func (*Creater) GetWebserverDeployment

func (c *Creater) GetWebserverDeployment(imageName string) (*components.Deployment, error)

GetWebserverDeployment will return the webserver deployment

func (*Creater) GetZookeeperDeployment

func (c *Creater) GetZookeeperDeployment(imageName string) (*components.Deployment, error)

GetZookeeperDeployment will return the zookeeper deployment

func (*Creater) GetZookeeperService

func (c *Creater) GetZookeeperService() *components.Service

GetZookeeperService will return the zookeeper service

type Flavor

type Flavor string

Flavor will determine the size of the Black Duck Blackduck

const (
	// SMALL Black Duck Blackduck
	SMALL Flavor = "SMALL"
	// MEDIUM Black Duck Blackduck
	MEDIUM Flavor = "MEDIUM"
	// LARGE Black Duck Blackduck
	LARGE Flavor = "LARGE"
	// XLARGE Black Duck Blackduck
	XLARGE Flavor = "X-LARGE"
)

Jump to

Keyboard shortcuts

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