doctor

package
v0.30.13 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 25 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknown = errors.New("unknown")

Functions

This section is empty.

Types

type APIServerConfig

type APIServerConfig struct {
	PodName             string            `json:"podName,omitempty"`
	NodeName            string            `json:"nodeName,omitempty"`
	PodIP               string            `json:"podIP,omitempty"`
	HostIP              string            `json:"hostIP,omitempty"`
	AdmissionControl    []string          `json:"admissionControl,omitempty"`
	ClientCAData        string            `json:"clientCAData,omitempty"`
	TLSCertData         string            `json:"tlsCertData,omitempty"`
	RequestHeaderCAData string            `json:"requestHeaderCAData,omitempty"`
	AllowPrivileged     bool              `json:"allowPrivileged,omitempty"`
	AuthorizationMode   []string          `json:"authorizationMode,omitempty"`
	RuntimeConfig       FeatureList       `json:"runtimeConfig,omitempty"`
	FeatureGates        FeatureList       `json:"featureGates,omitempty"`
	KubeProxyFound      bool              `json:"kubeProxyFound,omitempty"`
	KubeProxyRunning    bool              `json:"kubeProxyRunning,omitempty"`
	ProxySettings       map[string]string `json:"proxySettings,omitempty"`
}

type APIServers

type APIServers []APIServerConfig

func (APIServers) AdmissionControl

func (servers APIServers) AdmissionControl(name string) (string, error)

func (APIServers) FeatureGate

func (servers APIServers) FeatureGate(name string) (string, error)

func (APIServers) RuntimeConfig

func (servers APIServers) RuntimeConfig(name string) (string, error)

type Capabilities

type Capabilities struct {
	APIVersion                 string `json:"apiVersion,omitempty"`
	AggregateAPIServer         bool   `json:"aggregateAPIServer,omitempty"`
	MutatingAdmissionWebhook   string `json:"mutatingAdmissionWebhook,omitempty"`
	ValidatingAdmissionWebhook string `json:"validatingAdmissionWebhook,omitempty"`
	PodSecurityPolicy          string `json:"podSecurityPolicy,omitempty"`
	Initializers               string `json:"initializers,omitempty"`
	CustomResourceSubresources string `json:"customResourceSubresources,omitempty"`
}

type ClusterInfo

type ClusterInfo struct {
	Version               *VersionInfo          `json:"version,omitempty"`
	ClientConfig          RestConfig            `json:"clientConfig,omitempty"`
	Capabilities          Capabilities          `json:"capabilities,omitempty"`
	APIServers            APIServers            `json:"apiServers,omitempty"`
	ExtensionServerConfig ExtensionServerConfig `json:"extensionServerConfig,omitempty"`
}

func (ClusterInfo) String

func (c ClusterInfo) String() string

func (ClusterInfo) Validate

func (c ClusterInfo) Validate() error

type Doctor

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

func New

func New(config *rest.Config) (*Doctor, error)

func (*Doctor) GetClusterInfo

func (d *Doctor) GetClusterInfo() (*ClusterInfo, error)

type ExtensionServerConfig

type ExtensionServerConfig struct {
	ClientCAData  string               `json:"clientCAData,omitempty"`
	RequestHeader *RequestHeaderConfig `json:"requestHeaderConfig,omitempty"`
}

type FeatureList

type FeatureList struct {
	Enabled  []string `json:"enabled,omitempty"`
	Disabled []string `json:"disabled,omitempty"`
}

func (FeatureList) Status

func (f FeatureList) Status(name string) (bool, error)

type RequestHeaderConfig

type RequestHeaderConfig struct {
	// UsernameHeaders are the headers to check (in order, case-insensitively) for an identity. The first header with a value wins.
	UsernameHeaders []string `json:"usernameHeaders,omitempty"`
	// GroupHeaders are the headers to check (case-insensitively) for a group names.  All values will be used.
	GroupHeaders []string `json:"groupHeaders,omitempty"`
	// ExtraHeaderPrefixes are the head prefixes to check (case-insentively) for filling in
	// the user.Info.Extra.  All values of all matching headers will be added.
	ExtraHeaderPrefixes []string `json:"extraHeaderPrefixes,omitempty"`
	// CAData points to CA bundle file which is used verify the identity of the front proxy
	CAData string `json:"caData"`
	// AllowedClientNames is a list of common names that may be presented by the authenticating front proxy.  Empty means: accept any.
	AllowedClientNames []string `json:"allowedClientNames,omitempty"`
}

type RestConfig

type RestConfig struct {
	Host     string
	CAData   string `json:"caData,omitempty"`
	Insecure bool   `json:"insecure,omitempty"`
}

type VersionInfo

type VersionInfo struct {
	Minor      string `json:"minor,omitempty"`
	Patch      string `json:"patch,omitempty"`
	GitVersion string `json:"gitVersion,omitempty"`
	GitCommit  string `json:"gitCommit,omitempty"`
	BuildDate  string `json:"buildDate,omitempty"`
	Platform   string `json:"platform,omitempty"`
}

Jump to

Keyboard shortcuts

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