business

package
v1.24.4 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2020 License: Apache-2.0 Imports: 50 Imported by: 56

Documentation

Index

Constants

View Source
const (
	Healthy   string = "Healthy"
	Unhealthy string = "Unhealthy"
	NotFound  string = "NotFound"
)
View Source
const (
	MTLSEnabled          = "MTLS_ENABLED"
	MTLSPartiallyEnabled = "MTLS_PARTIALLY_ENABLED"
	MTLSNotEnabled       = "MTLS_NOT_ENABLED"
	MTLSDisabled         = "MTLS_DISABLED"
)
View Source
const (
	OpenIdNonceCookieName = config.TokenCookieName + "-openid-nonce"
)

Variables

This section is empty.

Functions

func BuildOpenIdJwtClaims added in v1.24.0

func BuildOpenIdJwtClaims(openIdParams *OpenIdCallbackParams) *config.IanaClaims

func CallbackCleanup added in v1.24.0

func CallbackCleanup(w http.ResponseWriter)

func CheckOpenIdAuthorizationCodeFlowParams added in v1.24.0

func CheckOpenIdAuthorizationCodeFlowParams(params *OpenIdCallbackParams) string

func CheckOpenIdImplicitFlowParams added in v1.24.0

func CheckOpenIdImplicitFlowParams(params *OpenIdCallbackParams) string

func DashboardsConfig added in v1.1.0

func DashboardsConfig() (kconf.Config, klog.LogAdapter, bool)

func FakeDepSyncedWithRS

func FakeDepSyncedWithRS() []apps_v1.Deployment

func FakeDeploymentConfigs

func FakeDeploymentConfigs() []osapps_v1.DeploymentConfig

func FakeDeployments

func FakeDeployments() []apps_v1.Deployment

func FakeDuplicatedDeployments added in v0.9.1

func FakeDuplicatedDeployments() []apps_v1.Deployment

func FakeDuplicatedReplicaSets added in v0.9.1

func FakeDuplicatedReplicaSets() []apps_v1.ReplicaSet

func FakeDuplicatedStatefulSets added in v0.9.1

func FakeDuplicatedStatefulSets() []apps_v1.StatefulSet

func FakePodLogsSyncedWithDeployments added in v0.18.0

func FakePodLogsSyncedWithDeployments() *kubernetes.PodLogs

func FakePodSyncedWithDeployments added in v0.18.0

func FakePodSyncedWithDeployments() *core_v1.Pod

func FakePodsFromDaemonSet

func FakePodsFromDaemonSet() []core_v1.Pod

func FakePodsNoController

func FakePodsNoController() []core_v1.Pod

func FakePodsSyncedWithDeployments

func FakePodsSyncedWithDeployments() []core_v1.Pod

func FakePodsSyncedWithDuplicated added in v0.9.1

func FakePodsSyncedWithDuplicated() []core_v1.Pod

func FakeRSSyncedWithPods

func FakeRSSyncedWithPods() []apps_v1.ReplicaSet

func FakeReplicaSets

func FakeReplicaSets() []apps_v1.ReplicaSet

func FakeReplicationControllers

func FakeReplicationControllers() []core_v1.ReplicationController

func FakeServices

func FakeServices() []core_v1.Service

func FakeStatefulSets

func FakeStatefulSets() []apps_v1.StatefulSet

func GetConfiguredOpenIdScopes added in v1.19.0

func GetConfiguredOpenIdScopes() []string

GetConfiguredOpenIdScopes gets the list of scopes set in Kiali configuration making sure that the mandatory "openid" scope is present in the returned list.

func GetDeploymentStatus added in v1.18.0

func GetDeploymentStatus(d apps_v1.Deployment) string

func GetIstioAPI added in v0.9.1

func GetIstioAPI(resourceType string) string

GetIstioAPI provides the Kubernetes API that manages this Istio resource type or empty string if it's not managed

func GetOpenIdAesSession added in v1.24.0

func GetOpenIdAesSession(r *http.Request) (*config.IanaClaims, error)

func IsAccessibleError added in v1.10.0

func IsAccessibleError(err error) bool

func IsNamespaceCached added in v1.23.0

func IsNamespaceCached(namespace string) bool

func IsOpenIdCodeFlowPossible added in v1.24.0

func IsOpenIdCodeFlowPossible() bool

func IsResourceCached added in v1.23.0

func IsResourceCached(namespace string, resource string) bool

func ParseOpenIdToken added in v1.24.0

func ParseOpenIdToken(openIdParams *OpenIdCallbackParams) error

func RequestOpenIdToken added in v1.24.0

func RequestOpenIdToken(openIdParams *OpenIdCallbackParams, redirect_uri string) error

func SetWithBackends

func SetWithBackends(cf kubernetes.ClientFactory, prom prometheus.ClientInterface)

SetWithBackends allows for specifying the ClientFactory and Prometheus clients to be used. Mock friendly. Used only with tests.

func Stop added in v1.9.0

func Stop()

func ValidateOpenIdNonceCode added in v1.24.0

func ValidateOpenIdNonceCode(openIdParams *OpenIdCallbackParams) (validationFailure string)

func ValidateOpenIdState added in v1.24.0

func ValidateOpenIdState(openIdParams *OpenIdCallbackParams) (validationFailure string)

- CSRF mitigation

func VerifyOpenIdUserAccess added in v1.24.0

func VerifyOpenIdUserAccess(token string) (int, string, error)

Types

type AccessibleNamespaceError added in v1.10.0

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

func (*AccessibleNamespaceError) Error added in v1.10.0

func (in *AccessibleNamespaceError) Error() string

type AppService

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

AppService deals with fetching Workloads group by "app" label, which will be identified as an "application"

func (*AppService) GetApp

func (in *AppService) GetApp(namespace string, appName string) (models.App, error)

GetApp is the API handler to fetch the details for a given namespace and app name

func (*AppService) GetAppList

func (in *AppService) GetAppList(namespace string) (models.AppList, error)

GetAppList is the API handler to fetch the list of applications in a given namespace

type ComponentStatus added in v1.18.0

type ComponentStatus struct {
	// The app label value of the Istio component
	//
	// example: istio-ingressgateway
	// required: true
	Name string `json:"name"`

	// The status of a Istio component
	//
	// example:  Not Found
	// required: true
	Status string `json:"status"`

	// When true, the component is necessary for Istio to function. Otherwise, it is an addon
	//
	// example:  true
	// required: true
	IsCore bool `json:"is_core"`
}

type DashboardsService added in v0.12.0

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

DashboardsService deals with fetching dashboards from k8s client

func NewDashboardsService added in v0.12.0

func NewDashboardsService(prom prometheus.ClientInterface) DashboardsService

NewDashboardsService initializes this business service

func (*DashboardsService) GetCustomDashboardRefs added in v0.17.0

func (in *DashboardsService) GetCustomDashboardRefs(namespace, app, version string, pods []*models.Pod) []kmodel.Runtime

GetCustomDashboardRefs finds all dashboard IDs and Titles associated to this app and add them to the model

func (*DashboardsService) GetIstioDashboard added in v0.12.0

GetIstioDashboard returns Istio dashboard (currently hard-coded) filled-in with metrics

type HealthService

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

HealthService deals with fetching health from various sources and convert to kiali model

func (*HealthService) GetAppHealth

func (in *HealthService) GetAppHealth(namespace, app, rateInterval string, queryTime time.Time) (models.AppHealth, error)

GetAppHealth returns an app health from just Namespace and app name (thus, it fetches data from K8S and Prometheus)

func (*HealthService) GetNamespaceAppHealth

func (in *HealthService) GetNamespaceAppHealth(namespace, rateInterval string, queryTime time.Time) (models.NamespaceAppHealth, error)

GetNamespaceAppHealth returns a health for all apps in given Namespace (thus, it fetches data from K8S and Prometheus)

func (*HealthService) GetNamespaceServiceHealth

func (in *HealthService) GetNamespaceServiceHealth(namespace, rateInterval string, queryTime time.Time) (models.NamespaceServiceHealth, error)

GetNamespaceServiceHealth returns a health for all services in given Namespace (thus, it fetches data from K8S and Prometheus)

func (*HealthService) GetNamespaceWorkloadHealth

func (in *HealthService) GetNamespaceWorkloadHealth(namespace, rateInterval string, queryTime time.Time) (models.NamespaceWorkloadHealth, error)

GetNamespaceWorkloadHealth returns a health for all workloads in given Namespace (thus, it fetches data from K8S and Prometheus)

func (*HealthService) GetServiceHealth

func (in *HealthService) GetServiceHealth(namespace, service, rateInterval string, queryTime time.Time) (models.ServiceHealth, error)

GetServiceHealth returns a service health (service request error rate)

func (*HealthService) GetWorkloadHealth

func (in *HealthService) GetWorkloadHealth(namespace, workload, workloadType, rateInterval string, queryTime time.Time) (models.WorkloadHealth, error)

GetWorkloadHealth returns a workload health from just Namespace and workload (thus, it fetches data from K8S and Prometheus)

type IstioComponentStatus added in v1.18.0

type IstioComponentStatus []ComponentStatus

type IstioConfigCriteria

type IstioConfigCriteria struct {
	Namespace                     string
	IncludeGateways               bool
	IncludeVirtualServices        bool
	IncludeDestinationRules       bool
	IncludeServiceEntries         bool
	IncludeRules                  bool
	IncludeAdapters               bool
	IncludeTemplates              bool
	IncludeHandlers               bool
	IncludeInstances              bool
	IncludeQuotaSpecs             bool
	IncludeQuotaSpecBindings      bool
	IncludePolicies               bool
	IncludeMeshPolicies           bool
	IncludeClusterRbacConfigs     bool
	IncludeRbacConfigs            bool
	IncludeServiceRoles           bool
	IncludeServiceRoleBindings    bool
	IncludeSidecars               bool
	IncludeAuthorizationPolicies  bool
	IncludePeerAuthentications    bool
	IncludeWorkloadEntries        bool
	IncludeRequestAuthentications bool
	IncludeEnvoyFilters           bool
	IncludeAttributeManifests     bool
	IncludeHttpApiSpecBindings    bool
	IncludeHttpApiSpecs           bool
	LabelSelector                 string
	WorkloadSelector              string
}

func ParseIstioConfigCriteria added in v1.20.0

func ParseIstioConfigCriteria(namespace, objects, labelSelector, workloadSelector string) IstioConfigCriteria

func (IstioConfigCriteria) Include added in v1.24.0

func (icc IstioConfigCriteria) Include(resource string) bool

type IstioConfigService

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

func (*IstioConfigService) CreateIstioConfigDetail added in v0.14.0

func (in *IstioConfigService) CreateIstioConfigDetail(api, namespace, resourceType string, body []byte) (models.IstioConfigDetails, error)

func (*IstioConfigService) DeleteIstioConfigDetail added in v0.9.1

func (in *IstioConfigService) DeleteIstioConfigDetail(api, namespace, resourceType, name string) (err error)

DeleteIstioConfigDetail deletes the given Istio resource

func (*IstioConfigService) GeIstioConfigPermissions added in v1.13.0

func (in *IstioConfigService) GeIstioConfigPermissions(namespaces []string) models.IstioConfigPermissions

func (*IstioConfigService) GetIstioConfigDetails

func (in *IstioConfigService) GetIstioConfigDetails(namespace, objectType, object string) (models.IstioConfigDetails, error)

GetIstioConfigDetails returns a specific Istio configuration object. It uses following parameters: - "namespace": namespace where configuration is stored - "objectType": type of the configuration - "object": name of the configuration

func (*IstioConfigService) GetIstioConfigList added in v0.9.1

func (in *IstioConfigService) GetIstioConfigList(criteria IstioConfigCriteria) (models.IstioConfigList, error)

GetIstioConfigList returns a list of Istio routing objects, Mixer Rules, (etc.) per a given Namespace.

func (*IstioConfigService) ParseJsonForCreate added in v0.14.0

func (in *IstioConfigService) ParseJsonForCreate(resourceType string, body []byte) (string, error)

ParseJsonForCreate checks if a json is well formed according resourceType It returns a json validated to be used in the Create operation, or an error to report in the handler layer.

func (*IstioConfigService) UpdateIstioConfigDetail added in v0.12.0

func (in *IstioConfigService) UpdateIstioConfigDetail(api, namespace, resourceType, name, jsonPatch string) (models.IstioConfigDetails, error)

type IstioStatusService added in v1.18.0

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

SvcService deals with fetching istio/kubernetes services related content and convert to kiali model

func (*IstioStatusService) GetStatus added in v1.18.0

func (iss *IstioStatusService) GetStatus() (IstioComponentStatus, error)

type IstioValidationsService

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

func (*IstioValidationsService) GetIstioObjectValidations

func (in *IstioValidationsService) GetIstioObjectValidations(namespace string, objectType string, object string) (models.IstioValidations, error)

func (*IstioValidationsService) GetValidations added in v0.14.0

func (in *IstioValidationsService) GetValidations(namespace, service string) (models.IstioValidations, error)

GetValidations returns an IstioValidations object with all the checks found when running all the enabled checkers. If service is "" then the whole namespace is validated.

type Iter8Service added in v1.15.0

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

func (*Iter8Service) CreateIter8Experiment added in v1.15.0

func (in *Iter8Service) CreateIter8Experiment(namespace string, body []byte, jsonBody bool) (models.Iter8ExperimentDetail, error)

func (*Iter8Service) DeleteIter8Experiment added in v1.16.0

func (in *Iter8Service) DeleteIter8Experiment(namespace string, name string) (err error)

func (*Iter8Service) GetAnalyticPort added in v1.18.1

func (in *Iter8Service) GetAnalyticPort() int

func (*Iter8Service) GetIter8Experiment added in v1.15.0

func (in *Iter8Service) GetIter8Experiment(namespace string, name string) (models.Iter8ExperimentDetail, error)

func (*Iter8Service) GetIter8ExperimentYaml added in v1.24.0

func (in *Iter8Service) GetIter8ExperimentYaml(namespace string, name string) (kubernetes.Iter8ExperimentCRD, error)

func (*Iter8Service) GetIter8Experiments added in v1.15.0

func (in *Iter8Service) GetIter8Experiments(namespaces []string) ([]models.Iter8ExperimentItem, error)

func (*Iter8Service) GetIter8ExperimentsByNamespace added in v1.15.0

func (in *Iter8Service) GetIter8ExperimentsByNamespace(namespace string) ([]models.Iter8ExperimentItem, error)

func (*Iter8Service) GetIter8Info added in v1.15.0

func (in *Iter8Service) GetIter8Info() models.Iter8Info

func (*Iter8Service) GetIter8Metrics added in v1.18.1

func (in *Iter8Service) GetIter8Metrics() (metricNames []string, err error)

func (*Iter8Service) ParseJsonForCreate added in v1.15.0

func (in *Iter8Service) ParseJsonForCreate(body []byte) (string, error)

func (*Iter8Service) UpdateIter8Experiment added in v1.20.0

func (in *Iter8Service) UpdateIter8Experiment(namespace string, name string, body []byte) (models.Iter8ExperimentDetail, error)

type JaegerLoader added in v1.11.0

type JaegerLoader = func() (jaeger.ClientInterface, error)

type JaegerService added in v1.11.0

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

func (*JaegerService) GetAppSpans added in v1.24.0

func (in *JaegerService) GetAppSpans(ns, app string, query models.TracingQuery) ([]jaeger.JaegerSpan, error)

func (*JaegerService) GetAppTraces added in v1.24.0

func (in *JaegerService) GetAppTraces(ns, app string, query models.TracingQuery) (*jaeger.JaegerResponse, error)

func (*JaegerService) GetErrorTraces added in v1.11.0

func (in *JaegerService) GetErrorTraces(ns, app string, duration time.Duration) (errorTraces int, err error)

func (*JaegerService) GetJaegerTraceDetail added in v1.11.0

func (in *JaegerService) GetJaegerTraceDetail(traceID string) (trace *jaeger.JaegerSingleTrace, err error)

func (*JaegerService) GetServiceSpans added in v1.24.0

func (in *JaegerService) GetServiceSpans(ns, service string, query models.TracingQuery) ([]jaeger.JaegerSpan, error)

func (*JaegerService) GetServiceTraces added in v1.24.0

func (in *JaegerService) GetServiceTraces(ns, service string, query models.TracingQuery) (*jaeger.JaegerResponse, error)

func (*JaegerService) GetWorkloadSpans added in v1.24.0

func (in *JaegerService) GetWorkloadSpans(ns, workload string, query models.TracingQuery) ([]jaeger.JaegerSpan, error)

func (*JaegerService) GetWorkloadTraces added in v1.24.0

func (in *JaegerService) GetWorkloadTraces(ns, workload string, query models.TracingQuery) (*jaeger.JaegerResponse, error)

type Layer

type Layer struct {
	Svc         SvcService
	Health      HealthService
	Validations IstioValidationsService
	IstioConfig IstioConfigService
	Workload    WorkloadService
	App         AppService
	Namespace   NamespaceService
	Jaeger      JaegerService

	OpenshiftOAuth OpenshiftOAuthService
	TLS            TLSService
	Iter8          Iter8Service
	IstioStatus    IstioStatusService
	// contains filtered or unexported fields
}

Layer is a container for fast access to inner services

func Get

func Get(token string) (*Layer, error)

Get the business.Layer

func NewWithBackends added in v0.10.0

func NewWithBackends(k8s kubernetes.ClientInterface, prom prometheus.ClientInterface, jaegerClient JaegerLoader) *Layer

NewWithBackends creates the business layer using the passed k8s and prom clients

type NamespaceService

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

Namespace deals with fetching k8s namespaces / OpenShift projects and convert to kiali model

func (*NamespaceService) GetNamespace added in v0.9.1

func (in *NamespaceService) GetNamespace(namespace string) (*models.Namespace, error)

GetNamespace returns the definition of the specified namespace.

func (*NamespaceService) GetNamespaces

func (in *NamespaceService) GetNamespaces() ([]models.Namespace, error)

Returns a list of the given namespaces / projects

func (*NamespaceService) UpdateNamespace added in v1.22.1

func (in *NamespaceService) UpdateNamespace(namespace string, jsonPatch string) (*models.Namespace, error)

type OAuthAuthorizationServer added in v0.16.0

type OAuthAuthorizationServer struct {
	AuthorizationEndpoint string `json:"authorization_endpoint"`
	Issuer                string `json:"issuer"`
}

Structure that's returned by the openshift oauth authorization server. It defaults to following the snake_case format, so we parse it to something more usable on our side.

type OAuthMetadata added in v0.16.0

type OAuthMetadata struct {
	AuthorizationEndpoint string `json:"authorizationEndpoint"`
	LogoutEndpoint        string `json:"logoutEndpoint"`
	LogoutRedirect        string `json:"logoutRedirect"`
}

type OAuthRoute added in v0.16.0

type OAuthRoute struct {
	Spec OAuthRouteSpec `json:"spec"`
}

type OAuthRouteSpec added in v0.16.0

type OAuthRouteSpec struct {
	Host string             `json:"host"`
	TLS  *OAuthRouteTLSSpec `json:"tls,omitempty"`
}

type OAuthRouteTLSSpec added in v0.16.0

type OAuthRouteTLSSpec struct {
	Termination string `json:"termination"`
}

type OAuthUser added in v0.16.0

type OAuthUser struct {
	Metadata OAuthUserMetadata `json:"metadata"`
}

type OAuthUserMetadata added in v0.16.0

type OAuthUserMetadata struct {
	Name string `json:"name"`
}

type ObjectChecker

type ObjectChecker interface {
	Check() models.IstioValidations
}

type OpenIdCallbackParams added in v1.24.0

type OpenIdCallbackParams struct {
	Code          string
	ExpiresOn     time.Time
	IdToken       string
	Nonce         string
	NonceHash     []byte
	ParsedIdToken *jwt.Token
	State         string
	Subject       string
}

func ExtractOpenIdCallbackParams added in v1.24.0

func ExtractOpenIdCallbackParams(r *http.Request) (params *OpenIdCallbackParams, err error)

type OpenIdMetadata added in v1.19.0

type OpenIdMetadata struct {
	// Taken from https://github.com/coreos/go-oidc/blob/8d771559cf6e5111c9b9159810d0e4538e7cdc82/oidc.go
	Issuer      string   `json:"issuer"`
	AuthURL     string   `json:"authorization_endpoint"`
	TokenURL    string   `json:"token_endpoint"`
	JWKSURL     string   `json:"jwks_uri"`
	UserInfoURL string   `json:"userinfo_endpoint"`
	Algorithms  []string `json:"id_token_signing_alg_values_supported"`

	// Some extra fields
	ScopesSupported        []string `json:"scopes_supported"`
	ResponseTypesSupported []string `json:"response_types_supported"`
}

func GetOpenIdMetadata added in v1.19.0

func GetOpenIdMetadata() (*OpenIdMetadata, error)

GetOpenIdMetadata fetches the OpenId metadata using the configured Issuer URI and downloading the metadata from the well-known path '/.well-known/openid-configuration'. Some validations are performed and the parsed metadata is returned. Since the metadata should be rare to change, the retrieved metadata is cached on first call and subsequent calls return the cached metadata.

type OpenshiftOAuthService added in v0.16.0

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

func (*OpenshiftOAuthService) GetUserInfo added in v0.16.0

func (in *OpenshiftOAuthService) GetUserInfo(token string) (*OAuthUser, error)

func (*OpenshiftOAuthService) Logout added in v0.20.0

func (in *OpenshiftOAuthService) Logout(token string) error

func (*OpenshiftOAuthService) Metadata added in v0.16.0

func (in *OpenshiftOAuthService) Metadata() (metadata *OAuthMetadata, err error)

type SpanFilter added in v1.24.0

type SpanFilter = func(span *jaegerModels.Span) bool

type SvcService

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

SvcService deals with fetching istio/kubernetes services related content and convert to kiali model

func (*SvcService) GetService

func (in *SvcService) GetService(namespace, service, interval string, queryTime time.Time) (*models.ServiceDetails, error)

GetService returns a single service and associated data using the interval and queryTime

func (*SvcService) GetServiceAppName added in v1.24.0

func (in *SvcService) GetServiceAppName(namespace, service string) (string, error)

GetServiceAppName returns the "Application" name (app label) that relates to a service This label is taken from the service selector, which means it is assumed that pods are selected using that label

func (*SvcService) GetServiceDefinition added in v0.11.0

func (in *SvcService) GetServiceDefinition(namespace, service string) (*models.ServiceDetails, error)

GetServiceDefinition returns a single service definition (the service object and endpoints), no istio or runtime information

func (*SvcService) GetServiceDefinitionList added in v1.5.0

func (in *SvcService) GetServiceDefinitionList(namespace string) (*models.ServiceDefinitionList, error)

GetServiceDefinitionList returns service definitions for the namespace (the service object only), no istio or runtime information

func (*SvcService) GetServiceList

func (in *SvcService) GetServiceList(namespace string) (*models.ServiceList, error)

GetServiceList returns a list of all services for a given Namespace

type TLSService added in v0.16.0

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

func (*TLSService) MeshWidemTLSStatus added in v0.16.0

func (in *TLSService) MeshWidemTLSStatus(namespaces []string) (models.MTLSStatus, error)

func (TLSService) NamespaceWidemTLSStatus added in v0.16.0

func (in TLSService) NamespaceWidemTLSStatus(namespace string) (models.MTLSStatus, error)

type WorkloadService

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

Workload deals with fetching istio/kubernetes workloads related content and convert to kiali model

func (*WorkloadService) GetPod added in v0.18.0

func (in *WorkloadService) GetPod(namespace, name string) (*models.Pod, error)

func (*WorkloadService) GetPodLogs added in v0.18.0

func (in *WorkloadService) GetPodLogs(namespace, name string, opts *core_v1.PodLogOptions) (*kubernetes.PodLogs, error)

func (*WorkloadService) GetPods

func (in *WorkloadService) GetPods(namespace string, labelSelector string) (models.Pods, error)

func (*WorkloadService) GetWorkload

func (in *WorkloadService) GetWorkload(namespace string, workloadName string, workloadType string, includeServices bool) (*models.Workload, error)

GetWorkload is the API handler to fetch details of a specific workload. If includeServices is set true, the Workload will fetch all services related

func (*WorkloadService) GetWorkloadAppName added in v1.24.0

func (in *WorkloadService) GetWorkloadAppName(namespace, workload string) (string, error)

GetWorkloadAppName returns the "Application" name (app label) that relates to a workload

func (*WorkloadService) GetWorkloadList

func (in *WorkloadService) GetWorkloadList(namespace string) (models.WorkloadList, error)

GetWorkloadList is the API handler to fetch the list of workloads in a given namespace.

func (*WorkloadService) UpdateWorkload added in v1.22.0

func (in *WorkloadService) UpdateWorkload(namespace string, workloadName string, workloadType string, includeServices bool, jsonPatch string) (*models.Workload, error)

Jump to

Keyboard shortcuts

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