Documentation ¶
Overview ¶
Copyright 2020 The MetaGraph Authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Variables
- func ConfigSecretName(c *metagraf.Config) string
- func DeleteBuildConfig(name string)
- func DeleteConfigMap(name string)
- func DeleteConfigMaps(mg *metagraf.MetaGraf)
- func DeleteDeploymentConfig(name string)
- func DeleteImageStream(name string)
- func DeleteRoute(name string)
- func DeleteSecret(name string)
- func DeleteSecrets(mg *metagraf.MetaGraf)
- func DeleteService(name string)
- func EnvToEnvVar(e *metagraf.EnvironmentVar, ext bool) 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, namespace string)
- func GenDeploymentConfig(mg *metagraf.MetaGraf, namespace string)
- func GenDotFromPath(cpath string)
- func GenEnvVar_JVM_SYS_PROP(mg *metagraf.MetaGraf, name string) corev1.EnvVar
- 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 HasJVM_SYS_PROP(mg *metagraf.MetaGraf) bool
- func InspectConfigMaps(mg *metagraf.MetaGraf)
- func InspectSecrets(mg *metagraf.MetaGraf)
- func MGAppName(mg *metagraf.MetaGraf) string
- func MarshalObject(obj runtime.Object)
- func Name(mg *metagraf.MetaGraf) string
- func ResourceSecretName(r *metagraf.Resource) string
- func SpecName(mg *metagraf.MetaGraf) string
- func StoreBuildConfig(obj buildv1.BuildConfig)
- func StoreConfigMap(m corev1.ConfigMap)
- func StoreDeployment(obj appsv1.Deployment)
- 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
Constants ¶
This section is empty.
Variables ¶
var ( All bool 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 Context string // Application context root from FlagPassingHack. CreateGlobals bool )
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 DeleteBuildConfig ¶ added in v0.0.30
func DeleteBuildConfig(name string)
func DeleteConfigMap ¶ added in v0.0.30
func DeleteConfigMap(name string)
func DeleteConfigMaps ¶ added in v0.0.30
func DeleteDeploymentConfig ¶ added in v0.0.30
func DeleteDeploymentConfig(name string)
func DeleteImageStream ¶ added in v0.0.30
func DeleteImageStream(name string)
func DeleteRoute ¶ added in v0.0.30
func DeleteRoute(name string)
func DeleteSecret ¶ added in v0.0.30
func DeleteSecret(name string)
func DeleteSecrets ¶ added in v0.0.30
func DeleteService ¶ added in v0.0.30
func DeleteService(name 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
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: Still needs to be split up, but some refactoring has been done.
func GenDotFromPath ¶
func GenDotFromPath(cpath string)
func GenEnvVar_JVM_SYS_PROP ¶ added in v0.0.31
Generate an EnvVar for a config section. SecretFrom or EnvFrom will not be processed.
func GenImageStream ¶
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 HasJVM_SYS_PROP ¶ added in v0.0.31
Identify if a metagraf specification has a JVM_SYS_PROP configuration type. This is a special type for handling system properties in the java space that your application might not know about.
func InspectConfigMaps ¶
func InspectSecrets ¶
func ResourceSecretName ¶
Returns a name for a secret for a resource based on convention as follows.
func SpecName ¶ added in v0.0.19
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 StoreDeployment ¶ added in v0.0.32
func StoreDeployment(obj appsv1.Deployment)
func StoreDeploymentConfig ¶
func StoreDeploymentConfig(obj appsv1.DeploymentConfig)
func StoreImageStream ¶
func StoreImageStream(obj imagev1.ImageStream)
func StoreRoute ¶
func StoreSecret ¶
func StoreService ¶
func ValueFromEnv ¶
Types ¶
This section is empty.