Documentation ¶
Index ¶
- Constants
- func BuildDynatraceClient(rtc client.Client, instance dynatracev1alpha1.BaseOneAgent, ...) (dtclient.Client, error)
- func BuildOneAgentAPMImage(apiURL string, flavor string, technologies string, agentVersion string) (string, error)
- func BuildOneAgentImage(apiURL string, agentVersion string) (string, error)
- func CreateOrUpdateSecretIfNotExists(c client.Client, r client.Reader, secretName string, targetNS string, ...) error
- func GeneratePullSecretData(c client.Client, oa dynatracev1alpha1.BaseOneAgent, tkns *corev1.Secret) (map[string][]byte, error)
- func GetDeployment(c client.Client, ns string) (*appsv1.Deployment, error)
- func GetField(values map[string]string, key, defaultValue string) string
- func GetImageRegistryFromAPIURL(apiURL string) (string, error)
- func GetTokensName(obj dynatracev1alpha1.BaseOneAgent) string
- func MakeSystemContext(dockerReference reference.Named, dockerConfig *DockerConfig) *types.SystemContext
- func SetUseImmutableImageStatus(instance dynatracev1alpha1.BaseOneAgent) bool
- type DockerConfig
- type DynatraceClientFunc
- type DynatraceClientReconciler
- type ImageVersion
- type ImageVersionProvider
Constants ¶
const ( DynatracePaasToken = "paasToken" DynatraceApiToken = "apiToken" )
const VersionLabel = "com.dynatrace.build-version"
VersionLabel is the name of the label used on ActiveGate-provided images.
Variables ¶
This section is empty.
Functions ¶
func BuildDynatraceClient ¶
func BuildDynatraceClient(rtc client.Client, instance dynatracev1alpha1.BaseOneAgent, hasAPIToken, hasPaaSToken bool) (dtclient.Client, error)
BuildDynatraceClient creates a new Dynatrace client using the settings configured on the given instance.
func BuildOneAgentAPMImage ¶
func BuildOneAgentAPMImage(apiURL string, flavor string, technologies string, agentVersion string) (string, error)
BuildOneAgentAPMImage builds the docker image for the agentapm based on the api url If annotations are set (flavor or technologies) they get appended
func BuildOneAgentImage ¶
func CreateOrUpdateSecretIfNotExists ¶
func CreateOrUpdateSecretIfNotExists(c client.Client, r client.Reader, secretName string, targetNS string, data map[string][]byte, secretType corev1.SecretType, log logr.Logger) error
CreateOrUpdateSecretIfNotExists creates a secret in case it does not exist or updates it if there are changes
func GeneratePullSecretData ¶
func GeneratePullSecretData(c client.Client, oa dynatracev1alpha1.BaseOneAgent, tkns *corev1.Secret) (map[string][]byte, error)
GeneratePullSecretData generates the secret data for the PullSecret
func GetDeployment ¶
GetDeployment returns the Deployment object who is the owner of this pod.
func GetTokensName ¶
func GetTokensName(obj dynatracev1alpha1.BaseOneAgent) string
func MakeSystemContext ¶
func MakeSystemContext(dockerReference reference.Named, dockerConfig *DockerConfig) *types.SystemContext
MakeSystemContext returns a SystemConfig for the given image and Dockerconfig.
func SetUseImmutableImageStatus ¶
func SetUseImmutableImageStatus(instance dynatracev1alpha1.BaseOneAgent) bool
SetUseImmutableImageStatus updates the status' UseImmutableImage field to indicate whether the Operator should use immutable images or not.
Types ¶
type DockerConfig ¶
func NewDockerConfig ¶
func NewDockerConfig(secret *corev1.Secret) (*DockerConfig, error)
type DynatraceClientFunc ¶
type DynatraceClientFunc func(rtc client.Client, instance dynatracev1alpha1.BaseOneAgent, hasAPIToken, hasPaaSToken bool) (dtclient.Client, error)
DynatraceClientFunc defines handler func for dynatrace client
func StaticDynatraceClient ¶
func StaticDynatraceClient(c dtclient.Client) DynatraceClientFunc
StaticDynatraceClient creates a DynatraceClientFunc always returning c.
type DynatraceClientReconciler ¶
type DynatraceClientReconciler struct { Client client.Client DynatraceClientFunc DynatraceClientFunc Now metav1.Time UpdatePaaSToken bool UpdateAPIToken bool }
func (*DynatraceClientReconciler) Reconcile ¶
func (r *DynatraceClientReconciler) Reconcile(ctx context.Context, instance dynatracev1alpha1.BaseOneAgent) (dtclient.Client, bool, error)
type ImageVersion ¶
ImageVersion includes information for a given image. Version can be empty if the corresponding label isn't set.
func GetImageVersion ¶
func GetImageVersion(imageName string, dockerConfig *DockerConfig) (ImageVersion, error)
GetImageVersion fetches image information for imageName
type ImageVersionProvider ¶
type ImageVersionProvider func(img string, dockerConfig *DockerConfig) (ImageVersion, error)
ImageVersionProvider can fetch image information from img