openshift-quantum-operators icon indicating copy to clipboard operation
openshift-quantum-operators copied to clipboard

Deployment parameters

Open blublinsky opened this issue 5 years ago • 1 comments

It looks like current implementation does not specify any config parameters https://github.com/qiskit-community/openshift-quantum-operators/blob/master/operators-examples/openshift-qiskit-operator/operator/pkg/apis/singhp11/v1/qiskitplayground_types.go. We need to be able to specify, at least cpu/memory requirements and persistence support

blublinsky avatar Mar 02 '21 17:03 blublinsky

Here is a suggested types file:

package v1alpha1

import ( apiv1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" )

// 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.

// QiskitPlaygroundSpec defines the desired state of QiskitPlayground type QiskitPlaygroundSpec struct { // +kubebuilder:default:="ljupyter/scipy-notebook:latest" Image string json:"image,omitempty" // +kubebuilder:default:="IfNotPresent" ImagePullPolicy apiv1.PullPolicy json:"imagePullPolicy,omitempty" PVC string json:"pvc,omitempty" Resources *apiv1.ResourceRequirements json:"resources,omitempty" }

// QiskitPlaygroundStatus defines the observed state of QiskitPlayground type QiskitPlaygroundStatus struct { // +optional Reason *string json:"reason,omitempty" description:"one-word CamelCase reason for the condition's last transition" // +optional Message *string json:"message,omitempty" description:"human-readable message indicating details about last transition" // +optional LastHeartbeatTime *metav1.Time json:"lastHeartbeatTime,omitempty" description:"last time we got an update on a given condition" // +optional LastTransitionTime *metav1.Time json:"lastTransitionTime,omitempty" description:"last time the condition transit from one status to another"}

// +kubebuilder:object:root=true // +kubebuilder:subresource:status

// QiskitPlayground is the Schema for the qiskitplaygrounds API type QiskitPlayground struct { metav1.TypeMeta json:",inline" metav1.ObjectMeta json:"metadata,omitempty"

Spec   QiskitPlaygroundSpec   `json:"spec,omitempty"`
Status QiskitPlaygroundStatus `json:"status,omitempty"`

}

// +kubebuilder:object:root=true

// QiskitPlaygroundList contains a list of QiskitPlayground type QiskitPlaygroundList struct { metav1.TypeMeta json:",inline" metav1.ListMeta json:"metadata,omitempty" Items []QiskitPlayground json:"items" }

func init() { SchemeBuilder.Register(&QiskitPlayground{}, &QiskitPlaygroundList{}) }

blublinsky avatar Mar 02 '21 23:03 blublinsky