reporting

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package reporting is responsible for generating migration reports.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AGCResources

type AGCResources struct {
	ApplicationLoadBalancer       *types.NamespacedName  `yaml:"applicationLoadBalancer,omitempty"`
	Gateway                       types.NamespacedName   `yaml:"gateway"`
	HTTPRoutes                    []types.NamespacedName `yaml:"httpRoutes"`
	ReferenceGrants               []types.NamespacedName `yaml:"referenceGrants,omitempty"`
	HealthCheckPolicies           []types.NamespacedName `yaml:"healthCheckPolicies"`
	RoutePolicies                 []types.NamespacedName `yaml:"routePolicies"`
	WebApplicationFirewalPolicies []types.NamespacedName `yaml:"webApplicationFirewallPolicies"`
	FrontendTLSPolicies           []types.NamespacedName `yaml:"frontendTLSPolicies"`
	BackendTLSPolicies            []types.NamespacedName `yaml:"backendTLSPolicies"`
}

type AGICResources

type AGICResources struct {
	Ingresses []Ingress `yaml:"ingresses"`
}

type AGICResourcesSource

type AGICResourcesSource string
const (
	// AGICResourcesSourceCluster indicates that the AGIC resources have been sourced from a Kubernetes cluster.
	AGICResourcesSourceCluster AGICResourcesSource = "cluster"

	// AGICResourcesSourceFiles indicates that the AGIC resources have been sourced from files on disk.
	AGICResourcesSourceFiles AGICResourcesSource = "files"
)

type AnnotationResult

type AnnotationResult struct {
	KeyValue string                    `yaml:"annotation"`
	Status   resources.MigrationStatus `yaml:"status"`
	Issues   []Issue                   `yaml:"issues,omitempty"`
}

type Annotations

type Annotations struct {
	Completed   []CompletedAnnotation `yaml:"completed,omitempty"`
	Warnings    []FailedAnnotation    `yaml:"warnings,omitempty"`
	Failed      []FailedAnnotation    `yaml:"failed,omitempty"`
	Unsupported []FailedAnnotation    `yaml:"unsupported,omitempty"`
}

type AppGWRewrites

type AppGWRewrites struct {
	types.NamespacedName `yaml:",inline"`
	Result               resources.MigrationStatus `yaml:"result"`
	Issues               []Issue                   `yaml:"issues,omitempty"`
}

type CompletedAnnotation

type CompletedAnnotation struct {
	KeyValue string `yaml:"annotation"`
}

type FailedAnnotation

type FailedAnnotation struct {
	KeyValue string  `yaml:"annotation"`
	Issues   []Issue `yaml:"issues,omitempty"`
}

type Ingress

type Ingress struct {
	types.NamespacedName     `yaml:",inline"`
	MigratedIngressResources struct {
		HTTPRoutes      []types.NamespacedName `yaml:"httpRoutes"` // List of HTTPRoutes created from this Ingress
		ReferenceGrants []types.NamespacedName `yaml:"referenceGrants,omitempty"`

		// We will want to consciously decide what to include in the report, these may not make sense
		// e.g. we might only want to return a count
		HealthCheckPolicies           []Policy `yaml:"healthCheckPolicies,omitempty"`
		RoutePolicies                 []Policy `yaml:"routePolicies,omitempty"`
		WebApplicationFirewalPolicies []Policy `yaml:"webApplicationFirewallPolicies,omitempty"`
		FrontendTLSPolicies           []Policy `yaml:"frontendTLSPolicies,omitempty"`
		BackendTLSPolicies            []Policy `yaml:"backendTLSPolicies,omitempty"`
	} `yaml:"migratedResources"`
	Annotations Annotations               `yaml:"annotations"`
	Result      resources.MigrationStatus `yaml:"-"`
}

type Issue

type Issue struct {
	ImpactedResources []string `yaml:"impactedResources,omitempty"`
	Description       string   `yaml:"description"`
	Recommendation    string   `yaml:"recommendation,omitempty"`
	Message           string   `yaml:"message,omitempty"`
}

type Metadata

type Metadata struct {
	GeneratedAt         time.Time `yaml:"generatedAt"`
	ToolVersion         string    `yaml:"toolVersion"`
	AGICResourcesSource `yaml:"agicResourcesSource"`
	AGCBYOResourceID    string `yaml:"agcByoResourceID,omitempty"`
	ManagedSubnetID     string `yaml:"managedSubnetID,omitempty"`
}

func NewMetadata

func NewMetadata(source AGICResourcesSource, opts conversion.Options) Metadata

type MigrationReport

type MigrationReport struct {
	Metadata      `yaml:"metadata"`
	AGICResources AGICResources `yaml:"inputAGICResources"`
	AGCResources  AGCResources  `yaml:"outputAGCResourceSummary"`
}

func NewReport

func NewReport(
	agicResources resources.AGICResources,
	agcResources resources.AGCResourceGraph,
	source AGICResourcesSource,
	opts conversion.Options,
) (MigrationReport, error)

NewReport returns a new MigrationReport

func NewReportFromYAML

func NewReportFromYAML(reportStr string) (MigrationReport, error)

type Policy

type Policy struct {
	types.NamespacedName `yaml:",inline"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL