modules

package
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2019 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NameSpace string // Used to pass namespace from cmd to module to avoid import cycle.
	Output    bool   // Flag passing hack
	Version   string // Flag passing hack
	Verbose   bool   // Flag passing hack
	Dryrun    bool   // Flag passing hack
	Branch    string // Flag passing hack
	BaseEnvs  bool   //Flag passing hack
	CVfile    string //Flag passing hack
	Defaults  bool   //Flag passing hack
	Format    string // Flag passing hack
	Template  string // Flag passing hack
	Suffix    string // Flag passing hack
	Enforce   bool
	ImageNS   string
	Registry  string
	Tag       string
	OName     string
)

This is a complete hack. todo: fix this shit, restructure packages

View Source
var EnvBlacklistFilter []string = []string{
	"path",
	"home",
	"bash",
	"env",
	"sti",
	"openshift",
}

Slice of strings that we wash environment variables with from the base image when creating a deploymentconfig

View Source
var LabelBlacklistFilter []string = []string{
	"openshift",
	"s2i",
	"license",
	"k8s",
}

Slice of strings that we wash labels from baseimage with when creating a deploymentconfig

View Source
var TmplBasePath = "/usr/share/metagraf/templates"

todo this should be made a configuration option, distribution of templates are also "unsolved"

View Source
var Variables map[string]string

Functions

func ConfigSecretName added in v0.0.6

func ConfigSecretName(c *metagraf.Config) string

func EnvToEnvVar

func EnvToEnvVar(e *metagraf.EnvironmentVar, ext bool) corev1.EnvVar

Applies conventions and override logic to an environment variable and returns a corev1.EnvVar{}.

func ExternalEnvToEnvVar

func ExternalEnvToEnvVar(e *metagraf.EnvironmentVar) corev1.EnvVar

Prepends _ to indicate environment variable name to indicate a variable that comes from some external configuration repository. How you use this is an implementation detail in the runtime container image.

func FindMetagrafConfigMaps added in v0.0.12

func FindMetagrafConfigMaps(mg *metagraf.MetaGraf) map[string]string

This function will inspect the metaGraf specification for which configmaps it will need to create and their type in a map.

func FindSecrets

func FindSecrets(mg *metagraf.MetaGraf) map[string]string

func GenBuildConfig

func GenBuildConfig(mg *metagraf.MetaGraf)

func GenConfigMaps

func GenConfigMaps(mg *metagraf.MetaGraf)

Entry function for creating a slew of configmaps, this will be somewhat specific to NT internal workings for now.

func GenDeployment

func GenDeployment(mg *metagraf.MetaGraf)

func GenDeploymentConfig

func GenDeploymentConfig(mg *metagraf.MetaGraf, namespace string)

Todo: Still needs to be split up, but some refactoring has been done.

func GenDotFromPath

func GenDotFromPath(cpath string)

func GenImageStream

func GenImageStream(mg *metagraf.MetaGraf, namespace string)

func GenRef

func GenRef(mg *metagraf.MetaGraf)

func GenRoute

func GenRoute(mg *metagraf.MetaGraf)

func GenSecrets

func GenSecrets(mg *metagraf.MetaGraf)

func GenService

func GenService(mg *metagraf.MetaGraf)

func GetConfigMap added in v0.0.12

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

Fetch a ConfigMap resource the connected kubernetes cluster.

func GetMetagrafConfigByType added in v0.0.12

func GetMetagrafConfigByType(mg *metagraf.MetaGraf, ctype string) []metagraf.Config

Returns a slice of metagraf Config structs that match specific ctype string

func GetSecret added in v0.0.12

func GetSecret(name string) (*corev1.Secret, error)

func InspectConfigMaps

func InspectConfigMaps(mg *metagraf.MetaGraf)

func InspectSecrets

func InspectSecrets(mg *metagraf.MetaGraf)

func MGAppName

func MGAppName(mg *metagraf.MetaGraf) string

func MarshalObject

func MarshalObject(obj runtime.Object)

Marshal kubernetes resource to json

func MiddlearthApp

func MiddlearthApp(mg *metagraf.MetaGraf)

func Name

func Name(mg *metagraf.MetaGraf) string

Returns a name for a resource based on convention as follows.

func ResourceSecretName

func ResourceSecretName(r *metagraf.Resource) string

Returns a name for a secret for a resource based on convention as follows.

func SpecName added in v0.0.19

func SpecName(mg *metagraf.MetaGraf) string

Return a specification name for a resource base on convention. Does not adhere to override flags.

func StoreBuildConfig

func StoreBuildConfig(obj buildv1.BuildConfig)

func StoreConfigMap

func StoreConfigMap(m corev1.ConfigMap)

func StoreDeploymentConfig

func StoreDeploymentConfig(obj appsv1.DeploymentConfig)

func StoreImageStream

func StoreImageStream(obj imagev1.ImageStream)

func StoreRoute

func StoreRoute(obj routev1.Route)

func StoreSecret

func StoreSecret(obj corev1.Secret)

func StoreService

func StoreService(obj corev1.Service)

func ValueFromEnv

func ValueFromEnv(key string) bool

Types

type MEActivationSpec

type MEActivationSpec struct {
	EJBPath       string `json:"EJBPath"`
	QRefId        string `json:"qRefId"`
	TransportType string `json:"transportType"`
	Qmgr          string `json:"qmgr"`
	HostName      string `json:"hostname"`
	Port          int16  `json:"port"`
	Channel       string `json:"channel"`
}

type MECert

type MECert struct {
	Alias string `json:"alias"`
	Url   string `json:"url"`
}

type MEConMgr

type MEConMgr struct {
	Id          string `json:"id"`
	MaxPoolSize int32  `json:"maxPoolSize"`
}

type MEDataSource

type MEDataSource struct {
	Name     string `json:"name"`
	MaxCon   int32  `json:"maxCon"`
	MinCon   int32  `json:"minCon"`
	Password string `json:"password"`
	Type     string `json:"type"`
}

type MEFile

type MEFile struct {
	Source string `json:"source"`
	Dest   string `json:"dest"`
}

type MELogging

type MELogging struct {
	LogDir      string `json:"logdir,omitempty"`
	MaxFileSize int32  `json:"maxFileSize,omitempty"`
	MaxFiles    int32  `json:"maxFiles,omitempty"`
}

type MEQcf

type MEQcf struct {
	JndiName      string `json:"jndiName"`
	Topic         bool   `json:"topic"`
	ConMgr        string `json:"conMgr"`
	UserName      string `json:"userName"`
	ClientId      string `json:"clientId"`
	TransportType string `json:"transportType"`
	HostName      string `json:"hostName"`
	Port          int16  `json:"port"`
	Channel       string `json:"channel"`
	Qmgr          string `json:"qmgr"`
}

type MEQueue

type MEQueue struct {
	Id       string `json:"id"`
	JndiName string `json:"jndiName"`
	Qname    string `json:"qname"`
	Qmgr     string `json:"qmgr"`
}

type MEServer

type MEServer struct {
	MaxHeap   int32  `json:"maxHeap,omitempty"`
	MinHeap   int32  `json:"minHeap,omitempty"`
	HttpPort  int32  `json:"httpPort,omitempty"`
	HttpsPort int32  `json:"httpsPort,omitempty"`
	Host      string `json:"host,omitempty"`
}

type Middlearth

type Middlearth struct {
	AppName        string            `json:"appName"`
	AppExploded    bool              `json:"appExploded,omitempty"`
	Binary         string            `json:"binary"`
	Contextroot    string            `json:"contextroot"`
	SelftestURI    string            `json:"selftestUri"`
	Type           string            `json:"type"`
	Version        string            `json:"version"`
	LibertyVersion string            `json:"libertyVersion"`
	LastEdited     string            `json:"lastEdited,omitempty"`
	JavaHome       string            `json:"javaHome"`
	Jolokia        bool              `json:"jolokia,omitempty"`
	SessionCookie  string            `json:"sessionCookie,omitempty"`
	Sha1           string            `json:"sha1,omitempty"`
	Server         MEServer          `json:"server,omitempty"`
	Logging        MELogging         `json:"logging"`
	Features       []string          `json:"features,omitempty"`
	Certs          []MECert          `json:"certs,omitempty"`
	Datasources    []MEDataSource    `json:"datasources,omitempty"`
	Jms            []MiddlearthJMS   `json:"jms,omitempty"`
	JvmParams      map[string]string `json:"jvmParams,omitempty"`
	SpecialTags    map[string]string `json:"specialTags,omitempty"`
	Files          []MEFile          `json:"files,omitempty"`
	WasVars        map[string]string `json:"wasVars,omitempty"`
}

type MiddlearthJMS

type MiddlearthJMS struct {
	ConMgr         []MEConMgr         `json:"conMgr,omitempty"`
	Qcf            []MEQcf            `json:"qcf,omitempty"`
	Queues         []MEQueue          `json:"queues,omitempty"`
	ActivationSpec []MEActivationSpec `json:"activationSpec,omitempty"`
}

Jump to

Keyboard shortcuts

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