Skip to content

Commit

Permalink
Feat: Attach multiple PVC to Instance. (#360)
Browse files Browse the repository at this point in the history
In this commit we relax the contraint that we only allow disks named DataDisk, LogDisk, and BackupDisk in the DiskSpec field.

Bug: b/323879297
Change-Id: Id8f1d254267413f896c94b51b82e81fb3bd2d92f
  • Loading branch information
tabbyl21 authored Feb 7, 2024
1 parent 48903b1 commit 50d4ea1
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 24 deletions.
2 changes: 0 additions & 2 deletions common/api/v1alpha1/disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ import (
// the model can be also adjusted to reflect that).
type DiskSpec struct {
// Name of a disk.
// Allowed values are: DataDisk,LogDisk,BackupDisk
// +required
// +kubebuilder:validation:Enum=DataDisk;LogDisk;BackupDisk
Name string `json:"name"`

// Disk size. If not specified, the defaults are: DataDisk:"100Gi", LogDisk:"150Gi",BackupDisk:"100Gi"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,7 @@ spec:
external tools through Kubernetes.
type: object
name:
description: 'Name of a disk. Allowed values are: DataDisk,LogDisk,BackupDisk'
enum:
- DataDisk
- LogDisk
- BackupDisk
description: Name of a disk.
type: string
selector:
description: A label query over volumes to consider for binding.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,7 @@ spec:
external tools through Kubernetes.
type: object
name:
description: 'Name of a disk. Allowed values are: DataDisk,LogDisk,BackupDisk'
enum:
- DataDisk
- LogDisk
- BackupDisk
description: Name of a disk.
type: string
selector:
description: A label query over volumes to consider for binding.
Expand Down
4 changes: 2 additions & 2 deletions oracle/controllers/validationstest/crd_validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,14 +229,14 @@ var _ = Describe("Instance CRD Validation rules", func() {
disks: []commonv1alpha1.DiskSpec{
{Name: "FrisbeeDisk"},
},
valid: false,
valid: true,
},
{
disks: []commonv1alpha1.DiskSpec{
{Name: "SystemDisk"},
{Name: "DataDisk"},
},
valid: false,
valid: true,
},
}

Expand Down
12 changes: 2 additions & 10 deletions oracle/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -688,11 +688,7 @@ spec:
external tools through Kubernetes.
type: object
name:
description: 'Name of a disk. Allowed values are: DataDisk,LogDisk,BackupDisk'
enum:
- DataDisk
- LogDisk
- BackupDisk
description: Name of a disk.
type: string
selector:
description: A label query over volumes to consider for binding.
Expand Down Expand Up @@ -1951,11 +1947,7 @@ spec:
external tools through Kubernetes.
type: object
name:
description: 'Name of a disk. Allowed values are: DataDisk,LogDisk,BackupDisk'
enum:
- DataDisk
- LogDisk
- BackupDisk
description: Name of a disk.
type: string
selector:
description: A label query over volumes to consider for binding.
Expand Down

0 comments on commit 50d4ea1

Please sign in to comment.