X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=vnfs%2FDAaaS%2Fmicroservices%2Fcollectd-operator%2Fpkg%2Fapis%2Fonap%2Fv1alpha1%2Fcollectdplugin_types.go;h=065f14c4a23cded91d5ae2da29ed6026dfc24ba0;hb=a4a006a7b3f687310e02975d99bf452215d441a6;hp=5f1c0a83df7be3b7661558d6d6d5c7142261fb2a;hpb=18909c10d00e4591f931475a1082edb209b66071;p=demo.git diff --git a/vnfs/DAaaS/microservices/collectd-operator/pkg/apis/onap/v1alpha1/collectdplugin_types.go b/vnfs/DAaaS/microservices/collectd-operator/pkg/apis/onap/v1alpha1/collectdplugin_types.go index 5f1c0a83..065f14c4 100644 --- a/vnfs/DAaaS/microservices/collectd-operator/pkg/apis/onap/v1alpha1/collectdplugin_types.go +++ b/vnfs/DAaaS/microservices/collectd-operator/pkg/apis/onap/v1alpha1/collectdplugin_types.go @@ -4,6 +4,20 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) + +const ( + //Initial indicates the initial status of CollectdPlugin + Initial = "" + //Created indicates the status of CollectdPlugin after first reconcile + Created = "Created" + //Enabled indicates the status of CollectdPlugin after all the pods are reloaded + Enabled = "Enabled" + //Deleting state + Deleting = "Deleting" + //Deprecated state when a plugin with same name is created. Old plugin gets deprecated and deleted eventually. + Deprecated = "Deprecated" +) + // EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! // NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. @@ -20,11 +34,10 @@ type CollectdPluginSpec struct { // CollectdPluginStatus defines the observed state of CollectdPlugin // +k8s:openapi-gen=true type CollectdPluginStatus struct { - // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster - // Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file - // Add custom validation using kubebuilder tags: https://book.kubebuilder.io/beyond_basics/generating_crd.html // CollectdAgents are the collectd pods in the Daemonset - CollectdAgents []string `json:"collectdAgents"` + // Status can be one of "", Created, Deleting, Applied, Deprecated + CollectdAgents []string `json:"collectdAgents,omitempty"` + Status string `json:"status"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object