 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- Variables
- func GetLabelValueUInt32(value string) uint32
- type K8sResourceManager
- func (manager *K8sResourceManager) GetPodAnnotation(key string, podInfo *PodInfo) (string, error)
- func (manager *K8sResourceManager) GetServiceClusterIP(name string, namespace string) (string, error)
- func (manager *K8sResourceManager) PodExists(name string, ns string) (bool, error)
- func (manager *K8sResourceManager) SetPodAnnotation(annotations map[string]string, podInfo *PodInfo) error
- func (manager *K8sResourceManager) WatchPods(stopper chan struct{}, handlers ...PodEventHandler)
 
- type PodEventHandler
- type PodInfo
- type WebhookServer
Constants ¶
      View Source
      
  
const ( ENDPOINT_WEIGHT_ANNOTATION = "demo.envoy.weight" ENVOY_PROXY_ANNOTATION = "demo.envoy.proxy" ENVOY_ENABLE_ANNOTATION = "demo.envoy.enabled" DEFAULT_WEIGHT = 100 APP_NAMESPACE = "default" APP_PORT = 9080 CONTROL_PLANE_PORT = 15010 CONTROL_PLANE_SERVICE = "envoy-demo" MANAGE_PORT = 15000 ENVOY_LISTEN_PORT = 10000 PROXY_UID = 1337 ZIPKIN_SERVICE = "zipkin" ZIPKIN_PORT = 9411 )
Variables ¶
Functions ¶
func GetLabelValueUInt32 ¶
Types ¶
type K8sResourceManager ¶
type K8sResourceManager struct {
	// contains filtered or unexported fields
}
    func NewK8sResourceManager ¶
func NewK8sResourceManager() (*K8sResourceManager, error)
func (*K8sResourceManager) GetPodAnnotation ¶
func (manager *K8sResourceManager) GetPodAnnotation(key string, podInfo *PodInfo) (string, error)
func (*K8sResourceManager) GetServiceClusterIP ¶
func (manager *K8sResourceManager) GetServiceClusterIP(name string, namespace string) (string, error)
func (*K8sResourceManager) PodExists ¶
func (manager *K8sResourceManager) PodExists(name string, ns string) (bool, error)
func (*K8sResourceManager) SetPodAnnotation ¶
func (manager *K8sResourceManager) SetPodAnnotation(annotations map[string]string, podInfo *PodInfo) error
func (*K8sResourceManager) WatchPods ¶
func (manager *K8sResourceManager) WatchPods(stopper chan struct{}, handlers ...PodEventHandler)
type PodEventHandler ¶
type PodInfo ¶
type PodInfo struct {
	ResourceVersion string
	Name            string
	Namespace       string
	PodIP           string
	HostIP          string
	Annotations     map[string]string
	Labels          map[string]string
	HostNetwork     bool
	Containers      []string
	ContainerPorts  []uint32
}
    func NewPodInfo ¶
func (*PodInfo) EnvoyAnnotated ¶
func (*PodInfo) EnvoyDockerId ¶
type WebhookServer ¶
type WebhookServer struct {
	// contains filtered or unexported fields
}
    func NewWebhookServer ¶
func NewWebhookServer() *WebhookServer
func (*WebhookServer) Mutate ¶
func (server *WebhookServer) Mutate(ar *v1beta1.AdmissionReview) *v1beta1.AdmissionResponse
func (*WebhookServer) Process ¶
func (server *WebhookServer) Process(resp http.ResponseWriter, req *http.Request)
func (*WebhookServer) Run ¶
func (server *WebhookServer) Run()
 Click to show internal directories. 
   Click to hide internal directories.