Deployment parameters
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
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{}) }