bdba

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultFlagTree = FlagTree{

	Version: globals.BDBAVersion,

	ClusterDomain: "cluster.local",

	PGStorageClass:       "default",
	PGPVCSize:            "300Gi",
	MinioStorageClass:    "default",
	MinioPVCSize:         "300Gi",
	RabbitMQStorageClass: "default",
	RabbitMQPVCSize:      "8Gi",

	LicensingUpstream: "https://protecode-sc.com/",

	SessionCookieAge: 1209600,
	FrontendReplicas: 1,
	HideLicenses:     false,
	OfflineMode:      false,
	AdminEmail:       "[email protected]",
	RootURL:          "http://bdba.local",

	EmailEnabled:  false,
	EmailSMTPPort: 25,
	EmailFrom:     "[email protected]",
	EmailSecurity: "none",
	EmailVerify:   false,

	LDAPEnabled:              false,
	LDAPBindAsAuthenticating: false,
	LDAPStartTLS:             false,
	LDAPNestedSearch:         false,

	DisableFrontendLogging: false,
	DisableWorkerLogging:   false,
	LogRetention:           30,

	WorkerReplicas:    1,
	WorkerConcurrency: 1,

	MinioMode: "standalone",

	IngressEnabled:    false,
	IngressTLSEnabled: false,

	ExternalPG:        false,
	ExternalPGPort:    5432,
	ExternalPGSSLMode: "disable",

	PGPassword: "default",
}

DefaultFlagTree ... [Dev Note]: These should match the Helm Chart's Values.yaml

Functions

This section is empty.

Types

type FlagTree

type FlagTree struct {
	Version string `json:"version"`

	ClusterDomain string `json:"clusterDomain"`

	// Storage
	PGStorageClass        string `json:"pgStorageClass"`
	PGPVCSize             string `json:"PGPVCSize"`
	PGExistingClaim       string `json:"pgExistingClaim"`
	MinioStorageClass     string `json:"minioStorageClass"`
	MinioPVCSize          string `json:"MinioPVCSize"`
	MinioExistingClaim    string `json:"minioExistingClaim"`
	RabbitMQStorageClass  string `json:"rabbitmqStorageClass"`
	RabbitMQPVCSize       string `json:"RabbitMQPVCSize"`
	RabbitMQExistingClaim string `json:"rabbitmqExistingClaim"`

	// Licensing
	LicensingUsername string `json:"licensingUsername"`
	LicensingPassword string `json:"licensingPassword"`
	LicensingUpstream string `json:"licensingUpstream"`

	// Web frontend configuration
	SessionCookieAge int    `json:"sessionCookieAge"`
	FrontendReplicas int    `json:"frontendReplicas"`
	HideLicenses     bool   `json:"hideLicenses"`
	OfflineMode      bool   `json:"offlineMode"`
	AdminEmail       string `json:"adminEmail"`
	ErrorAdminEmail  string `json:"errorAdminEmail"`
	RootURL          string `json:"rootURL"`

	// SMTP configuration
	EmailEnabled      bool   `json:"emailEnabled"`
	EmailSMTPHost     string `json:"emailSMTPHost"`
	EmailSMTPPort     int    `json:"emailSMTPPort"`
	EmailSMTPUser     string `json:"emailSMTPUser"`
	EmailSMTPPassword string `json:"emailSMTPPassword"`
	EmailFrom         string `json:"emailFrom"`
	EmailSecurity     string `json:"emailSecurity"`
	EmailVerify       bool   `json:"emailVerify"`

	// LDAP Authentication
	LDAPEnabled              bool   `json:"ldapEnabled"`
	LDAPServerURI            string `json:"ldapServerURI"`
	LDAPUserDNTemplate       string `json:"ldapUserDNTemplate"`
	LDAPBindAsAuthenticating bool   `json:"ldapBindAsAuthenticating"`
	LDAPBindDN               string `json:"ldapBindDN"`
	LDAPBindPassword         string `json:"ldapBindPassword"`
	LDAPStartTLS             bool   `json:"ldapStartTLS"`
	LDAPVerify               bool   `json:"ldapVerify"`
	LDAPRootCASecret         string `json:"ldapRootCASecret"`
	LDAPRequireGroup         string `json:"ldapRequireGroup"`
	LDAPUserSearch           string `json:"ldapUserSearch"`
	LDAPUserSearchScope      string `json:"ldapUserSearchScope"`
	LDAPGroupSearch          string `json:"ldapGroupSearch"`
	LDAPGroupSearchScope     string `json:"ldapGroupSearchScope"`
	LDAPNestedSearch         bool   `json:"ldapNestedSearch"`

	// Logging
	DisableFrontendLogging bool `json:"disableFrontendLogging"`
	DisableWorkerLogging   bool `json:"disableWorkerLogging"`
	LogRetention           int  `json:"logRetention"`

	// Worker scaling
	WorkerReplicas    int `json:"workerReplicas"`
	WorkerConcurrency int `json:"workerConcurrency"`

	// Networking and security
	RootCASecret string `json:"rootCASecret"`
	HTTPProxy    string `json:"httpProxy"`
	HTTPNoProxy  string `json:"httpNoProxy"`

	// Minio
	MinioMode string `json:"minioMode"`

	// Ingress
	IngressEnabled       bool   `json:"ingressEnabled"`
	IngressHost          string `json:"ingressHost"`
	IngressTLSEnabled    bool   `json:"ingressTLSEnabled"`
	IngressTLSSecretName string `json:"ingressTLSSecretName"`

	// External PostgreSQL
	ExternalPG             bool   `json:"ExternalPg"`
	ExternalPGHost         string `json:"ExternalPgHost"`
	ExternalPGPort         int    `json:"ExternalPgPort"`
	ExternalPGUser         string `json:"ExternalPgUser"`
	ExternalPGPassword     string `json:"ExternalPgPassword"`
	ExternalPGDataBase     string `json:"ExternalPgDataBase"`
	ExternalPGSSLMode      string `json:"ExternalPgSSLMode"`
	ExternalPGRootCASecret string `json:"ExternalPgRootCASecret"`
	ExternalPGClientSecret string `json:"ExternalPgClientSecret"`

	// Secrets
	PGPassword       string `json:"pgPassword"`
	PGExistingSecret string `json:"pgExistingSecret"`
}

FlagTree is a set of fields needed to configure the BDBA Helm Chart

func GetDefaultFlagTree added in v1.1.0

func GetDefaultFlagTree() *FlagTree

GetDefaultFlagTree ...

type HelmValuesFromCobraFlags

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

HelmValuesFromCobraFlags is a type for converting synopsysctl flags to Helm Chart fields and values args: map of helm chart field to value

func NewHelmValuesFromCobraFlags

func NewHelmValuesFromCobraFlags() *HelmValuesFromCobraFlags

NewHelmValuesFromCobraFlags returns an initialized HelmValuesFromCobraFlags

func (*HelmValuesFromCobraFlags) AddCobraFlagsToCommand

func (ctl *HelmValuesFromCobraFlags) AddCobraFlagsToCommand(cmd *cobra.Command, isCreateCmd bool)

AddCobraFlagsToCommand adds flags for the BDBA helm chart to the cmd

func (*HelmValuesFromCobraFlags) AddHelmValueByCobraFlag

func (ctl *HelmValuesFromCobraFlags) AddHelmValueByCobraFlag(f *pflag.Flag)

AddHelmValueByCobraFlag adds the helm chart field and value based on the flag set in synopsysctl

func (*HelmValuesFromCobraFlags) CheckValuesFromFlags

func (ctl *HelmValuesFromCobraFlags) CheckValuesFromFlags(flagset *pflag.FlagSet) error

CheckValuesFromFlags returns an error if a value set by a flag is invalid

func (*HelmValuesFromCobraFlags) GenerateHelmFlagsFromCobraFlags

func (ctl *HelmValuesFromCobraFlags) GenerateHelmFlagsFromCobraFlags(flagset *pflag.FlagSet) (map[string]interface{}, error)

GenerateHelmFlagsFromCobraFlags checks each flag in synopsysctl and updates the map to contain the corresponding helm chart field and value

func (*HelmValuesFromCobraFlags) GetArgs

func (ctl *HelmValuesFromCobraFlags) GetArgs() map[string]interface{}

GetArgs returns the map of helm chart fields to values

func (*HelmValuesFromCobraFlags) SetArgs

func (ctl *HelmValuesFromCobraFlags) SetArgs(args map[string]interface{})

SetArgs set the map to values

Jump to

Keyboard shortcuts

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