v1.1.6 Latest Latest

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

Go to latest
Published: Feb 17, 2021 License: Apache-2.0 Imports: 12 Imported by: 0




This section is empty.


View Source
var (
	ScheduledTimeAnnotation = ""

config implements Config struct


func GetClusterRole

func GetClusterRole() string

GetClusterRole returns the ClusterRole from config

func GetConfigRaw

func GetConfigRaw() map[string]interface{}

GetConfigRaw returns the Config structure in map[string]interface

func GetDeployPrefix

func GetDeployPrefix() string

GetDeployPrefix returns the prefix to use for deploy namespace name

func GetMinioRaw

func GetMinioRaw() map[string]interface{}

GetMinio returns the Minio structure

func GetNamespace

func GetNamespace() string

func GetRaw

func GetRaw(input interface{}) map[string]interface{}

GetRaw return a map[string]interface from the interface

func GetWebhooks

func GetWebhooks() []webhook.Webhook

GetWebhooks returns the list of url where to send the event

func GetWorkspacePath

func GetWorkspacePath(name string) string

GetWorkspacePath returns path from workspace

func New

func New(filename string) error

New get the filename and fill Config struct

func SetNamespace added in v0.1.1

func SetNamespace(namespace string)

func Validate

func Validate() error

Validate returns an error if is mandatory Config missing

func Volume

func Volume() tkn.WorkspaceBinding

Volume returns Tekton WorkspaceBinding

func Workspaces

func Workspaces() []tkn.WorkspaceDeclaration

Workspaces returns list of Tekton WorkspaceDeclaration


type Config

type Config struct {
	DefaultDomain string                     `json:"domain" yaml:"domain"`
	ClusterRole   string                     `json:"cluster_role" yaml:"cluster_role"`
	PodTemplate   *tkn.PodTemplate           `json:"podTemplate" yaml:"pod_template"`
	Workspaces    []tkn.WorkspaceDeclaration `json:"workspaces" yaml:"workspaces"`
	Ingress       Ingress                    `json:"ingress" yaml:"ingress"`
	Volume        tkn.WorkspaceBinding       `json:"volume" yaml:"volume"`
	Namespace     string                     `json:"namespace" yaml:"namespace"`

	// Hash is use for provide unpredictable string from an integer
	Hash Hash `json:"hash" yaml:"hash"`

	// Minio contains all minio information for the connection the could be omitted
	Minio *Minio `json:"minio,omitempty" yaml:"minio,omitempty"`

	// DeployPrefix is used to build namespace name where application will be deployed
	// default values is cx
	DeployPrefix string `json:"deploy_prefix" yaml:"deploy_prefix"`

	// WebHooks contains a list of WebHook where payload will be send
	Webhooks []webhook.Webhook `json:"webhooks" yaml:"webhooks"`

Config controller common parameter

func GetConfig

func GetConfig() *Config

GetConfig returns the Config values

type Hash

type Hash struct {
	Salt      string `json:"salt" yaml:"salt"`
	MinLength int    `json:"min_length" yaml:"min_length"`

type Ingress

type Ingress struct {
	Class  string `json:"class" yaml:"class"`
	Prefix string `json:"prefix" yaml:"prefix"`
	Issuer string `json:"issuer" yaml:"issuer"`

Ingress struct

type Minio

type Minio struct {
	Host      string `json:"host" yaml:"host"`
	AccessKey string `json:"access_key" yaml:"access_key"`
	SecretKey string `json:"secret_key" yaml:"secret_key"`
	Bucket    string `json:"bucket" yaml:"bucket"`

func GetMinio

func GetMinio() *Minio

GetMinio return the Minio structure

func (*Minio) GetAccessKey

func (m *Minio) GetAccessKey() string

GetAccessKey method returns the access_key from Minio structure

func (*Minio) GetBucket

func (m *Minio) GetBucket() string

GetBucket method returns the minio bucket

func (*Minio) GetHost

func (m *Minio) GetHost() string

GetHost method returns the host from Minio structure

func (*Minio) GetSecretKey

func (m *Minio) GetSecretKey() string

GetSecretKey method returns the secret_key from Minio structure

Jump to

Keyboard shortcuts

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