Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigDump ¶ added in v3.2.0
type ConfigDump struct {
	// Config is the configuration KIC applied or attempted to apply.
	Config file.Content
	// Meta contains information about the status and context of the configuration dump.
	Meta DumpMeta
	// RawResponseBody is the raw Kong Admin API response body from a config apply. It is only available in DB-less mode.
	RawResponseBody []byte
}
    ConfigDump contains a config dump and a flag indicating that the config was not successfully applid.
type ConfigDumpDiagnostic ¶ added in v3.2.0
type ConfigDumpDiagnostic struct {
	// DumpsIncludeSensitive is true if the configuration dump includes sensitive values, such as certificate private
	// keys and credential secrets.
	DumpsIncludeSensitive bool
	// Configs is the channel that receives configuration blobs from the configuration update strategy implementation.
	Configs chan ConfigDump
	// FallbackCacheMetadata is the channel that receives fallback metadata from the fallback cache generator.
	FallbackCacheMetadata chan fallback.GeneratedCacheMetadata
}
    ConfigDumpDiagnostic contains settings and channels for receiving diagnostic configuration dumps.
type ConfigDumpResponse ¶ added in v3.2.0
type ConfigDumpResponse struct {
	ConfigHash string       `json:"hash"`
	Config     file.Content `json:"config"`
}
    ConfigDumpResponse is the GET /debug/config/[successful|failed] response schema.
type DumpMeta ¶ added in v3.2.0
type DumpMeta struct {
	// Failed indicates the dump was not accepted by the Kong admin API.
	Failed bool
	// Fallback indicates that the dump is a fallback configuration attempted after a failed config update.
	Fallback bool
	// Hash is the configuration hash.
	Hash string
}
    DumpMeta annotates a config dump.
type FallbackAffectedObjectMeta ¶ added in v3.2.0
type FallbackAffectedObjectMeta struct {
	// Group is the resource group.
	Group string `json:"group"`
	// Kind is the resource kind.
	Kind string `json:"kind"`
	// Version is the resource version.
	Version string `json:"version,omitempty"`
	// Namespace is the object namespace.
	Namespace string `json:"namespace"`
	// Namespace is the object name.
	Name string `json:"name"`
	// ID is the object UID.
	ID string `json:"id"`
	// CausingObjects is the object that triggered this
	CausingObjects []string `json:"causingObjects,omitempty"`
}
    FallbackAffectedObjectMeta is a fallback affected object metadata.
type FallbackResponse ¶ added in v3.2.0
type FallbackResponse struct {
	// Status is the fallback configuration generation status.
	Status FallbackStatus `json:"status"`
	// BrokenObjects is the list of objects that are broken.
	BrokenObjects []FallbackAffectedObjectMeta `json:"brokenObjects,omitempty"`
	// ExcludedObjects is the list of objects that were excluded from the fallback configuration.
	ExcludedObjects []FallbackAffectedObjectMeta `json:"excludedObjects,omitempty"`
	// BackfilledObjects is the list of objects that were backfilled from the last valid cache state.
	BackfilledObjects []FallbackAffectedObjectMeta `json:"backfilledObjects,omitempty"`
}
    FallbackResponse is the GET /debug/config/fallback response schema.
type FallbackStatus ¶ added in v3.2.0
type FallbackStatus string
FallbackStatus describes whether the fallback configuration generation was triggered or not. Making this a string type not a bool to allow for potential future expansion of the status.
const ( // FallbackStatusTriggered indicates that the fallback configuration generation was triggered. FallbackStatusTriggered FallbackStatus = "triggered" // FallbackStatusNotTriggered indicates that the fallback configuration generation was not triggered. FallbackStatusNotTriggered FallbackStatus = "not-triggered" )
type Server ¶
type Server struct {
	// contains filtered or unexported fields
}
    Server is an HTTP server running exposing the pprof profiling tool, and processing diagnostic dumps of Kong configurations.
func NewServer ¶ added in v3.1.0
func NewServer(logger logr.Logger, cfg ServerConfig) Server
NewServer creates a diagnostics server ready to start listening.
func (*Server) ConfigDumps ¶
func (s *Server) ConfigDumps() ConfigDumpDiagnostic
ConfigDumps returns an object allowing dumping succeeded and failed configuration updates. It will return a zero value of the type in case the config dumps are not enabled.
type ServerConfig ¶ added in v3.1.0
type ServerConfig struct {
	// ProfilingEnabled enables profiling endpoints.
	ProfilingEnabled bool
	// ConfigDumpsEnabled enables config dumps endpoints.
	ConfigDumpsEnabled bool
	// DumpSensitiveConfig makes config dumps to include sensitive information.
	DumpSensitiveConfig bool
}
    ServerConfig contains configuration for the diagnostics server.