Help us shape the future of Go! Take the 2026 Go Developer Survey

application

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: Apache-2.0 Imports: 49 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EphemeralContainerConfig

type EphemeralContainerConfig struct {
	EphemeralServerVersionRegex string `` /* 182-byte string literal not displayed */
}

type K8sApplicationService

type K8sApplicationService interface {
	ValidatePodLogsRequestQuery(r *http.Request) (*bean4.ResourceRequestBean, error)
	ValidateTerminalRequestQuery(r *http.Request) (*terminal.TerminalSessionRequest, *bean4.ResourceRequestBean, error)
	DecodeDevtronAppId(applicationId string) (*bean3.DevtronAppIdentifier, error)
	GetPodLogs(ctx context.Context, request *bean4.ResourceRequestBean) (io.ReadCloser, error)
	ValidateResourceRequest(ctx context.Context, appIdentifier *bean.AppIdentifier, request *k8s2.K8sRequestBean) error
	ValidateClusterResourceRequest(ctx context.Context, clusterResourceRequest *bean4.ResourceRequestBean,
		rbacCallback func(clusterName string, resourceIdentifier k8s2.ResourceIdentifier) bool) (bool, error)
	ValidateClusterResourceBean(ctx context.Context, clusterId int, manifest unstructured.Unstructured, gvk schema.GroupVersionKind, rbacCallback func(clusterName string, resourceIdentifier k8s2.ResourceIdentifier) bool) bool
	GetResourceInfo(ctx context.Context) (*bean3.ResourceInfo, error)
	GetAllApiResourceGVKWithoutAuthorization(ctx context.Context, clusterId int) (*k8s2.GetAllApiResourcesResponse, error)
	GetAllApiResources(ctx context.Context, clusterId int, isSuperAdmin bool, userId int32) (*k8s2.GetAllApiResourcesResponse, error)
	GetResourceList(ctx context.Context, token string, request *bean4.ResourceRequestBean, validateResourceAccess func(token string, clusterName string, request bean4.ResourceRequestBean, casbinAction string) bool) (*k8s2.ClusterResourceListMap, error)
	GetResourceListWithRestConfig(ctx context.Context, token string, request *bean4.ResourceRequestBean, validateResourceAccess func(token string, clusterName string, request bean4.ResourceRequestBean, casbinAction string) bool,
		restConfig *rest.Config, clusterName string) (*k8s2.ClusterResourceListMap, error)
	ApplyResources(ctx context.Context, token string, request *k8s2.ApplyResourcesRequest, resourceRbacHandler func(token string, clusterName string, request bean4.ResourceRequestBean, casbinAction string) bool) ([]*k8s2.ApplyResourcesResponse, error)
	CreatePodEphemeralContainers(req *bean5.EphemeralContainerRequest) error
	TerminatePodEphemeralContainer(req bean5.EphemeralContainerRequest) (bool, error)
	GetPodContainersList(clusterId int, namespace, podName string) (*bean4.PodContainerList, error)
	GetPodListByLabel(clusterId int, namespace, label string) ([]corev1.Pod, error)
	RecreateResource(ctx context.Context, request *bean4.ResourceRequestBean) (*k8s2.ManifestResponse, error)
	DeleteResourceWithAudit(ctx context.Context, request *bean4.ResourceRequestBean, userId int32) (*k8s2.ManifestResponse, error)
	GetUrlsByBatchForIngress(ctx context.Context, resp []bean4.BatchResourceResponse) []interface{}
	ValidateFluxResourceRequest(ctx context.Context, appIdentifier *bean2.FluxAppIdentifier, request *k8s2.K8sRequestBean) (bool, error)
}

type K8sApplicationServiceImpl

type K8sApplicationServiceImpl struct {
	K8sUtil *k8s2.K8sServiceImpl

	K8sResourceHistoryService kubernetesResourceAuditLogs.K8sResourceHistoryService
	// contains filtered or unexported fields
}

func NewK8sApplicationServiceImpl

func NewK8sApplicationServiceImpl(Logger *zap.SugaredLogger, clusterService cluster.ClusterService, pump connector.Pump, helmAppService client.HelmAppService, K8sUtil *k8s2.K8sServiceImpl, aCDAuthConfig *util3.ACDAuthConfig, K8sResourceHistoryService kubernetesResourceAuditLogs.K8sResourceHistoryService,
	k8sCommonService k8s.K8sCommonService, terminalSession terminal.TerminalSessionHandler,
	ephemeralContainerService cluster.EphemeralContainerService,
	ephemeralContainerRepository repository.EphemeralContainersRepository,
	fluxApplicationService fluxApplication.FluxApplicationService,
	clusterReadService read.ClusterReadService) (*K8sApplicationServiceImpl, error)

func (*K8sApplicationServiceImpl) ApplyResources

func (impl *K8sApplicationServiceImpl) ApplyResources(ctx context.Context, token string, request *k8s2.ApplyResourcesRequest, validateResourceAccess func(token string, clusterName string, request bean4.ResourceRequestBean, casbinAction string) bool) ([]*k8s2.ApplyResourcesResponse, error)

func (*K8sApplicationServiceImpl) CreatePodEphemeralContainers

func (impl *K8sApplicationServiceImpl) CreatePodEphemeralContainers(req *bean5.EphemeralContainerRequest) error

func (*K8sApplicationServiceImpl) DecodeDevtronAppId

func (impl *K8sApplicationServiceImpl) DecodeDevtronAppId(applicationId string) (*bean3.DevtronAppIdentifier, error)

func (*K8sApplicationServiceImpl) DeleteResourceWithAudit

func (impl *K8sApplicationServiceImpl) DeleteResourceWithAudit(ctx context.Context, request *bean4.ResourceRequestBean, userId int32) (*k8s2.ManifestResponse, error)

func (*K8sApplicationServiceImpl) GetAllApiResourceGVKWithoutAuthorization added in v0.6.23

func (impl *K8sApplicationServiceImpl) GetAllApiResourceGVKWithoutAuthorization(ctx context.Context, clusterId int) (*k8s2.GetAllApiResourcesResponse, error)

GetAllApiResourceGVKWithoutAuthorization This function will the all the available api resource GVK list for specific cluster

func (*K8sApplicationServiceImpl) GetAllApiResources

func (impl *K8sApplicationServiceImpl) GetAllApiResources(ctx context.Context, clusterId int, isSuperAdmin bool, userId int32) (*k8s2.GetAllApiResourcesResponse, error)

func (*K8sApplicationServiceImpl) GetPodContainersList

func (impl *K8sApplicationServiceImpl) GetPodContainersList(clusterId int, namespace, podName string) (*bean4.PodContainerList, error)

func (*K8sApplicationServiceImpl) GetPodListByLabel

func (impl *K8sApplicationServiceImpl) GetPodListByLabel(clusterId int, namespace, label string) ([]corev1.Pod, error)

func (*K8sApplicationServiceImpl) GetPodLogs

func (*K8sApplicationServiceImpl) GetResourceInfo

func (impl *K8sApplicationServiceImpl) GetResourceInfo(ctx context.Context) (*bean3.ResourceInfo, error)

func (*K8sApplicationServiceImpl) GetResourceList

func (impl *K8sApplicationServiceImpl) GetResourceList(ctx context.Context, token string, request *bean4.ResourceRequestBean, validateResourceAccess func(token string, clusterName string, request bean4.ResourceRequestBean, casbinAction string) bool) (*k8s2.ClusterResourceListMap, error)

func (*K8sApplicationServiceImpl) GetResourceListWithRestConfig added in v0.7.3

func (impl *K8sApplicationServiceImpl) GetResourceListWithRestConfig(ctx context.Context, token string, request *bean4.ResourceRequestBean,
	validateResourceAccess func(token string, clusterName string, request bean4.ResourceRequestBean, casbinAction string) bool,
	restConfig *rest.Config, clusterName string) (*k8s2.ClusterResourceListMap, error)

func (*K8sApplicationServiceImpl) GetUrlsByBatchForIngress

func (impl *K8sApplicationServiceImpl) GetUrlsByBatchForIngress(ctx context.Context, resp []bean4.BatchResourceResponse) []interface{}

func (K8sApplicationServiceImpl) K8sServerVersionCheckForEphemeralContainers

func (impl K8sApplicationServiceImpl) K8sServerVersionCheckForEphemeralContainers(clientSet *kubernetes.Clientset) (bool, error)

func (*K8sApplicationServiceImpl) RecreateResource

func (*K8sApplicationServiceImpl) TerminatePodEphemeralContainer

func (impl *K8sApplicationServiceImpl) TerminatePodEphemeralContainer(req bean5.EphemeralContainerRequest) (bool, error)

func (*K8sApplicationServiceImpl) ValidateClusterResourceBean

func (impl *K8sApplicationServiceImpl) ValidateClusterResourceBean(ctx context.Context, clusterId int, manifest unstructured.Unstructured, gvk schema.GroupVersionKind, rbacCallback func(clusterName string, resourceIdentifier k8s2.ResourceIdentifier) bool) bool

func (*K8sApplicationServiceImpl) ValidateClusterResourceRequest

func (impl *K8sApplicationServiceImpl) ValidateClusterResourceRequest(ctx context.Context, clusterResourceRequest *bean4.ResourceRequestBean,
	rbacCallback func(clusterName string, resourceIdentifier k8s2.ResourceIdentifier) bool) (bool, error)

func (*K8sApplicationServiceImpl) ValidateFluxResourceRequest added in v0.7.2

func (impl *K8sApplicationServiceImpl) ValidateFluxResourceRequest(ctx context.Context, appIdentifier *bean2.FluxAppIdentifier, request *k8s2.K8sRequestBean) (bool, error)

func (*K8sApplicationServiceImpl) ValidatePodLogsRequestQuery

func (impl *K8sApplicationServiceImpl) ValidatePodLogsRequestQuery(r *http.Request) (*bean4.ResourceRequestBean, error)

func (*K8sApplicationServiceImpl) ValidateResourceRequest

func (impl *K8sApplicationServiceImpl) ValidateResourceRequest(ctx context.Context, appIdentifier *bean.AppIdentifier, request *k8s2.K8sRequestBean) error

func (*K8sApplicationServiceImpl) ValidateTerminalRequestQuery

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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