Documentation ¶
Overview ¶
Package kubernetes listens to Kubernetes for policy updates.
Package kubernetes implements kubernetes API specific helper functions.
Index ¶
- Constants
- func CreateDefaultPolicy(o KubeObject, l *kubeListener)
- func CreateSchema(rootServiceURL string, overwrite bool) error
- func CreateTenant(name string) error
- func GetTenantName(uid string) (string, error)
- func GetTenantUUID(name string) (string, error)
- func Run(rootServiceURL string, cred *common.Credential) (*common.RestServiceInfo, error)
- func TenantExists(name string) bool
- type Done
- type Event
- type FromEntry
- type Ingress
- type KubeObject
- type Metadata
- type PodSelector
- type Spec
- type ToPort
Constants ¶
const ( KubeEventAdded = "ADDED" KubeEventDeleted = "DELETED" KubeEventModified = "MODIFIED" InternalEventDeleteAll = "_DELETE_ALL" )
Variables ¶
This section is empty.
Functions ¶
func CreateDefaultPolicy ¶ added in v0.9.0
func CreateDefaultPolicy(o KubeObject, l *kubeListener)
func CreateSchema ¶ added in v0.9.0
CreateSchema is placeholder for now.
func CreateTenant ¶
CreateTenant creates kubernetes specific tenant corresponding to the name given.
func GetTenantName ¶
GetTenantName returns kubernetes tenant name corresponding to the UUID being used in romana tenants.
func GetTenantUUID ¶
GetTenantUUID returns kubernetes tenant UUID corresponding to the name.
func Run ¶ added in v0.9.0
func Run(rootServiceURL string, cred *common.Credential) (*common.RestServiceInfo, error)
Run configures and runs listener service.
func TenantExists ¶
TenantExists returns true/false depending on kubernetes tenant name or uuid exists.
Types ¶
type Done ¶ added in v0.9.0
type Done struct{}
Done is an alias for empty struct, used to make broadcast channels for terminating goroutines.
type Event ¶ added in v0.9.0
type Event struct { Type string `json:"Type"` Object KubeObject `json:"object"` }
Event is a representation of a structure that we receive from kubernetes API.
type FromEntry ¶ added in v0.9.0
type FromEntry struct {
Pods PodSelector `json:"podSelector"`
}
type KubeObject ¶ added in v0.9.0
type KubeObject struct { Kind string `json:"kind"` Spec Spec `json:"spec"` ApiVersion string `json:"apiVersion"` Metadata Metadata `json:"metadata"` Status map[string]string `json:"status,omitempty"` }
KubeObject is a representation of object in kubernetes.
type Metadata ¶ added in v0.9.0
type Metadata struct { Name string `json:"name"` Namespace string `json:"namespace"` SelfLink string `json:"selfLink"` Uid string `json:"uid"` ResourceVersion string `json:"resourceVersion"` CreationTimestamp string `json:"creationTimestamp"` Labels map[string]string `json:"labels"` Annotations map[string]string `json:"annotations,omitempty"` }
Metadata is a representation of metadata in kubernetes object
type PodSelector ¶ added in v0.9.0
type Spec ¶ added in v0.9.0
type Spec struct { Ingress []Ingress `json:"ingress"` PodSelector PodSelector `json:"podSelector"` }
TODO need to find a way to use different specs for different resources.