Documentation ¶
Index ¶
Constants ¶
View Source
const AppVersionLabel = "app.kubernetes.io/version"
View Source
const RegisterAPIPathV2 = "v2/system/integrations/registration"
View Source
const Type = "k8s_inventory_agent"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channels ¶
type Channels struct { IntegrationObj chan *Integration HealthReportingEnabled chan bool InventoryReportingEnabled chan bool }
func GetChannels ¶
func GetChannels() Channels
type HealthStatus ¶
type HealthStatus struct { State string `json:"state,omitempty"` // state of the integration HEALTHY or UNHEALTHY Reason string `json:"reason,omitempty"` Details any `json:"details,omitempty"` }
HealthStatus reflects the state of the Integration wrt any errors encountered when performing its tasks
type Integration ¶
type Integration struct { UUID string `json:"uuid,omitempty"` // uuid provided to this integration instance during Type string `json:"type,omitempty"` // type of integration (e.g., 'anchore-k8s-agent') Name string `json:"name,omitempty"` // name of the integration instance (e.g., k8s-agent-admin') Description string `json:"description,omitempty"` // short description of integration instance Version string `json:"version,omitempty"` // version of the integration instance ReportedStatus *HealthStatus `json:"reported_status,omitempty"` // health status of the integration (Read-only) IntegrationStatus *LifeCycleStatus `json:"integration_status,omitempty"` // lifecycle status of the integration (Read-only) StartedAt jstime.Datetime `json:"started_at,omitempty"` // timestamp when integration instance was started in UTC().Format(time.RFC3339) LastSeen *jstime.Datetime `json:"last_seen,omitempty"` // timestamp of last received health report from integration instance (Read-only) Uptime *jstime.Duration `json:"uptime,omitempty"` // running time of integration instance Username string `json:"username,omitempty"` // user that the integration instance authenticates as during registration AccountName string `json:"account_name,omitempty"` // default account that the integration instance authenticates as during registration ExplicitlyAccountBound []string `json:"explicitly_account_bound,omitempty"` // accounts that the integration instance is explicitly configured to handle Accounts []string `json:"accounts,omitempty"` // names of accounts that the integration instance handled recently Namespaces []string `json:"namespaces,omitempty"` // namespaces that the integration instance handles Configuration map[string]interface{} `json:"configuration,omitempty"` // configuration for the integration instance ClusterName string `json:"cluster_name,omitempty"` // name of cluster where the integration instance runs Namespace string `json:"namespace,omitempty"` // uuid for namespace that the integration instance belongs to HealthReportInterval int `json:"health_report_interval,omitempty"` // time in seconds between health reports RegistrationID string `json:"registration_id,omitempty"` // uuid that integration used during registration RegistrationInstanceID string `json:"registration_instance_id,omitempty"` // instance id used by the integration during registration }
func PerformRegistration ¶
func PerformRegistration(appConfig *config.Application, ch Channels) (*Integration, error)
type LifeCycleStatus ¶
type LifeCycleStatus struct { State string `json:"state,omitempty"` // lifecycle state REGISTERED, ACTIVE, DEGRADED, DEACTIVATED Reason string `json:"reason,omitempty"` Details any `json:"details,omitempty"` UpdatedAt jstime.Datetime `json:"updated_at,omitempty"` }
LifeCycleStatus reflects the state of the Integration from the perspective of Enterprise
type Registration ¶
type Registration struct { RegistrationID string `json:"registration_id,omitempty"` // uyid that identifies integration during registration RegistrationInstanceID string `json:"registration_instance_id,omitempty"` // identifier that make integration instance unique among its replicas during registration Type string `json:"type,omitempty"` // type of integration (e.g., 'anchore-k8s-agent') Name string `json:"name,omitempty"` // name of the integration instance (e.g., k8s-agent-admin') Description string `json:"description,omitempty"` // short description of integration instance Version string `json:"version,omitempty"` // version of the integration instance StartedAt jstime.Datetime `json:"started_at,omitempty"` // timestamp when integration instance was started in UTC().Format(time.RFC3339) Uptime *jstime.Duration `json:"uptime,omitempty"` // running time of integration instance Username string `json:"username,omitempty"` // user that the integration instance authenticates as during registration ExplicitlyAccountBound []string `json:"explicitly_account_bound,omitempty"` // accounts that the integration instance is explicitly configured to handle Namespaces []string `json:"namespaces,omitempty"` // namespaces that the integration instance is explicitly configured to handle Configuration *config.Application `json:"configuration,omitempty"` // configuration for the integration instance ClusterName string `json:"cluster_name,omitempty"` // name of cluster where the integration instance runs Namespace string `json:"namespace,omitempty"` // uuid for namespace that the integration instance belongs to HealthReportInterval int `json:"health_report_interval,omitempty"` // time in seconds between health reports }
Click to show internal directories.
Click to hide internal directories.