Documentation
¶
Index ¶
- Constants
- func CreateAuthConfig() *unstructured.Unstructured
- func IgnoreDeletingErrors(err error) error
- type ModelRegistryParams
- type ModelRegistryReconciler
- func (r *ModelRegistryReconciler) Apply(params *ModelRegistryParams, templateName string, object interface{}) error
- func (r *ModelRegistryReconciler) CheckDeploymentPods(ctx context.Context, name types.NamespacedName, proxyType string, ...) (string, string, metav1.ConditionStatus)
- func (r *ModelRegistryReconciler) CheckRouteIngressConditions(routes *routev1.RouteList, available bool, routeAvailable map[string]bool, ...) bool
- func (r *ModelRegistryReconciler) GetRegistryForClusterRoleBinding(ctx context.Context, object client.Object) []reconcile.Request
- func (r *ModelRegistryReconciler) GetRegistryForRoute(ctx context.Context, object client.Object) []reconcile.Request
- func (r *ModelRegistryReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *ModelRegistryReconciler) SetOauthProxyCondition(ctx context.Context, req ctrl.Request, modelRegistry *v1beta1.ModelRegistry, ...) (metav1.ConditionStatus, string, string)
- func (r *ModelRegistryReconciler) SetupWithManager(mgr ctrl.Manager) error
- type OperationResult
Constants ¶
const ( DisplayNameAnnotation = "openshift.io/display-name" DescriptionAnnotation = "openshift.io/description" )
const ( // ConditionTypeAvailable represents the status of the Deployment reconciliation ConditionTypeAvailable = "Available" // ConditionTypeProgressing represents the status used when the model registry is being deployed. ConditionTypeProgressing = "Progressing" // ConditionTypeDegraded represents the status used when the model registry is deleted and the finalizer operations must occur. ConditionTypeDegraded = "Degraded" // ConditionTypeIstio represents the status of base Istio resources configuration. ConditionTypeIstio = "IstioAvailable" // ConditionTypeGateway represents the status of Istio Gateway configuration. ConditionTypeGateway = "GatewayAvailable" // ConditionTypeOauthProxy represents the status of OAuth Proxy configuration. ConditionTypeOAuthProxy = "OAuthProxyAvailable" ReasonDeploymentCreated = "CreatedDeployment" ReasonDeploymentCreating = "CreatingDeployment" ReasonDeploymentUpdating = "UpdatingDeployment" ReasonDeploymentAvailable = "DeploymentAvailable" ReasonConfigurationError = "ConfigurationError" ReasonResourcesCreated = "CreatedResources" ReasonResourcesAvailable = "ResourcesAvailable" ReasonResourcesAlert = "ResourcesAlert" )
Definitions to manage status conditions
Variables ¶
This section is empty.
Functions ¶
func CreateAuthConfig ¶ added in v0.2.11
func CreateAuthConfig() *unstructured.Unstructured
func IgnoreDeletingErrors ¶
Types ¶
type ModelRegistryParams ¶
type ModelRegistryParams struct { Name string Namespace string Spec *v1beta1.ModelRegistrySpec OriginalSpec *v1beta1.ModelRegistrySpec // gateway route parameters Host string IngressService *corev1.Service }
ModelRegistryParams is a wrapper for template parameters
type ModelRegistryReconciler ¶
type ModelRegistryReconciler struct { client.Client ClientSet *kubernetes.Clientset Scheme *runtime.Scheme Recorder record.EventRecorder Log logr.Logger Template *template.Template EnableWebhooks bool IsOpenShift bool HasIstio bool CreateAuthResources bool EnableModelCatalog bool }
ModelRegistryReconciler reconciles a ModelRegistry object
func (*ModelRegistryReconciler) Apply ¶
func (r *ModelRegistryReconciler) Apply(params *ModelRegistryParams, templateName string, object interface{}) error
Apply executes given template name with params
func (*ModelRegistryReconciler) CheckDeploymentPods ¶ added in v0.2.2
func (r *ModelRegistryReconciler) CheckDeploymentPods(ctx context.Context, name types.NamespacedName, proxyType string, log logr.Logger, message string, reason string, status metav1.ConditionStatus) (string, string, metav1.ConditionStatus)
func (*ModelRegistryReconciler) CheckRouteIngressConditions ¶ added in v0.2.2
func (*ModelRegistryReconciler) GetRegistryForClusterRoleBinding ¶ added in v0.2.16
func (r *ModelRegistryReconciler) GetRegistryForClusterRoleBinding(ctx context.Context, object client.Object) []reconcile.Request
GetRegistryForClusterRoleBinding maps role binding to model registry reconcile request
func (*ModelRegistryReconciler) GetRegistryForRoute ¶ added in v0.2.2
func (r *ModelRegistryReconciler) GetRegistryForRoute(ctx context.Context, object client.Object) []reconcile.Request
GetRegistryForRoute maps route name to model registry reconcile request
func (*ModelRegistryReconciler) Reconcile ¶
func (r *ModelRegistryReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the ModelRegistry object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.16.0/pkg/reconcile
func (*ModelRegistryReconciler) SetOauthProxyCondition ¶ added in v0.2.16
func (r *ModelRegistryReconciler) SetOauthProxyCondition(ctx context.Context, req ctrl.Request, modelRegistry *v1beta1.ModelRegistry, status metav1.ConditionStatus, reason string, message string) (metav1.ConditionStatus, string, string)
func (*ModelRegistryReconciler) SetupWithManager ¶
func (r *ModelRegistryReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type OperationResult ¶
type OperationResult int
const ( // ResourceUnchanged means that the resource has not been changed. ResourceUnchanged OperationResult = iota // ResourceCreated means that a new resource is created. ResourceCreated // ResourceUpdated means that an existing resource is updated. ResourceUpdated )