pravega / pravega-operator

Pravega Kubernetes Operator
Apache License 2.0
41 stars 38 forks source link

Issue 605: Remove dependency to k8sutil in pravegacluster_types.go #606

Closed rwx42 closed 2 years ago

rwx42 commented 2 years ago

Signed-off-by: Andrey Andreev andrey_andreev@dell.com

Change log description

The import of k8sutil is removed in pravegacluster_types.go and k8s.GetOperatorName() is replaced by the function OperatorName().

Purpose of the change

The package k8sutil was removed from operator-sdk in version 1.0.0. This blocks using of PravegaCluster as a secondary resource in projects which use operator-sdk 1.0.0+.

What the code does

Implements OperatorName() function that returns the value of OPERATOR_NAME env variable and/or error in case of empyt or not set variable.

How to verify it