Back to godoc.org

Package protoform

v0.0.0-...-5d42de7
Latest Go to latest

The highest tagged major version is .

Published: Apr 30, 2020 | License: Apache-2.0 | Module: github.com/blackducksoftware/synopsys-operator

Index

func GetKubeClientFromOutsideCluster

func GetKubeClientFromOutsideCluster(kubeconfigpath string, insecureSkipTLSVerify bool) (*rest.Config, error)

GetKubeClientFromOutsideCluster returns the rest config of outside cluster

func GetKubeClientSet

func GetKubeClientSet(kubeConfig *rest.Config) (*kubernetes.Clientset, error)

GetKubeClientSet will return the kube clientset

func GetKubeConfig

func GetKubeConfig(kubeconfigpath string, insecureSkipTLSVerify bool) (*rest.Config, error)

GetKubeConfig will return the kube config

func GinRequestLogger

func GinRequestLogger() gin.HandlerFunc

GinRequestLogger is used to log the GIN requests

type Config

type Config struct {
	DryRun                        bool
	LogLevel                      string
	Namespace                     string
	CrdNamespace                  string
	Threadiness                   int
	PostgresRestartInMins         int64
	HubFederatorConfig            *HubFederatorConfig
	PodWaitTimeoutSeconds         int64
	ResyncIntervalInSeconds       int64
	TerminationGracePeriodSeconds int64
	AdmissionWebhookListener      bool
	CrdNames                      string
	IsClusterScoped               bool
	IsOpenshift                   bool
	Version                       string
}

Config type will be used for protoform config that bootstraps everything

func GetConfig

func GetConfig(configPath string, version string) (*Config, error)

GetConfig will read the config file and set in the Viper

func (*Config) GetLogLevel

func (config *Config) GetLogLevel() (log.Level, error)

GetLogLevel will set the log level

func (*Config) SelfSetDefaults

func (config *Config) SelfSetDefaults()

SelfSetDefaults ...

type Deployer

type Deployer struct {
	Config             *Config
	KubeConfig         *rest.Config
	KubeClientSet      *kubernetes.Clientset
	APIExtensionClient *apiextensionsclient.Clientset
	// contains filtered or unexported fields
}

Deployer handles deploying configured components to a cluster

func NewController

func NewController(configPath string, version string) (*Deployer, error)

NewController will initialize the input config file, create the hub informers, initiantiate all rest api

func NewDeployer

func NewDeployer(config *Config, kubeConfig *rest.Config, kubeClientSet *kubernetes.Clientset) (*Deployer, error)

NewDeployer will create the specification that is used for deploying controllers

func (*Deployer) AddController

func (d *Deployer) AddController(controller crd.ProtoformControllerInterface)

AddController will add the controllers to the list

func (*Deployer) Cleanup

func (d *Deployer) Cleanup()

Cleanup makes an empty controller list

func (*Deployer) Deploy

func (d *Deployer) Deploy() error

Deploy will deploy the controllers

type HubConfig

type HubConfig struct {
	User                         string
	PasswordEnvVar               string
	ClientTimeoutMilliseconds    int
	Port                         int
	FetchAllProjectsPauseSeconds int
}

HubConfig will have the configuration related to Blackduck

type HubFederatorConfig

type HubFederatorConfig struct {
	HubConfig    *HubConfig
	UseMockMode  bool
	Port         int
	Registry     string
	ImagePath    string
	ImageName    string
	ImageVersion string
}

HubFederatorConfig will have the configuration related to hub federator

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier