func (t *DeploymentHandler) ObjectUpdated(objOld, objNew interface{}) error {
	log.Info("DeploymentHandler.ObjectUpdated")
	return nil
}
ObjectUpdated is called when an object is updated
package handlers
import (
	"encoding/json"
	"errors"
	"strings"
	log "github.com/Sirupsen/logrus"
	v1beta2 "k8s.io/api/apps/v1beta2"
	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/runtime"
	"k8s.io/apimachinery/pkg/watch"
	"k8s.io/client-go/kubernetes"
	cache "k8s.io/client-go/tools/cache"
)
type DeploymentHandler struct{}
func GetDeploymentInformer(client kubernetes.Interface) cache.SharedIndexInformer {
	informer := cache.NewSharedIndexInformer(
		&cache.ListWatch{
			ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
				return client.AppsV1beta2().Deployments(AppNamespace).List(options)
			},
			WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
				return client.AppsV1beta2().Deployments(AppNamespace).Watch(options)
			},
		},
		&v1beta2.Deployment{},  
		0,                      
		cache.Indexers{},
	)
	return informer
}
func (t *DeploymentHandler) Init() error {
	log.Info("DeploymentHandler.Init")
	return nil
}
func ValidateDeployment(deployment *v1beta2.Deployment) bool {
	if deployment.ObjectMeta.Name == "" {
		return false
	}
	if deployment.ObjectMeta.Namespace == "" {
		return false
	}
	if deployment.ResourceVersion == "" {
		return false
	}
	return true
}
func (t *DeploymentHandler) ObjectCreated(obj interface{}) error {
	log.Info("DeploymentHandler.ObjectCreated")
	deployment := obj.(*v1beta2.Deployment)
	defer func() {
		if r := recover(); r != nil {
			t.ObjectUpdated(obj, obj)
			return
		}
	}()
	if !ValidateDeployment(deployment) {
		return errors.New("Could not validate deployment object " + deployment.ObjectMeta.Name)
	}
	j, err := json.MarshalIndent(deployment, "", "    ")
	if err != nil {
		log.Error(err)
	}
	log.Debugf("    Deployment: %s, \n", j)
	SendJSONQueryWithRetries(deployment, RestSvcEndpoint+"v1.1/entity?objtype=deployment")
	return nil
}
func (t *DeploymentHandler) ObjectDeleted(obj interface{}, key string) error {
	log.Info("DeploymentHandler.ObjectDeleted")
	SendDeleteRequest(RestSvcEndpoint + "v1/entity/deployment/deployment:" + ClusterName + ":" + strings.Replace(key, "/", ":", -1))
	return nil
}