Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
youngbupark committed Jun 13, 2023
1 parent ea3de58 commit c6f7d41
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/corerp/handlers/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ import (
)

const (
DefaultDeploymentTimeout = time.Minute * time.Duration(5)
// DefaultDeploymentTimeout is the timeout for waiting for a deployment to be ready.
DefaultDeploymentTimeout = time.Minute * time.Duration(5)
// DefaultCacheResyncInterval is the interval for resyncing informer.
DefaultCacheResyncInterval = time.Minute * time.Duration(10)
)

Expand All @@ -64,6 +66,7 @@ type kubernetesHandler struct {
cacheResyncInterval time.Duration
}

// Put creates or updates a Kubernetes resource described in PutOptions.
func (handler *kubernetesHandler) Put(ctx context.Context, options *PutOptions) (map[string]string, error) {
item, err := convertToUnstructured(*options.Resource)
if err != nil {
Expand Down Expand Up @@ -209,6 +212,7 @@ func (handler *kubernetesHandler) checkDeploymentStatus(ctx context.Context, obj
}
}

// Delete deletes a Kubernetes resource.
func (handler *kubernetesHandler) Delete(ctx context.Context, options *DeleteOptions) error {
identity := &resourcemodel.KubernetesIdentity{}
if err := store.DecodeMap(options.Resource.Identity.Data, identity); err != nil {
Expand Down

0 comments on commit c6f7d41

Please sign in to comment.