func (dk *DynaKubeStatus) SetPhaseOnError(err error) bool {
	if err != nil {
		return dk.SetPhase(Error)
	}
	return false
}
SetPhaseOnError fills the phase with the Error value in case of any error
package v1alpha1
import (
	corev1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
const (
	OperatorName = "dynatrace-operator"
)
type DynaKubeSpec struct {
	APIURL string `json:"apiUrl"`
	Tokens string `json:"tokens,omitempty"`
	CustomPullSecret string `json:"customPullSecret,omitempty"`
	SkipCertCheck bool `json:"skipCertCheck,omitempty"`
	Proxy *DynaKubeProxy `json:"proxy,omitempty"`
	TrustedCAs string `json:"trustedCAs,omitempty"`
	NetworkZone string `json:"networkZone,omitempty"`
	EnableIstio bool `json:"enableIstio,omitempty"`
	ActiveGate ActiveGateSpec `json:"activeGate,omitempty"`
	OneAgent OneAgentSpec `json:"oneAgent,omitempty"`
	ClassicFullStack FullStackSpec `json:"classicFullStack,omitempty"`
	RoutingSpec RoutingSpec `json:"routing,omitempty"`
	KubernetesMonitoringSpec KubernetesMonitoringSpec `json:"kubernetesMonitoring,omitempty"`
}
type ActiveGateSpec struct {
	Image string `json:"image,omitempty"`
	AutoUpdate *bool `json:"autoUpdate,omitempty"`
}
type OneAgentSpec struct {
	Version string `json:"version,omitempty"`
	Image string `json:"image,omitempty"`
	AutoUpdate *bool `json:"autoUpdate,omitempty"`
}
type FullStackSpec struct {
	Enabled bool `json:"enabled,omitempty"`
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
	WaitReadySeconds *uint16 `json:"waitReadySeconds,omitempty"`
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
	Args []string `json:"args,omitempty"`
	Env []corev1.EnvVar `json:"env,omitempty"`
	PriorityClassName string `json:"priorityClassName,omitempty"`
	DNSPolicy corev1.DNSPolicy `json:"dnsPolicy,omitempty"`
	ServiceAccountName string `json:"serviceAccountName,omitempty"`
	Labels map[string]string `json:"labels,omitempty"`
	UseUnprivilegedMode *bool `json:"useUnprivilegedMode,omitempty"`
	UseImmutableImage bool `json:"useImmutableImage,omitempty"`
}
type RoutingSpec struct {
	CapabilityProperties `json:",inline"`
}
type KubernetesMonitoringSpec struct {
	CapabilityProperties `json:",inline"`
}
type CapabilityProperties struct {
	Enabled bool `json:"enabled,omitempty"`
	Replicas *int32 `json:"replicas,omitempty"`
	Group string `json:"group,omitempty"`
	CustomProperties *DynaKubeValueSource `json:"customProperties,omitempty"`
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
	Labels map[string]string `json:"labels,omitempty"`
	Args []string `json:"args,omitempty"`
	Env []corev1.EnvVar `json:"env,omitempty"`
	ServiceAccountName string `json:"serviceAccountName,omitempty"`
}
type DynaKubeValueSource struct {
	Value string `json:"value,omitempty"`
	ValueFrom string `json:"valueFrom,omitempty"`
}
type DynaKubeProxy struct {
	Value     string `json:"value,omitempty"`
	ValueFrom string `json:"valueFrom,omitempty"`
}
type DynaKubeStatus struct {
	Phase DynaKubePhaseType `json:"phase,omitempty"`
	UpdatedTimestamp metav1.Time `json:"updatedTimestamp,omitempty"`
	LastAPITokenProbeTimestamp *metav1.Time `json:"lastAPITokenProbeTimestamp,omitempty"`
	LastPaaSTokenProbeTimestamp *metav1.Time `json:"lastPaaSTokenProbeTimestamp,omitempty"`
	Tokens string `json:"tokens,omitempty"`
	LastClusterVersionProbeTimestamp *metav1.Time `json:"lastClusterVersionProbeTimestamp,omitempty"`
	EnvironmentID string `json:"environmentID,omitempty"`
	Conditions []metav1.Condition `json:"conditions,omitempty"`
	ActiveGate ActiveGateStatus `json:"activeGate,omitempty"`
	OneAgent OneAgentStatus `json:"oneAgent,omitempty"`
}
type ImageStatus struct {
	ImageHash string `json:"imageHash,omitempty"`
	ImageVersion string `json:"imageVersion,omitempty"`
	LastImageProbeTimestamp *metav1.Time `json:"lastImageProbeTimestamp,omitempty"`
}
type ActiveGateStatus struct {
	ImageStatus `json:",inline"`
}
type OneAgentStatus struct {
	ImageStatus `json:",inline"`
	UseImmutableImage bool `json:"useImmutableImage,omitempty"`
	Version string `json:"version,omitempty"`
	Instances map[string]OneAgentInstance `json:"instances,omitempty"`
	LastUpdateProbeTimestamp *metav1.Time `json:"lastUpdateProbeTimestamp,omitempty"`
}
type OneAgentInstance struct {
	PodName   string `json:"podName,omitempty"`
	Version   string `json:"version,omitempty"`
	IPAddress string `json:"ipAddress,omitempty"`
}
type DynaKubePhaseType string
const (
	Running   DynaKubePhaseType = "Running"
	Deploying DynaKubePhaseType = "Deploying"
	Error     DynaKubePhaseType = "Error"
)
func (dk *DynaKubeStatus) SetPhase(phase DynaKubePhaseType) bool {
	upd := phase != dk.Phase
	dk.Phase = phase
	return upd
}