Documentation ¶
Index ¶
- Variables
- func ConfigSecretName(c *metagraf.Config) string
- func EnvToEnvVar(e *metagraf.EnvironmentVar) corev1.EnvVar
- func ExternalEnvToEnvVar(e *metagraf.EnvironmentVar) corev1.EnvVar
- func FindMetagrafConfigMaps(mg *metagraf.MetaGraf) map[string]string
- func FindSecrets(mg *metagraf.MetaGraf) map[string]string
- func GenBuildConfig(mg *metagraf.MetaGraf)
- func GenConfigMaps(mg *metagraf.MetaGraf)
- func GenDeployment(mg *metagraf.MetaGraf)
- func GenDeploymentConfig(mg *metagraf.MetaGraf, namespace string)
- func GenDotFromPath(cpath string)
- func GenImageStream(mg *metagraf.MetaGraf, namespace string)
- func GenRef(mg *metagraf.MetaGraf)
- func GenRoute(mg *metagraf.MetaGraf)
- func GenSecrets(mg *metagraf.MetaGraf)
- func GenService(mg *metagraf.MetaGraf)
- func GetConfigMap(name string) (*corev1.ConfigMap, error)
- func GetMetagrafConfigByType(mg *metagraf.MetaGraf, ctype string) []metagraf.Config
- func GetSecret(name string) (*corev1.Secret, error)
- func InspectConfigMaps(mg *metagraf.MetaGraf)
- func InspectSecrets(mg *metagraf.MetaGraf)
- func MGAppName(mg *metagraf.MetaGraf) string
- func MarshalObject(obj interface{})
- func MiddlearthApp(mg *metagraf.MetaGraf)
- func Name(mg *metagraf.MetaGraf) string
- func ResourceSecretName(r *metagraf.Resource) string
- func StoreBuildConfig(obj buildv1.BuildConfig)
- func StoreConfigMap(m corev1.ConfigMap)
- func StoreDeploymentConfig(obj appsv1.DeploymentConfig)
- func StoreImageStream(obj imagev1.ImageStream)
- func StoreRoute(obj routev1.Route)
- func StoreSecret(obj corev1.Secret)
- func StoreService(obj corev1.Service)
- func ValueFromEnv(key string) bool
- type MEActivationSpec
- type MECert
- type MEConMgr
- type MEDataSource
- type MEFile
- type MELogging
- type MEQcf
- type MEQueue
- type MEServer
- type Middlearth
- type MiddlearthJMS
Constants ¶
This section is empty.
Variables ¶
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 = false )
This is a complete hack. todo: fix this shit, restructure packages
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
var LabelBlacklistFilter []string = []string{
"openshift",
"s2i",
"license",
"k8s",
}
Slice of strings that we wash labels from baseimage with when creating a deploymentconfig
var TmplBasePath = "/usr/share/metagraf/templates"
todo this should be made a configuration option, distribution of templates are also "unsolved"
var Variables map[string]string
Functions ¶
func ConfigSecretName ¶ added in v0.0.6
func EnvToEnvVar ¶
func EnvToEnvVar(e *metagraf.EnvironmentVar) 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
This function will inspect the metaGraf specification for which configmaps it will need to create and their type in a map.
func GenBuildConfig ¶
func GenConfigMaps ¶
Entry function for creating a slew of configmaps, this will be somewhat specific to NT internal workings for now.
func GenDeployment ¶
func GenDeploymentConfig ¶
Todo: Break this up and refactor, total POS...
func GenDotFromPath ¶
func GenDotFromPath(cpath string)
func GenImageStream ¶
func GenSecrets ¶
func GenService ¶
func GetConfigMap ¶ added in v0.0.12
Fetch a ConfigMap resource the connected kubernetes cluster.
func GetMetagrafConfigByType ¶ added in v0.0.12
Returns a slice of metagraf Config structs that match specific ctype string
func InspectConfigMaps ¶
func InspectSecrets ¶
func MiddlearthApp ¶
func ResourceSecretName ¶
Returns a name for a secret for a resource based on convention as follows.
func StoreBuildConfig ¶
func StoreBuildConfig(obj buildv1.BuildConfig)
func StoreConfigMap ¶
func StoreDeploymentConfig ¶
func StoreDeploymentConfig(obj appsv1.DeploymentConfig)
func StoreImageStream ¶
func StoreImageStream(obj imagev1.ImageStream)
func StoreRoute ¶
func StoreSecret ¶
func StoreService ¶
func ValueFromEnv ¶
Types ¶
type MEActivationSpec ¶
type MEDataSource ¶
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 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"` }