Documentation ¶
Index ¶
- Constants
- Variables
- func AuthorinoEnabledWhenOperatorNotMissing(_, reason string) bool
- func ConvertToStructuredResource(yamlContent []byte, out runtime.Object) error
- func ConvertToUnstructuredResource(yamlContent []byte, out *unstructured.Unstructured) error
- func IsNil(i any) bool
- func IsNotNil(i any) bool
- func RegisterSchemes(s *runtime.Scheme)
- func VerifyIfCapabilityIsEnabled(ctx context.Context, cli client.Client, capabilityName string, ...) (bool, error)
- func VerifyIfComponentIsEnabled(ctx context.Context, cli client.Client, componentName string) (bool, error)
- type IsvcDeploymentMode
Constants ¶
const ( KserveConfigMapName = "inferenceservice-config" KServeWithServiceMeshComponent = "kserve-service-mesh" )
Variables ¶
var GVK = struct { DataScienceClusterInitialization, DataScienceCluster schema.GroupVersionKind }{ DataScienceCluster: schema.GroupVersionKind{ Group: "datasciencecluster.opendatahub.io", Version: "v1", Kind: "DataScienceCluster", }, DataScienceClusterInitialization: schema.GroupVersionKind{ Group: "dscinitialization.opendatahub.io", Version: "v1", Kind: "DSCInitialization", }, }
GVK is a struct that holds the GroupVersionKind for resources we don't have direct dependency on (by means of golang API) but we still want to interact with them e.g. through unstructured objects.
Functions ¶
func AuthorinoEnabledWhenOperatorNotMissing ¶
AuthorinoEnabledWhenOperatorNotMissing is a helper function to check if Authorino is enabled when the Operator is not missing. This is defined by Condition.Reason=MissingOperator. In any other case, it is assumed that Authorino is enabled but DSC might not be in the Ready state and will reconcile.
func ConvertToUnstructuredResource ¶
func ConvertToUnstructuredResource(yamlContent []byte, out *unstructured.Unstructured) error
func RegisterSchemes ¶
RegisterSchemes adds schemes of used resources to controller's scheme.
func VerifyIfCapabilityIsEnabled ¶
func VerifyIfCapabilityIsEnabled(ctx context.Context, cli client.Client, capabilityName string, enabledWhen func(status, reason string) bool) (bool, error)
VerifyIfCapabilityIsEnabled checks if given DSCI capability is enabled. It only fails if client call to fetch DSCI fails. In other cases it assumes capability is not enabled.
Types ¶
type IsvcDeploymentMode ¶
type IsvcDeploymentMode string
var ( Serverless IsvcDeploymentMode = "Serverless" RawDeployment IsvcDeploymentMode = "RawDeployment" ModelMesh IsvcDeploymentMode = "ModelMesh" )
func GetDeploymentModeForIsvc ¶
func GetDeploymentModeForIsvc(ctx context.Context, cli client.Client, isvc *kservev1beta1.InferenceService) (IsvcDeploymentMode, error)