fluxService

package
v0.0.0-...-1859c74 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FluxKustomizationGroup     = "kustomize.toolkit.fluxcd.io"
	FluxAppKustomizationKind   = "Kustomization"
	FluxKustomizationVersionV1 = "v1"
	AllNamespaces              = ""
	FluxHelmReleaseGroup       = "helm.toolkit.fluxcd.io"
	FluxAppHelmreleaseKind     = "HelmRelease"
	FluxHelmReleaseVersionV2   = "v2"
	FluxLabel                  = "labels"
	KustomizeNameLabel         = "kustomize.toolkit.fluxcd.io/name"
	KustomizeNamespaceLabel    = "kustomize.toolkit.fluxcd.io/namespace"
)
View Source
const (
	StatusMissing              = "Missing"
	Reason                     = "StatusNotReady"
	ErrMessageForHelmRelease   = "Status is missing for this helmRelease"
	ErrMessageForKustomization = "Status is missing for this kustomization"
)
View Source
const (
	HelmReleaseFluxAppType FluxAppType = "HelmRelease"
	AppNameKey                         = "Name"
	StatusKey                          = "Status"
	ReadyKey                           = "Ready"
	ColumnNameKey                      = "name"
	NamespaceKey                       = "namespace"
	MetaDataField                      = "metadata"
	ObjectField                        = "object"
	SpecField                          = "spec"

	StorageNamespaceKey = "storageNamespace"
	ReleaseNameKey      = "releaseName"
	TargetNamespaceKey  = "targetNamespace"
)
View Source
const (
	STATUS    = "status"
	INVENTORY = "inventory"
	ENTRIES   = "entries"
	ID        = "id"
	VERSION   = "v"
)
View Source
const (
	FieldSeparator  = "_"
	ColonTranscoded = "__"
)

Variables

View Source
var GvkForHelmreleaseFluxApp = schema.GroupVersionKind{
	Group:   FluxHelmReleaseGroup,
	Kind:    FluxAppHelmreleaseKind,
	Version: FluxHelmReleaseVersionV2,
}

Functions

func GetFluxAppDetailDto

func GetFluxAppDetailDto(appDetail *FluxApplicationDto) *client.FluxApplication

GetFluxAppDetailDto converting the AppDetail in Grpc format

Types

type EnvironmentDetail

type EnvironmentDetail struct {
	ClusterId   int    `json:"clusterId"`
	ClusterName string `json:"clusterName"`
	Namespace   string `json:"namespace"`
}

type FluxAppDetailRequest

type FluxAppDetailRequest struct {
	Config      *client.ClusterConfig
	Name        string `json:"name"`
	Namespace   string `json:"namespace"`
	IsKustomize bool   `json:"isKustomize"`
}

type FluxAppStatusDetail

type FluxAppStatusDetail struct {
	Status  string
	Reason  string
	Message string
}

type FluxAppType

type FluxAppType string

type FluxApplicationDto

type FluxApplicationDto struct {
	Name                  string             `json:"appName"`
	HealthStatus          string             `json:"appStatus"`
	SyncStatus            string             `json:"syncStatus"`
	EnvironmentDetails    *EnvironmentDetail `json:"environmentDetail"`
	FluxAppDeploymentType FluxAppType        `json:"fluxAppDeploymentType"`
}

type FluxApplicationService

type FluxApplicationService interface {
	GetFluxApplicationListForCluster(config *client.ClusterConfig) *client.FluxApplicationList
	BuildFluxAppDetail(request *client.FluxAppDetailRequest) (*FluxKsAppDetail, error)
}

type FluxApplicationServiceImpl

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

func (*FluxApplicationServiceImpl) BuildFluxAppDetail

func (impl *FluxApplicationServiceImpl) BuildFluxAppDetail(request *client.FluxAppDetailRequest) (*FluxKsAppDetail, error)

BuildFluxAppDetail Build Flux App Detail

func (*FluxApplicationServiceImpl) GetApplicationListDtos

func (impl *FluxApplicationServiceImpl) GetApplicationListDtos(resources unstructured.UnstructuredList, clusterName string, clusterId int, FluxAppType FluxAppType) ([]*FluxApplicationDto, error)

GetApplicationListDtos fetching the list of filtered apps from resources for flux Apps i.e. combined the both Kustomization and flux type

func (*FluxApplicationServiceImpl) GetFluxApplicationListForCluster

func (impl *FluxApplicationServiceImpl) GetFluxApplicationListForCluster(config *client.ClusterConfig) *client.FluxApplicationList

GetFluxApplicationListForCluster Getting App list for the cluster

type FluxHr

type FluxHr struct {
	Name      string
	Namespace string
}

type FluxKsAppDetail

type FluxKsAppDetail struct {
	*FluxApplicationDto
	AppStatusDto *FluxAppStatusDetail
	TreeResponse []*bean.ResourceTreeResponse
}

type FluxKsResourceDetail

type FluxKsResourceDetail struct {
	Name      string
	Namespace string
	Group     string
	Version   string
	Kind      string
}

type ObjMetadata

type ObjMetadata struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
	Group     string `json:"group"`
	Kind      string `json:"kind"`
}

type ObjectMetadataCompact

type ObjectMetadataCompact struct {
	Id      string `json:"id"`
	Version string `json:"version"`
}

Jump to

Keyboard shortcuts

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