modules

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2018 License: Apache-2.0 Imports: 26 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
)

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 = "/home/a01595/go/src/metagraf/templates"

todo this should be made a configuration option

View Source
var Variables map[string]string

Functions

func EnvToEnvVar

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

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

func ExternalEnvToEnvVar

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

Prepends _ to indicate externally consumed variable.

func FindConfigMaps

func FindConfigMaps(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)

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 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 interface{})

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 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