-
Notifications
You must be signed in to change notification settings - Fork 611
Tablespace Implementation #3575
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
Conversation
66556c4
to
7957ba8
Compare
config/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml
Show resolved
Hide resolved
30e7a63
to
fb0876e
Compare
@@ -1086,11 +1087,14 @@ func (r *Reconciler) reconcileInstance( | |||
if err == nil { | |||
postgresWALVolume, err = r.reconcilePostgresWALVolume(ctx, cluster, spec, instance, observed, clusterVolumes) | |||
} | |||
if err == nil { | |||
tablespaceVolumes, err = r.reconcileTablespaceVolumes(ctx, cluster, spec, instance, clusterVolumes) | |||
} | |||
if err == nil { | |||
postgres.InstancePod( |
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.
❓ Should this function start taking a parameter struct to bring the number of arguments down? Same question for reconcileRestoreJob
in internal/controller/postgrescluster/pgbackrest.go
.
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 not feeling that as a necessity at this moment, but would definitely consider it in the future
d283faf
to
499d3c4
Compare
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.
Looks good! 👍
@@ -561,6 +561,78 @@ func (r *Reconciler) reconcilePostgresDataVolume( | |||
return pvc, err | |||
} | |||
|
|||
// +kubebuilder:rbac:groups="",resources=persistentvolumeclaims,verbs=create;patch |
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 prefer this syntax because it aligns with how our hack
script works. There's no functional difference.
// +kubebuilder:rbac:groups="",resources=persistentvolumeclaims,verbs=create;patch | |
// +kubebuilder:rbac:groups="",resources="persistentvolumeclaims",verbs={create,patch} |
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.
Worth changing these in the few places it exists?
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.
Actually we have a bunch of annotations that follow the first syntax, maybe it's worth a whole separate PR to bring it into line?
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.
Agreed. No need to touch lots of stuff in this PR.
pkg/apis/postgres-operator.crunchydata.com/v1beta1/postgrescluster_types.go
Show resolved
Hide resolved
pkg/apis/postgres-operator.crunchydata.com/v1beta1/postgrescluster_types.go
Show resolved
Hide resolved
9f9d635
to
bf4ca05
Compare
* Adds the tablespaceVolumes field to the CRD; * Adds basic tablespace functionality: mounts the volumes and preps them with correct permissions; * Adds option for restoring with tablespaces; * Adds docs/content/guides/tablespaces * Adds a basic KUTTL test for creating a cluster with tablespaces; * Updates the github test to add the feature gate Issue: [sc-17759]
bf4ca05
to
c414223
Compare
Checklist:
Type of Changes:
What is the current behavior (link to any open issues here)?
Tablespaces were not implemented by the operator
What is the new behavior (if this is a feature change)?
Implements and documents a tablespaces feature, which is behind a feature flag.
Other Information:
Issue: [sc-17759]