Documentation ¶
Index ¶
- Constants
- func AffinityNodeRequirement() []corev1.NodeSelectorRequirement
- func AffinityNodeRequirementWithARM64() []corev1.NodeSelectorRequirement
- func AreSecretsEqual(secret corev1.Secret, other corev1.Secret) bool
- func CheckIfOneAgentAPMExists(cfg *rest.Config) (bool, error)
- func ConfigMapDataEqual(map1, map2 *corev1.ConfigMap) bool
- func CreateOrUpdateDaemonSet(kubernetesClient client.Client, logger logr.Logger, ...) (bool, error)
- func EnvVarIsIn(envVars []corev1.EnvVar, envVarToCheck string) bool
- func ExtractToken(secret *corev1.Secret, key string) (string, error)
- func FindContainerInPod(pod corev1.Pod, name string) (*corev1.Container, error)
- func FindEnvVar(envVarList []corev1.EnvVar, name string) *corev1.EnvVar
- func GenerateHash(ds interface{}) (string, error)
- func GetDataFromSecretName(apiReader client.Reader, namespacedName types.NamespacedName, dataKey string) (string, error)
- func GetDeployment(c client.Client, podName, namespace string) (*appsv1.Deployment, error)
- func GetField(values map[string]string, key string, defaultValue string) string
- func GetFieldBool(values map[string]string, key string, defaultValue bool) bool
- func GetVolumeByName(volumes []corev1.Volume, volumeName string) (*corev1.Volume, error)
- func HasChanged(a, b metav1.Object) bool
- func IsSecretDataEqual(currentSecret *corev1.Secret, desired map[string][]byte) bool
- func Key(object client.Object) client.ObjectKey
- func LabelsNotEqual(currentLabels, desiredLabels map[string]string) bool
- func MergeLabels(labels ...map[string]string) map[string]string
- func MountPathIsIn(volumeMounts []corev1.VolumeMount, mountPathToCheck string) bool
- func MountPathIsReadOnlyOrReadWrite(volumeMounts []corev1.VolumeMount, mountPathToCheck string, mode bool) bool
- func NewEnvVarSourceForField(fieldPath string) *corev1.EnvVarSource
- func NewSecret(name string, namespace string, data map[string][]byte) *corev1.Secret
- func PortIsIn(ports []corev1.ContainerPort, portToCheck int32) bool
- func ValidateCertificateExpiration(certData []byte, renewalThreshold time.Duration, now time.Time, ...) (bool, error)
- func VolumeIsDefined(volumes []corev1.Volume, volumeNameToCheck string) bool
- func VolumeMountIsDefined(volumeMounts []corev1.VolumeMount, volumeMountNameToCheck string) bool
- type AppLabels
- type ContainerBuilder
- type CoreLabels
- type DynakubeQuery
- func (query DynakubeQuery) Proxy(dynakube dynatracev1beta1.DynaKube) (string, error)
- func (query DynakubeQuery) TlsCert(dynakube dynatracev1beta1.DynaKube) (string, error)
- func (query DynakubeQuery) TrustedCAs(dynakube dynatracev1beta1.DynaKube) ([]byte, error)
- func (query DynakubeQuery) WithContext(ctx context.Context) DynakubeQuery
- type ProbeResult
- type SecretQuery
- type Tokens
Constants ¶
const ( AppNameLabel = "app.kubernetes.io/name" AppCreatedByLabel = "app.kubernetes.io/created-by" AppManagedByLabel = "app.kubernetes.io/managed-by" AppComponentLabel = "app.kubernetes.io/component" AppVersionLabel = "app.kubernetes.io/version" OneAgentComponentLabel = "oneagent" ActiveGateComponentLabel = "activegate" WebhookComponentLabel = "webhook" CustomImageLabelValue = "custom-image" )
const ( ReadOnlyMountPath = true ReadWriteMountPath = false )
const AnnotationHash = dynatracev1beta1.InternalFlagPrefix + "template-hash"
const UnprivilegedGroup = int64(1000)
const UnprivilegedUser = int64(1000)
Variables ¶
This section is empty.
Functions ¶
func AffinityNodeRequirement ¶
func AffinityNodeRequirement() []corev1.NodeSelectorRequirement
func AffinityNodeRequirementWithARM64 ¶
func AffinityNodeRequirementWithARM64() []corev1.NodeSelectorRequirement
func AreSecretsEqual ¶ added in v0.7.0
func CheckIfOneAgentAPMExists ¶
CheckIfOneAgentAPMExists checks if a OneAgentAPM object exists
func ConfigMapDataEqual ¶ added in v0.6.0
func CreateOrUpdateDaemonSet ¶
func EnvVarIsIn ¶ added in v0.5.0
func FindContainerInPod ¶ added in v0.8.0
func FindEnvVar ¶ added in v0.7.0
func GenerateHash ¶
func GetDataFromSecretName ¶ added in v0.7.0
func GetDeployment ¶
GetDeployment returns the Deployment object who is the owner of this pod.
func GetVolumeByName ¶ added in v0.6.0
func HasChanged ¶
func IsSecretDataEqual ¶ added in v0.7.0
func LabelsNotEqual ¶ added in v0.6.0
func MountPathIsIn ¶ added in v0.5.0
func MountPathIsIn(volumeMounts []corev1.VolumeMount, mountPathToCheck string) bool
func MountPathIsReadOnlyOrReadWrite ¶ added in v0.6.0
func MountPathIsReadOnlyOrReadWrite(volumeMounts []corev1.VolumeMount, mountPathToCheck string, mode bool) bool
func NewEnvVarSourceForField ¶ added in v0.8.0
func NewEnvVarSourceForField(fieldPath string) *corev1.EnvVarSource
func ValidateCertificateExpiration ¶ added in v0.5.0
func VolumeIsDefined ¶ added in v0.5.0
func VolumeMountIsDefined ¶ added in v0.6.0
func VolumeMountIsDefined(volumeMounts []corev1.VolumeMount, volumeMountNameToCheck string) bool
Types ¶
type AppLabels ¶ added in v0.6.0
func NewAppLabels ¶ added in v0.6.0
NewAppLabels abstracts labels that are specific to an application managed by the operator which have their own version separate from the operator version. Follows the recommended label pattern: https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels
func (*AppLabels) BuildLabels ¶ added in v0.6.0
BuildLabels creates labels that include oneagent or activegate mode and version
func (*AppLabels) BuildMatchLabels ¶ added in v0.6.0
BuildMatchLabels creates labels that don't change when switching oneagent or activegate mode
type ContainerBuilder ¶ added in v0.6.0
type CoreLabels ¶ added in v0.6.0
type CoreLabels struct { Version string // contains filtered or unexported fields }
func NewCoreLabels ¶ added in v0.6.0
func NewCoreLabels(dynakubeName, component string) *CoreLabels
NewCoreLabels abstracts labels that are used for core functionality in the operator which are not specific to an application's version Follows the recommended label pattern: https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels
func (*CoreLabels) BuildLabels ¶ added in v0.6.0
func (labels *CoreLabels) BuildLabels() map[string]string
BuildLabels creates labels that include operator version
func (*CoreLabels) BuildMatchLabels ¶ added in v0.6.0
BuildMatchLabels creates labels that don't change when switching operator versions
type DynakubeQuery ¶ added in v0.7.0
type DynakubeQuery struct {
// contains filtered or unexported fields
}
func NewDynakubeQuery ¶ added in v0.7.0
func NewDynakubeQuery(clt client.Client, namespace string) DynakubeQuery
func (DynakubeQuery) Proxy ¶ added in v0.7.0
func (query DynakubeQuery) Proxy(dynakube dynatracev1beta1.DynaKube) (string, error)
func (DynakubeQuery) TlsCert ¶ added in v0.7.0
func (query DynakubeQuery) TlsCert(dynakube dynatracev1beta1.DynaKube) (string, error)
func (DynakubeQuery) TrustedCAs ¶ added in v0.7.0
func (query DynakubeQuery) TrustedCAs(dynakube dynatracev1beta1.DynaKube) ([]byte, error)
func (DynakubeQuery) WithContext ¶ added in v0.7.0
func (query DynakubeQuery) WithContext(ctx context.Context) DynakubeQuery
type ProbeResult ¶ added in v0.5.0
type ProbeResult int
const ( ProbeObjectFound ProbeResult = iota ProbeObjectNotFound ProbeTypeFound ProbeTypeNotFound ProbeUnknown )
func KubernetesObjectProbe ¶ added in v0.5.0
func KubernetesObjectProbe(gvk schema.GroupVersionKind, namespace string, name string, config *rest.Config) (ProbeResult, error)
func MapErrorToObjectProbeResult ¶ added in v0.5.0
func MapErrorToObjectProbeResult(err error) (ProbeResult, error)
type SecretQuery ¶ added in v0.7.0
type SecretQuery struct {
// contains filtered or unexported fields
}
func NewSecretQuery ¶ added in v0.7.0
func (SecretQuery) Create ¶ added in v0.7.0
func (query SecretQuery) Create(secret corev1.Secret) error
func (SecretQuery) CreateOrUpdate ¶ added in v0.7.0
func (query SecretQuery) CreateOrUpdate(secret corev1.Secret) error