-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added storageClassName in the PVCs for Minio and MariaDB #464
Added storageClassName in the PVCs for Minio and MariaDB #464
Conversation
Change to PR detected. A new PR build was completed. |
b3eb7eb
to
29881af
Compare
Change to PR detected. A new PR build was completed. |
e1f3cad
to
52eec2b
Compare
Change to PR detected. A new PR build was completed. |
@@ -9,6 +9,7 @@ metadata: | |||
spec: | |||
accessModes: | |||
- ReadWriteOnce | |||
storageClassName: {{.MariaDB.StorageClassName}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have we tested to ensure if storageClassName was set to ""
instead of an actual storage class name, as shown in custom config dspa.yaml below, this still works? It feels like it shouldn't (and therefore we should have logic to only add the item if an explicit value is provided) but perhaps kube/openshift has magic for it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm actually seeing an error when I don't specify storageclass:
2023-12-07T19:38:59Z ERROR Reconciler error {"controller": "datasciencepipelinesapplication", "controllerGroup": "datasciencepipelinesapplications.opendatahub.io", "controllerKind": "DataSciencePipelinesApplication", "DataSciencePipelinesApplication": {"name":"sample","namespace":"dspa"}, "namespace": "dspa", "name": "sample", "reconcileID": "46523bbf-59c5-4bf8-9819-1c1c0f9a2768", "error": "PersistentVolumeClaim \"mariadb-sample\" is invalid: spec: Forbidden: spec is immutable after creation except resources.requests for bound claims\n core.PersistentVolumeClaimSpec{\n \t... // 2 identical fields\n \tResources: {Requests: {s\"storage\": {i: {...}, s: \"10Gi\", Format: \"BinarySI\"}}},\n \tVolumeName: \"pvc-1bee7a8f-94b0-48f3-b036-c9f87536f73c\",\n- \tStorageClassName: &\"standard-csi\",\n+ \tStorageClassName: nil,\n \tVolumeMode: &\"Filesystem\",\n \tDataSource: nil,\n \tDataSourceRef: nil,\n }\n"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
/opt/app-root/src/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.0/pkg/internal/controller/controller.go:326
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
/opt/app-root/src/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.0/pkg/internal/controller/controller.go:273
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
/opt/app-root/src/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.0/pkg/internal/controller/controller.go:234
@VaniHaripriya can you take a look at the operator logs when you try to deploy a simple dspa without any storageclassname field set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
api/v1alpha1/dspipeline_types.go
Outdated
@@ -194,6 +194,9 @@ type MariaDB struct { | |||
// Customize the size of the PVC created for the default MariaDB instance. Default: 10Gi | |||
// +kubebuilder:default:="10Gi" | |||
PVCSize resource.Quantity `json:"pvcSize,omitempty"` | |||
// volumeMode Filesystem storageClass to use for PVC creation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is trivial but the description provided here very slightly differs from what is committed in the CRD below. (volumeMode vs Volume Mode). They are functionally the same but a side effect of this is that make manifests
will update the CRD yaml, causing a git changeset, which may confuse some.
So with that said, could you reconcile this please (either change this to "Volume Mode" or update config/crd/bases/datasciencepipelinesapplications.opendatahub.io_datasciencepipelinesapplications.yaml
and run make manifests
? to ensure they match up?
Removed unwanted change Fixed precommit issue Update description of StorageClassName
5341eb0
to
05f7cd7
Compare
Change to PR detected. A new PR build was completed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Change to PR detected. A new PR build was completed. |
/lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/Approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: amadhusu, DharmitD The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Resolves #192
Description of your changes:
Added StorageClassName field under minio and mariaDB sections in the CRD and in minio & mariaDB structs.
Added StorageClassName in the PVC template file for minio and mariaDB.
Testing instructions
Checklist