model

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClusterKind = "Cluster"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NamedVulnerabilityReport added in v0.5.0

type NamedVulnerabilityReport struct {
	Name   string
	Report v1alpha1.VulnerabilityReport
}

NamedVulnerabilityReport allows sorting VulnerabilityReports by container name.

type Repository

type Repository struct {
	// contains filtered or unexported fields
}

Repository defines methods for accessing Kubernetes object.

func NewRepository

func NewRepository(client service.Dashboard) *Repository

NewRepository constructs new Kubernetes objects repository with the specified Kubernetes client provided by Octant extensions API.

func (*Repository) GetCISKubeBenchReport

func (r *Repository) GetCISKubeBenchReport(ctx context.Context, node string) (report *v1alpha1.CISKubeBenchReport, err error)

func (*Repository) GetConfigAuditReportByOwner added in v0.9.1

func (r *Repository) GetConfigAuditReportByOwner(ctx context.Context, owner kube.Object) (*v1alpha1.ConfigAuditReport, error)

func (*Repository) GetControllerOf added in v0.5.0

func (r *Repository) GetControllerOf(ctx context.Context, controlee kube.Object) (*kube.Object, error)

GetControllerOf returns the controller Object for the specified controlee Object. Returns nil if there's no such controller.

func (*Repository) GetCustomResourceDefinitionByName added in v0.5.0

func (r *Repository) GetCustomResourceDefinitionByName(ctx context.Context, name string) (*apiextensionsv1.CustomResourceDefinition, error)

func (*Repository) GetKubeHunterReport

func (r *Repository) GetKubeHunterReport(ctx context.Context) (report *v1alpha1.KubeHunterReport, err error)

func (*Repository) GetReplicaSetForDeployment added in v0.5.0

func (r *Repository) GetReplicaSetForDeployment(ctx context.Context, object kube.Object) (*kube.Object, error)

GetReplicaSetForDeployment returns the active ReplicaSet Object for the specified Deployment Object.

func (*Repository) GetVulnerabilitiesSummary

func (r *Repository) GetVulnerabilitiesSummary(ctx context.Context, options kube.Object) (*v1alpha1.VulnerabilitySummary, error)

func (*Repository) GetVulnerabilityReportsByOwner added in v0.5.0

func (r *Repository) GetVulnerabilityReportsByOwner(ctx context.Context, owner kube.Object) ([]NamedVulnerabilityReport, error)

GetVulnerabilityReportsByOwner returns VulnerabilityReports owned by the specified Kubernetes object. The reports are named after container names so we can sort them and render in predictable order.

Note: If there are no VulnerabilityReports which are owned by the specified Deployment, this method does an extra attempt to lookup the VulnerabilityReports owned by its active ReplicaSet. Similarly if there are no VulnerabilityReports owned by the specified Pod it will lookup VulnerabilityReports owned by the Pod's controller.

Jump to

Keyboard shortcuts

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