Documentation ¶
Index ¶
- Variables
- func AllArgs(optionsList ...v1.Options) []string
- func AsOwner(jaeger *v1.Jaeger) metav1.OwnerReference
- func CloseFile(f *os.File, log *logr.Logger)
- func CreateEnvsFromSecret(secretName string) []corev1.EnvFromSource
- func DNSName(name string) string
- func FindEnvVar(envs []corev1.EnvVar, name string) *corev1.EnvVar
- func FindItem(prefix string, args []string) string
- func GenerateProxySecret() string
- func GetAdminPort(args []string, port int32) int32
- func GetEsHostname(opts map[string]interface{}) string
- func GetOperatorNamespace() (string, error)
- func GetPort(arg string, args []string, port int32) int32
- func ImageName(image, param string) string
- func InitObjectMeta(obj metav1.Object)
- func IsOTLPEnable(options []string) bool
- func IsOTLPExplcitSet(options []string) bool
- func Labels(name, component string, jaeger v1.Jaeger) map[string]string
- func Merge(commonSpecs []v1.JaegerCommonSpec) *v1.JaegerCommonSpec
- func MergeResources(resources *corev1.ResourceRequirements, res corev1.ResourceRequirements)
- func RemoveDuplicatedImagePullSecrets(imagePullSecrets []corev1.LocalObjectReference) []corev1.LocalObjectReference
- func RemoveDuplicatedVolumeMounts(volumeMounts []corev1.VolumeMount) []corev1.VolumeMount
- func RemoveDuplicatedVolumes(volumes []corev1.Volume) []corev1.Volume
- func RemoveEmptyVars(envVars []corev1.EnvVar) []corev1.EnvVar
- func ReplaceArgument(prefix string, newValue string, args []string) int
- func Truncate(format string, max int, values ...interface{}) string
- type RunModeType
Constants ¶
This section is empty.
Variables ¶
var ErrNoNamespace = fmt.Errorf("namespace not found for current environment")
ErrNoNamespace indicates that a namespace could not be found for the current environment
var ErrRunLocal = fmt.Errorf("operator run mode forced to local")
ErrRunLocal indicates that the operator is set to run in local mode (this error is returned by functions that only work on operators running in cluster mode)
var ForceRunModeEnv = "OSDK_FORCE_RUN_MODE"
ForceRunModeEnv indicates if the operator should be forced to run in either local or cluster mode (currently only used for local mode)
Functions ¶
func AsOwner ¶ added in v1.11.0
func AsOwner(jaeger *v1.Jaeger) metav1.OwnerReference
AsOwner returns owner reference for jaeger
func CreateEnvsFromSecret ¶ added in v1.15.1
func CreateEnvsFromSecret(secretName string) []corev1.EnvFromSource
CreateEnvsFromSecret adds env from secret name.
func DNSName ¶ added in v1.13.0
DNSName returns a dns-safe string for the given name. Any char that is not [a-z0-9] is replaced by "-" or "a". Replacement character "a" is used only at the beginning or at the end of the name. The function does not change length of the string.
func FindEnvVar ¶ added in v1.35.0
FindEnvVar return the EnvVar with given name or nil if not found
func GenerateProxySecret ¶ added in v1.17.0
func GenerateProxySecret() string
GenerateProxySecret generate random secret key for oauth proxy cookie.
func GetAdminPort ¶ added in v1.21.0
GetAdminPort returns a port, either from supplied default port, or extracted from supplied arg value. If new admin port flag exists, it will extracted from the new flag, otherwise will try to extract from deprecated flag.
func GetEsHostname ¶ added in v1.11.0
GetEsHostname return first ES hostname from options map
func GetOperatorNamespace ¶ added in v1.29.0
GetOperatorNamespace returns the namespace the operator should be running in.
func GetPort ¶ added in v1.11.1
GetPort returns a port, either from supplied default port, or extracted from supplied arg value
func ImageName ¶ added in v1.15.0
ImageName returns the image associated with the supplied image if defined, otherwise uses the parameter name to retrieve the value. If the parameter value does not include a tag/digest, the Jaeger version will be appended.
func InitObjectMeta ¶ added in v1.12.1
InitObjectMeta will set the required default settings to kubernetes objects metadata if is required.
func IsOTLPEnable ¶ added in v1.35.0
IsOTLPEnable return true if OTLP is enabled, this means --collector.otlp.enabled=true or abscense of flag, means is enabled by defaultr
func IsOTLPExplcitSet ¶ added in v1.35.0
IsOTLPExplcitSet return true if a flag for enable the otlp is set on the options
func Merge ¶
func Merge(commonSpecs []v1.JaegerCommonSpec) *v1.JaegerCommonSpec
Merge returns a merged version of the list of JaegerCommonSpec instances with most specific first
func MergeResources ¶ added in v1.14.0
func MergeResources(resources *corev1.ResourceRequirements, res corev1.ResourceRequirements)
MergeResources returns a merged version of two resource requirements
func RemoveDuplicatedImagePullSecrets ¶ added in v1.19.0
func RemoveDuplicatedImagePullSecrets(imagePullSecrets []corev1.LocalObjectReference) []corev1.LocalObjectReference
RemoveDuplicatedImagePullSecrets returns a unique list of ImagePullSecrets based on ImagePullSecrets names. Only the first item is kept.
func RemoveDuplicatedVolumeMounts ¶ added in v1.19.0
func RemoveDuplicatedVolumeMounts(volumeMounts []corev1.VolumeMount) []corev1.VolumeMount
RemoveDuplicatedVolumeMounts returns a unique list based on the item names. Only the first item is kept.
func RemoveDuplicatedVolumes ¶ added in v1.18.0
RemoveDuplicatedVolumes returns a unique list of Volumes based on Volume names. Only the first item is kept.
func RemoveEmptyVars ¶ added in v1.15.1
RemoveEmptyVars removes empty variables from the input slice.
func ReplaceArgument ¶ added in v1.17.0
ReplaceArgument replace argument value with given value.
Types ¶
type RunModeType ¶ added in v1.29.0
type RunModeType string
RunModeType cluster run mode
const ( // LocalRunMode local run mode LocalRunMode RunModeType = "local" // ClusterRunMode cluster run mode ClusterRunMode RunModeType = "cluster" )