Documentation ¶
Index ¶
- func GetNodeIPOrName(ctx context.Context, kubeClient clientset.Interface, name string) string
- func MakeLogger(level string, formatter string) (logrus.FieldLogger, error)
- func ParseNameNS(input string) (string, string, error)
- func ServerHasGVK(client discovery.ServerResourcesInterface, groupVersion, kind string) (bool, error)
- func ValidateProtocol(protocol string) bool
- type ConfigDumpMode
- type EnablementStatus
- type Endpoint
- type ForeignRelations
- type Info
- type IngressAPI
- type K8sObjectInfo
- type PluginSchemaStore
- type PodInfo
- type RawSSLCert
- type Rel
- type Reporter
- type SecretGetterFromK8s
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNodeIPOrName ¶
GetNodeIPOrName returns the IP address or the name of a node in the cluster
func MakeLogger ¶ added in v1.3.2
func MakeLogger(level string, formatter string) (logrus.FieldLogger, error)
func ParseNameNS ¶
ParseNameNS parses a string searching a namespace and name
func ServerHasGVK ¶
func ServerHasGVK(client discovery.ServerResourcesInterface, groupVersion, kind string) (bool, error)
ServerHasGVK returns true iff the Kubernetes API server supports the given resource kind at the given group-version.
func ValidateProtocol ¶
ValidateProtocol returns a bool of whether string is a valid protocol
Types ¶
type ConfigDumpMode ¶
type ConfigDumpMode int
const ( ConfigDumpModeOff ConfigDumpMode = iota ConfigDumpModeEnabled ConfigDumpMode = iota ConfigDumpModeSensitive ConfigDumpMode = iota )
func ParseConfigDumpMode ¶
func ParseConfigDumpMode(in string) (ConfigDumpMode, error)
type EnablementStatus ¶ added in v1.3.2
type EnablementStatus int
EnablementStatus can be 'enabled', 'disabled' or 'auto'.
const ( // EnablementStatusDisabled says that the resource it controls is disabled. EnablementStatusDisabled EnablementStatus = iota // EnablementStatusEnabled says that the resource it controls is enabled. EnablementStatusEnabled EnablementStatus = iota // EnablementStatusAuto says that whether the resource it controls is enabled // or disabled should be decided upon by automation. EnablementStatusAuto EnablementStatus = iota )
func (*EnablementStatus) Set ¶ added in v1.3.2
func (e *EnablementStatus) Set(s string) error
Set sets the value of the EnablementStatus to match the provided string value.
func (*EnablementStatus) String ¶ added in v1.3.2
func (e *EnablementStatus) String() string
String converts EnablementStatus to a lowercase word.
func (*EnablementStatus) Type ¶ added in v1.3.2
func (e *EnablementStatus) Type() string
type Endpoint ¶
type Endpoint struct { // Address IP address of the endpoint Address string `json:"address"` // Port number of the TCP port Port string `json:"port"` }
Endpoint describes a kubernetes endpoint, same as a target in Kong.
type ForeignRelations ¶
type ForeignRelations struct {
Consumer, Route, Service []string
}
func (*ForeignRelations) GetCombinations ¶
func (relations *ForeignRelations) GetCombinations() []Rel
type Info ¶
type Info struct { KubernetesVersion string KongVersion string KICVersion string Hostname string KongDB string ID string }
Info holds the metadata to be sent as part of a report.
type IngressAPI ¶
type IngressAPI int
const ( OtherAPI IngressAPI = iota NetworkingV1 IngressAPI = iota NetworkingV1beta1 IngressAPI = iota ExtensionsV1beta1 IngressAPI = iota )
func NegotiateResourceAPI ¶
func NegotiateResourceAPI(client discovery.ServerResourcesInterface, kind string, allowedVersions []IngressAPI, ) (IngressAPI, error)
func (IngressAPI) String ¶
func (ia IngressAPI) String() string
type K8sObjectInfo ¶
K8sObjectInfo describes a Kubernetes object.
func FromK8sObject ¶
func FromK8sObject(obj metav1.Object) K8sObjectInfo
type PluginSchemaStore ¶
type PluginSchemaStore struct {
// contains filtered or unexported fields
}
PluginSchemaStore retrives a schema of a Plugin from Kong.
func NewPluginSchemaStore ¶
func NewPluginSchemaStore(client *kong.Client) *PluginSchemaStore
NewPluginSchemaStore creates a PluginSchemaStore.
type PodInfo ¶
type PodInfo struct { Name string Namespace string NodeIP string // Labels selectors of the running pod // This is used to search for other Ingress controller pods Labels map[string]string }
PodInfo contains runtime information about the pod running the Ingres controller
type RawSSLCert ¶
RawSSLCert represnts TLS cert and key in bytes
type Reporter ¶
type Reporter struct { Info Info Logger logrus.FieldLogger // contains filtered or unexported fields }
Reporter sends anonymous reports of runtime properties and errors in Kong.
type SecretGetterFromK8s ¶ added in v1.3.2
SecretGetterFromK8s is a SecretGetter that reads secrets from Kubernetes API.