From 6ef5253cf64383e8e2aaefa2334623fcca48fff5 Mon Sep 17 00:00:00 2001 From: Nicolas Bigler Date: Mon, 27 Jan 2025 10:23:33 +0100 Subject: [PATCH] Update dependencies Signed-off-by: Nicolas Bigler --- apis/exoscale/v1/bucket_types.go | 2 +- apis/exoscale/v1/zz_generated.managed.go | 182 +++++++----------- go.mod | 8 +- go.sum | 26 +-- operator/bucketcontroller/delete.go | 5 +- operator/bucketcontroller/disconnect.go | 7 + operator/bucketcontroller/noop.go | 6 +- operator/iamkeycontroller/delete.go | 5 +- operator/iamkeycontroller/disconnect.go | 7 + operator/kafkacontroller/delete.go | 11 +- operator/kafkacontroller/disconnect.go | 7 + operator/mysqlcontroller/delete.go | 7 +- operator/mysqlcontroller/disconnect.go | 7 + operator/opensearchcontroller/delete.go | 7 +- operator/opensearchcontroller/disconnect.go | 7 + operator/postgresqlcontroller/delete.go | 7 +- operator/postgresqlcontroller/disconnect.go | 7 + operator/rediscontroller/delete.go | 7 +- operator/rediscontroller/disconnect.go | 7 + .../crds/exoscale.crossplane.io_buckets.yaml | 87 +++++---- .../crds/exoscale.crossplane.io_iamkeys.yaml | 103 ++++++---- .../crds/exoscale.crossplane.io_kafkas.yaml | 87 +++++---- .../crds/exoscale.crossplane.io_mysqls.yaml | 87 +++++---- .../exoscale.crossplane.io_opensearches.yaml | 87 +++++---- .../exoscale.crossplane.io_postgresqls.yaml | 87 +++++---- ...xoscale.crossplane.io_providerconfigs.yaml | 12 +- ...le.crossplane.io_providerconfigusages.yaml | 2 +- .../crds/exoscale.crossplane.io_redis.yaml | 87 +++++---- test/e2e/bucket/01-assert.yaml | 2 +- test/e2e/bucket/01-install-iamkey.yaml | 2 +- 30 files changed, 538 insertions(+), 427 deletions(-) create mode 100644 operator/bucketcontroller/disconnect.go create mode 100644 operator/iamkeycontroller/disconnect.go create mode 100644 operator/kafkacontroller/disconnect.go create mode 100644 operator/mysqlcontroller/disconnect.go create mode 100644 operator/opensearchcontroller/disconnect.go create mode 100644 operator/postgresqlcontroller/disconnect.go create mode 100644 operator/rediscontroller/disconnect.go diff --git a/apis/exoscale/v1/bucket_types.go b/apis/exoscale/v1/bucket_types.go index 87e3df6c..eb5736a3 100644 --- a/apis/exoscale/v1/bucket_types.go +++ b/apis/exoscale/v1/bucket_types.go @@ -28,7 +28,7 @@ type BucketParameters struct { // Be aware that S3 providers may require a unique name across the platform or zone. BucketName string `json:"bucketName,omitempty"` - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional // Deprecated: Only here for compatibility with legacy Bucket objects EndpointURL string `json:"endpointURL,omitempty"` diff --git a/apis/exoscale/v1/zz_generated.managed.go b/apis/exoscale/v1/zz_generated.managed.go index 02affa22..2a289500 100644 --- a/apis/exoscale/v1/zz_generated.managed.go +++ b/apis/exoscale/v1/zz_generated.managed.go @@ -14,19 +14,16 @@ func (mg *Bucket) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } +// GetManagementPolicies of this Bucket. +func (mg *Bucket) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + // GetProviderConfigReference of this Bucket. func (mg *Bucket) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Bucket. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Bucket) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Bucket. func (mg *Bucket) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -47,19 +44,16 @@ func (mg *Bucket) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } +// SetManagementPolicies of this Bucket. +func (mg *Bucket) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + // SetProviderConfigReference of this Bucket. func (mg *Bucket) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Bucket. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Bucket) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Bucket. func (mg *Bucket) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -80,19 +74,16 @@ func (mg *IAMKey) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } +// GetManagementPolicies of this IAMKey. +func (mg *IAMKey) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + // GetProviderConfigReference of this IAMKey. func (mg *IAMKey) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this IAMKey. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *IAMKey) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this IAMKey. func (mg *IAMKey) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -113,19 +104,16 @@ func (mg *IAMKey) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } +// SetManagementPolicies of this IAMKey. +func (mg *IAMKey) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + // SetProviderConfigReference of this IAMKey. func (mg *IAMKey) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this IAMKey. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *IAMKey) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this IAMKey. func (mg *IAMKey) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -146,19 +134,16 @@ func (mg *Kafka) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } +// GetManagementPolicies of this Kafka. +func (mg *Kafka) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + // GetProviderConfigReference of this Kafka. func (mg *Kafka) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Kafka. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Kafka) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Kafka. func (mg *Kafka) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -179,19 +164,16 @@ func (mg *Kafka) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } +// SetManagementPolicies of this Kafka. +func (mg *Kafka) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + // SetProviderConfigReference of this Kafka. func (mg *Kafka) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Kafka. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Kafka) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Kafka. func (mg *Kafka) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -212,19 +194,16 @@ func (mg *MySQL) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } +// GetManagementPolicies of this MySQL. +func (mg *MySQL) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + // GetProviderConfigReference of this MySQL. func (mg *MySQL) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this MySQL. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *MySQL) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this MySQL. func (mg *MySQL) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -245,19 +224,16 @@ func (mg *MySQL) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } +// SetManagementPolicies of this MySQL. +func (mg *MySQL) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + // SetProviderConfigReference of this MySQL. func (mg *MySQL) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this MySQL. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *MySQL) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this MySQL. func (mg *MySQL) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -278,19 +254,16 @@ func (mg *OpenSearch) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } +// GetManagementPolicies of this OpenSearch. +func (mg *OpenSearch) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + // GetProviderConfigReference of this OpenSearch. func (mg *OpenSearch) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this OpenSearch. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *OpenSearch) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this OpenSearch. func (mg *OpenSearch) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -311,19 +284,16 @@ func (mg *OpenSearch) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } +// SetManagementPolicies of this OpenSearch. +func (mg *OpenSearch) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + // SetProviderConfigReference of this OpenSearch. func (mg *OpenSearch) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this OpenSearch. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *OpenSearch) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this OpenSearch. func (mg *OpenSearch) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -344,19 +314,16 @@ func (mg *PostgreSQL) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } +// GetManagementPolicies of this PostgreSQL. +func (mg *PostgreSQL) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + // GetProviderConfigReference of this PostgreSQL. func (mg *PostgreSQL) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this PostgreSQL. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *PostgreSQL) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this PostgreSQL. func (mg *PostgreSQL) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -377,19 +344,16 @@ func (mg *PostgreSQL) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } +// SetManagementPolicies of this PostgreSQL. +func (mg *PostgreSQL) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + // SetProviderConfigReference of this PostgreSQL. func (mg *PostgreSQL) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this PostgreSQL. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *PostgreSQL) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this PostgreSQL. func (mg *PostgreSQL) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -410,19 +374,16 @@ func (mg *Redis) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } +// GetManagementPolicies of this Redis. +func (mg *Redis) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + // GetProviderConfigReference of this Redis. func (mg *Redis) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Redis. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Redis) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Redis. func (mg *Redis) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -443,19 +404,16 @@ func (mg *Redis) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } +// SetManagementPolicies of this Redis. +func (mg *Redis) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + // SetProviderConfigReference of this Redis. func (mg *Redis) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Redis. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Redis) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Redis. func (mg *Redis) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r diff --git a/go.mod b/go.mod index 56c336e7..c6e7a59f 100644 --- a/go.mod +++ b/go.mod @@ -102,8 +102,8 @@ require ( github.com/x448/float16 v0.8.4 // indirect github.com/xhit/go-str2duration/v2 v2.1.0 // indirect github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect - go.opentelemetry.io/otel v1.34.0 // indirect - go.opentelemetry.io/otel/trace v1.34.0 // indirect + go.opentelemetry.io/otel v1.29.0 // indirect + go.opentelemetry.io/otel/trace v1.29.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.32.0 // indirect golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 // indirect @@ -117,8 +117,8 @@ require ( golang.org/x/time v0.9.0 // indirect golang.org/x/tools v0.29.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250124145028-65684f501c47 // indirect - google.golang.org/grpc v1.70.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241223144023-3abc09e42ca8 // indirect + google.golang.org/grpc v1.67.3 // indirect google.golang.org/protobuf v1.36.4 // indirect gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect diff --git a/go.sum b/go.sum index 042c0c4a..6b6a5f1f 100644 --- a/go.sum +++ b/go.sum @@ -52,8 +52,6 @@ github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A= github.com/go-ini/ini v1.67.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= @@ -227,18 +225,10 @@ github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGC github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY= -go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI= -go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ= -go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE= -go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= -go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= -go.opentelemetry.io/otel/sdk/metric v1.32.0 h1:rZvFnvmvawYb0alrYkjraqJq0Z4ZUJAiyYCU9snn1CU= -go.opentelemetry.io/otel/sdk/metric v1.32.0/go.mod h1:PWeZlq0zt9YkYAp3gjKZ0eicRYvOh1Gd+X99x6GHpCQ= -go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k= -go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE= +go.opentelemetry.io/otel v1.29.0 h1:PdomN/Al4q/lN6iBJEN3AwPvUiHPMlt93c8bqTG5Llw= +go.opentelemetry.io/otel v1.29.0/go.mod h1:N/WtXPs1CNCUEx+Agz5uouwCba+i+bJGFicT8SR4NP8= +go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4= +go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -297,10 +287,10 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250124145028-65684f501c47 h1:91mG8dNTpkC0uChJUQ9zCiRqx3GEEFOWaRZ0mI6Oj2I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250124145028-65684f501c47/go.mod h1:+2Yz8+CLJbIfL9z73EW45avw8Lmge3xVElCP9zEKi50= -google.golang.org/grpc v1.70.0 h1:pWFv03aZoHzlRKHWicjsZytKAiYCtNS0dHbXnIdq7jQ= -google.golang.org/grpc v1.70.0/go.mod h1:ofIJqVKDXx/JiXrwr2IG4/zwdH9txy3IlF40RmcJSQw= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241223144023-3abc09e42ca8 h1:TqExAhdPaB60Ux47Cn0oLV07rGnxZzIsaRhQaqS666A= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241223144023-3abc09e42ca8/go.mod h1:lcTa1sDdWEIHMWlITnIczmw5w60CF9ffkb8Z+DVmmjA= +google.golang.org/grpc v1.67.3 h1:OgPcDAFKHnH8X3O4WcO4XUc8GRDeKsKReqbQtiCj7N8= +google.golang.org/grpc v1.67.3/go.mod h1:YGaHCc6Oap+FzBJTZLBzkGSYt/cvGPFTPxkn7QfSU8s= google.golang.org/protobuf v1.36.4 h1:6A3ZDJHn/eNqc1i+IdefRzy/9PokBTPvcqMySR7NNIM= google.golang.org/protobuf v1.36.4/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/operator/bucketcontroller/delete.go b/operator/bucketcontroller/delete.go index 5e41565d..ccc8dcb9 100644 --- a/operator/bucketcontroller/delete.go +++ b/operator/bucketcontroller/delete.go @@ -7,6 +7,7 @@ import ( pipeline "github.com/ccremer/go-command-pipeline" "github.com/crossplane/crossplane-runtime/pkg/errors" "github.com/crossplane/crossplane-runtime/pkg/event" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" "github.com/crossplane/crossplane-runtime/pkg/resource" "github.com/minio/minio-go/v7" exoscalev1 "github.com/vshn/provider-exoscale/apis/exoscale/v1" @@ -15,7 +16,7 @@ import ( ) // Delete implements managed.ExternalClient. -func (p *ProvisioningPipeline) Delete(ctx context.Context, mg resource.Managed) error { +func (p *ProvisioningPipeline) Delete(ctx context.Context, mg resource.Managed) (managed.ExternalDelete, error) { log := controllerruntime.LoggerFrom(ctx) log.Info("Deleting resource") @@ -31,7 +32,7 @@ func (p *ProvisioningPipeline) Delete(ctx context.Context, mg resource.Managed) pipe.NewStep("emit event", p.emitDeletionEvent), ) err := pipe.RunWithContext(pctx) - return errors.Wrap(err, "cannot deprovision bucket") + return managed.ExternalDelete{}, errors.Wrap(err, "cannot deprovision bucket") } func hasDeleteAllPolicy(ctx *pipelineContext) bool { diff --git a/operator/bucketcontroller/disconnect.go b/operator/bucketcontroller/disconnect.go new file mode 100644 index 00000000..99d86776 --- /dev/null +++ b/operator/bucketcontroller/disconnect.go @@ -0,0 +1,7 @@ +package bucketcontroller + +import "context" + +func (p *ProvisioningPipeline) Disconnect(ctx context.Context) error { + return nil +} diff --git a/operator/bucketcontroller/noop.go b/operator/bucketcontroller/noop.go index 884c4ec5..500376f7 100644 --- a/operator/bucketcontroller/noop.go +++ b/operator/bucketcontroller/noop.go @@ -30,6 +30,10 @@ func (n *NoopClient) Update(ctx context.Context, mg resource.Managed) (managed.E // Delete implement managed.ExternalClient. // It returns nil. -func (n *NoopClient) Delete(ctx context.Context, mg resource.Managed) error { +func (n *NoopClient) Delete(ctx context.Context, mg resource.Managed) (managed.ExternalDelete, error) { + return managed.ExternalDelete{}, nil +} + +func (n *NoopClient) Disconnect(ctx context.Context) error { return nil } diff --git a/operator/iamkeycontroller/delete.go b/operator/iamkeycontroller/delete.go index f121fd54..cc85d78c 100644 --- a/operator/iamkeycontroller/delete.go +++ b/operator/iamkeycontroller/delete.go @@ -6,6 +6,7 @@ import ( pipeline "github.com/ccremer/go-command-pipeline" "github.com/crossplane/crossplane-runtime/pkg/errors" "github.com/crossplane/crossplane-runtime/pkg/event" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" "github.com/crossplane/crossplane-runtime/pkg/resource" exoscalesdk "github.com/exoscale/egoscale/v3" "github.com/vshn/provider-exoscale/operator/pipelineutil" @@ -15,7 +16,7 @@ import ( ) // Delete implements managed.ExternalClient. -func (p *IAMKeyPipeline) Delete(ctx context.Context, mg resource.Managed) error { +func (p *IAMKeyPipeline) Delete(ctx context.Context, mg resource.Managed) (managed.ExternalDelete, error) { log := controllerruntime.LoggerFrom(ctx) log.Info("Deleting resource") @@ -30,7 +31,7 @@ func (p *IAMKeyPipeline) Delete(ctx context.Context, mg resource.Managed) error pipe.NewStep("emit event", p.emitDeletionEvent), ) err := pipe.RunWithContext(pctx) - return errors.Wrap(err, "cannot deprovision iam key") + return managed.ExternalDelete{}, errors.Wrap(err, "cannot deprovision iam key") } // deleteIAMKey deletes the IAM key from the project associated with the API Key and Secret. diff --git a/operator/iamkeycontroller/disconnect.go b/operator/iamkeycontroller/disconnect.go new file mode 100644 index 00000000..875b6318 --- /dev/null +++ b/operator/iamkeycontroller/disconnect.go @@ -0,0 +1,7 @@ +package iamkeycontroller + +import "context" + +func (p *IAMKeyPipeline) Disconnect(ctx context.Context) error { + return nil +} diff --git a/operator/kafkacontroller/delete.go b/operator/kafkacontroller/delete.go index 88be3b09..3f306c31 100644 --- a/operator/kafkacontroller/delete.go +++ b/operator/kafkacontroller/delete.go @@ -7,6 +7,7 @@ import ( exoscalev1 "github.com/vshn/provider-exoscale/apis/exoscale/v1" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" "github.com/crossplane/crossplane-runtime/pkg/resource" exoscalesdk "github.com/exoscale/egoscale/v3" controllerruntime "sigs.k8s.io/controller-runtime" @@ -14,21 +15,21 @@ import ( // Delete idempotently deletes a kafka instance. // It will not return a "not found" error. -func (p *pipeline) Delete(ctx context.Context, mg resource.Managed) error { +func (p *pipeline) Delete(ctx context.Context, mg resource.Managed) (managed.ExternalDelete, error) { log := controllerruntime.LoggerFrom(ctx) log.V(1).Info("deleting resource") instance, ok := mg.(*exoscalev1.Kafka) if !ok { - return fmt.Errorf("invalid managed resource type %T for kafka connection", mg) + return managed.ExternalDelete{}, fmt.Errorf("invalid managed resource type %T for kafka connection", mg) } resp, err := p.exo.DeleteDBAASServiceKafka(ctx, instance.GetInstanceName()) if err != nil { if errors.Is(err, exoscalesdk.ErrNotFound) { - return nil + return managed.ExternalDelete{}, nil } - return fmt.Errorf("cannot delete kafka instance: %w", err) + return managed.ExternalDelete{}, fmt.Errorf("cannot delete kafka instance: %w", err) } log.V(2).Info("response", "message", string(resp.Message)) - return nil + return managed.ExternalDelete{}, nil } diff --git a/operator/kafkacontroller/disconnect.go b/operator/kafkacontroller/disconnect.go new file mode 100644 index 00000000..ef180453 --- /dev/null +++ b/operator/kafkacontroller/disconnect.go @@ -0,0 +1,7 @@ +package kafkacontroller + +import "context" + +func (p *pipeline) Disconnect(ctx context.Context) error { + return nil +} diff --git a/operator/mysqlcontroller/delete.go b/operator/mysqlcontroller/delete.go index b83b20b0..d86c387a 100644 --- a/operator/mysqlcontroller/delete.go +++ b/operator/mysqlcontroller/delete.go @@ -4,21 +4,22 @@ import ( "context" "fmt" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" "github.com/crossplane/crossplane-runtime/pkg/resource" exoscalev1 "github.com/vshn/provider-exoscale/apis/exoscale/v1" controllerruntime "sigs.k8s.io/controller-runtime" ) // Delete implements managed.ExternalClient. -func (p *pipeline) Delete(ctx context.Context, mg resource.Managed) error { +func (p *pipeline) Delete(ctx context.Context, mg resource.Managed) (managed.ExternalDelete, error) { log := controllerruntime.LoggerFrom(ctx) log.Info("deleting resource") mySQLInstance := mg.(*exoscalev1.MySQL) resp, err := p.exo.DeleteDBAASServiceMysql(ctx, mySQLInstance.GetInstanceName()) if err != nil { - return fmt.Errorf("cannot delete mySQLInstance: %w", err) + return managed.ExternalDelete{}, fmt.Errorf("cannot delete mySQLInstance: %w", err) } log.V(1).Info("response", "message", string(resp.Message)) - return nil + return managed.ExternalDelete{}, nil } diff --git a/operator/mysqlcontroller/disconnect.go b/operator/mysqlcontroller/disconnect.go new file mode 100644 index 00000000..652da9bb --- /dev/null +++ b/operator/mysqlcontroller/disconnect.go @@ -0,0 +1,7 @@ +package mysqlcontroller + +import "context" + +func (p *pipeline) Disconnect(ctx context.Context) error { + return nil +} diff --git a/operator/opensearchcontroller/delete.go b/operator/opensearchcontroller/delete.go index 6e3d7e90..f4a37d7d 100644 --- a/operator/opensearchcontroller/delete.go +++ b/operator/opensearchcontroller/delete.go @@ -4,21 +4,22 @@ import ( "context" "fmt" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" "github.com/crossplane/crossplane-runtime/pkg/resource" exoscalev1 "github.com/vshn/provider-exoscale/apis/exoscale/v1" controllerruntime "sigs.k8s.io/controller-runtime" ) // Delete implements managed.ExternalClient. -func (p *pipeline) Delete(ctx context.Context, mg resource.Managed) error { +func (p *pipeline) Delete(ctx context.Context, mg resource.Managed) (managed.ExternalDelete, error) { log := controllerruntime.LoggerFrom(ctx) log.Info("deleting resource") openSearch := mg.(*exoscalev1.OpenSearch) resp, err := p.exo.DeleteDBAASServiceOpensearch(ctx, openSearch.GetInstanceName()) if err != nil { - return fmt.Errorf("cannot delete OpenSearch: %w", err) + return managed.ExternalDelete{}, fmt.Errorf("cannot delete OpenSearch: %w", err) } log.V(1).Info("response", "message", string(resp.Message)) - return nil + return managed.ExternalDelete{}, nil } diff --git a/operator/opensearchcontroller/disconnect.go b/operator/opensearchcontroller/disconnect.go new file mode 100644 index 00000000..839dcbdd --- /dev/null +++ b/operator/opensearchcontroller/disconnect.go @@ -0,0 +1,7 @@ +package opensearchcontroller + +import "context" + +func (p *pipeline) Disconnect(ctx context.Context) error { + return nil +} diff --git a/operator/postgresqlcontroller/delete.go b/operator/postgresqlcontroller/delete.go index 3eef96bd..449170f5 100644 --- a/operator/postgresqlcontroller/delete.go +++ b/operator/postgresqlcontroller/delete.go @@ -4,21 +4,22 @@ import ( "context" "fmt" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" "github.com/crossplane/crossplane-runtime/pkg/resource" exoscalev1 "github.com/vshn/provider-exoscale/apis/exoscale/v1" controllerruntime "sigs.k8s.io/controller-runtime" ) // Delete implements managed.ExternalClient. -func (p *pipeline) Delete(ctx context.Context, mg resource.Managed) error { +func (p *pipeline) Delete(ctx context.Context, mg resource.Managed) (managed.ExternalDelete, error) { log := controllerruntime.LoggerFrom(ctx) log.Info("Deleting resource") pgInstance := mg.(*exoscalev1.PostgreSQL) resp, err := p.exo.DeleteDBAASServicePG(ctx, pgInstance.GetInstanceName()) if err != nil { - return fmt.Errorf("cannot delete instance: %w", err) + return managed.ExternalDelete{}, fmt.Errorf("cannot delete instance: %w", err) } log.V(1).Info("Response when deleting", "message", resp.Message) - return nil + return managed.ExternalDelete{}, nil } diff --git a/operator/postgresqlcontroller/disconnect.go b/operator/postgresqlcontroller/disconnect.go new file mode 100644 index 00000000..1f75ee4e --- /dev/null +++ b/operator/postgresqlcontroller/disconnect.go @@ -0,0 +1,7 @@ +package postgresqlcontroller + +import "context" + +func (p *pipeline) Disconnect(ctx context.Context) error { + return nil +} diff --git a/operator/rediscontroller/delete.go b/operator/rediscontroller/delete.go index aae0ee9d..900fb5d5 100644 --- a/operator/rediscontroller/delete.go +++ b/operator/rediscontroller/delete.go @@ -6,19 +6,20 @@ import ( exoscalev1 "github.com/vshn/provider-exoscale/apis/exoscale/v1" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" "github.com/crossplane/crossplane-runtime/pkg/resource" controllerruntime "sigs.k8s.io/controller-runtime" ) -func (p pipeline) Delete(ctx context.Context, mg resource.Managed) error { +func (p pipeline) Delete(ctx context.Context, mg resource.Managed) (managed.ExternalDelete, error) { log := controllerruntime.LoggerFrom(ctx) log.Info("deleting resource") redisInstance := mg.(*exoscalev1.Redis) resp, err := p.exo.DeleteDBAASServiceRedis(ctx, redisInstance.GetInstanceName()) if err != nil { - return fmt.Errorf("cannot delete instance: %w", err) + return managed.ExternalDelete{}, fmt.Errorf("cannot delete instance: %w", err) } log.V(1).Info("response", "message", string(resp.Message)) - return nil + return managed.ExternalDelete{}, nil } diff --git a/operator/rediscontroller/disconnect.go b/operator/rediscontroller/disconnect.go new file mode 100644 index 00000000..9b7a7322 --- /dev/null +++ b/operator/rediscontroller/disconnect.go @@ -0,0 +1,7 @@ +package rediscontroller + +import "context" + +func (p *pipeline) Disconnect(ctx context.Context) error { + return nil +} diff --git a/package/crds/exoscale.crossplane.io_buckets.yaml b/package/crds/exoscale.crossplane.io_buckets.yaml index d4f2f613..9b588bee 100644 --- a/package/crds/exoscale.crossplane.io_buckets.yaml +++ b/package/crds/exoscale.crossplane.io_buckets.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.17.1 name: buckets.exoscale.crossplane.io spec: group: exoscale.crossplane.io @@ -70,6 +70,10 @@ spec: DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -109,6 +113,33 @@ spec: required: - zone type: object + managementPolicies: + default: + - '*' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + items: + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -148,43 +179,6 @@ spec: required: - name type: object - providerRef: - description: |- - ProviderReference specifies the provider that will be used to create, - observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef` - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: |- - Resolution specifies whether resolution of this reference is required. - The default is 'Required', which means the reconcile will fail if the - reference cannot be resolved. 'Optional' means this reference will be - a no-op if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: |- - Resolve specifies when this reference should be resolved. The default - is 'IfNotPresent', which will attempt to resolve the reference only when - the corresponding field is not present. Use 'Always' to resolve the - reference on every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: |- PublishConnectionDetailsTo specifies the connection secret config which @@ -312,6 +306,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -332,10 +333,20 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map endpoint: type: string endpointURL: type: string + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/exoscale.crossplane.io_iamkeys.yaml b/package/crds/exoscale.crossplane.io_iamkeys.yaml index 3189b357..c203f6e5 100644 --- a/package/crds/exoscale.crossplane.io_iamkeys.yaml +++ b/package/crds/exoscale.crossplane.io_iamkeys.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.17.1 name: iamkeys.exoscale.crossplane.io spec: group: exoscale.crossplane.io @@ -64,6 +64,10 @@ spec: DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -91,17 +95,56 @@ spec: items: type: string type: array + required: + - buckets type: object + required: + - sos type: object zone: description: |- Zone is the name of the zone where the IAM key is created. The zone must be available in the S3 endpoint. Cannot be changed after IAMKey is created. + enum: + - ch-gva-2 + - ch-dk-2 + - de-fra-1 + - de-muc-1 + - at-vie-1 + - bg-sof-1 type: string required: + - services - zone type: object + managementPolicies: + default: + - '*' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + items: + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -141,43 +184,6 @@ spec: required: - name type: object - providerRef: - description: |- - ProviderReference specifies the provider that will be used to create, - observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef` - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: |- - Resolution specifies whether resolution of this reference is required. - The default is 'Required', which means the reconcile will fail if the - reference cannot be resolved. 'Optional' means this reference will be - a no-op if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: |- - Resolve specifies when this reference should be resolved. The default - is 'IfNotPresent', which will attempt to resolve the reference only when - the corresponding field is not present. Use 'Always' to resolve the - reference on every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: |- PublishConnectionDetailsTo specifies the connection secret config which @@ -310,7 +316,11 @@ spec: items: type: string type: array + required: + - buckets type: object + required: + - sos type: object type: object conditions: @@ -329,6 +339,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -349,6 +366,16 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/exoscale.crossplane.io_kafkas.yaml b/package/crds/exoscale.crossplane.io_kafkas.yaml index ab2767f1..fb1027d1 100644 --- a/package/crds/exoscale.crossplane.io_kafkas.yaml +++ b/package/crds/exoscale.crossplane.io_kafkas.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.17.1 name: kafkas.exoscale.crossplane.io spec: group: exoscale.crossplane.io @@ -67,6 +67,10 @@ spec: DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -148,6 +152,33 @@ spec: required: - zone type: object + managementPolicies: + default: + - '*' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + items: + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -187,43 +218,6 @@ spec: required: - name type: object - providerRef: - description: |- - ProviderReference specifies the provider that will be used to create, - observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef` - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: |- - Resolution specifies whether resolution of this reference is required. - The default is 'Required', which means the reconcile will fail if the - reference cannot be resolved. 'Optional' means this reference will be - a no-op if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: |- - Resolve specifies when this reference should be resolved. The default - is 'IfNotPresent', which will attempt to resolve the reference only when - the corresponding field is not present. Use 'Always' to resolve the - reference on every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: |- PublishConnectionDetailsTo specifies the connection secret config which @@ -399,6 +393,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -419,6 +420,16 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/exoscale.crossplane.io_mysqls.yaml b/package/crds/exoscale.crossplane.io_mysqls.yaml index 8a7bf3da..3c383562 100644 --- a/package/crds/exoscale.crossplane.io_mysqls.yaml +++ b/package/crds/exoscale.crossplane.io_mysqls.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.17.1 name: mysqls.exoscale.crossplane.io spec: group: exoscale.crossplane.io @@ -67,6 +67,10 @@ spec: DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -150,6 +154,33 @@ spec: required: - zone type: object + managementPolicies: + default: + - '*' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + items: + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -189,43 +220,6 @@ spec: required: - name type: object - providerRef: - description: |- - ProviderReference specifies the provider that will be used to create, - observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef` - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: |- - Resolution specifies whether resolution of this reference is required. - The default is 'Required', which means the reconcile will fail if the - reference cannot be resolved. 'Optional' means this reference will be - a no-op if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: |- - Resolve specifies when this reference should be resolved. The default - is 'IfNotPresent', which will attempt to resolve the reference only when - the corresponding field is not present. Use 'Always' to resolve the - reference on every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: |- PublishConnectionDetailsTo specifies the connection secret config which @@ -443,6 +437,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -463,6 +464,16 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/exoscale.crossplane.io_opensearches.yaml b/package/crds/exoscale.crossplane.io_opensearches.yaml index f3ac12c2..a46767e7 100644 --- a/package/crds/exoscale.crossplane.io_opensearches.yaml +++ b/package/crds/exoscale.crossplane.io_opensearches.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.17.1 name: opensearches.exoscale.crossplane.io spec: group: exoscale.crossplane.io @@ -67,6 +67,10 @@ spec: DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -150,6 +154,33 @@ spec: required: - zone type: object + managementPolicies: + default: + - '*' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + items: + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -189,43 +220,6 @@ spec: required: - name type: object - providerRef: - description: |- - ProviderReference specifies the provider that will be used to create, - observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef` - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: |- - Resolution specifies whether resolution of this reference is required. - The default is 'Required', which means the reconcile will fail if the - reference cannot be resolved. 'Optional' means this reference will be - a no-op if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: |- - Resolve specifies when this reference should be resolved. The default - is 'IfNotPresent', which will attempt to resolve the reference only when - the corresponding field is not present. Use 'Always' to resolve the - reference on every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: |- PublishConnectionDetailsTo specifies the connection secret config which @@ -440,6 +434,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -460,6 +461,16 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/exoscale.crossplane.io_postgresqls.yaml b/package/crds/exoscale.crossplane.io_postgresqls.yaml index 399a76ef..d5e01cb8 100644 --- a/package/crds/exoscale.crossplane.io_postgresqls.yaml +++ b/package/crds/exoscale.crossplane.io_postgresqls.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.17.1 name: postgresqls.exoscale.crossplane.io spec: group: exoscale.crossplane.io @@ -67,6 +67,10 @@ spec: DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -151,6 +155,33 @@ spec: required: - zone type: object + managementPolicies: + default: + - '*' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + items: + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -190,43 +221,6 @@ spec: required: - name type: object - providerRef: - description: |- - ProviderReference specifies the provider that will be used to create, - observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef` - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: |- - Resolution specifies whether resolution of this reference is required. - The default is 'Required', which means the reconcile will fail if the - reference cannot be resolved. 'Optional' means this reference will be - a no-op if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: |- - Resolve specifies when this reference should be resolved. The default - is 'IfNotPresent', which will attempt to resolve the reference only when - the corresponding field is not present. Use 'Always' to resolve the - reference on every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: |- PublishConnectionDetailsTo specifies the connection secret config which @@ -428,6 +422,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -448,6 +449,16 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/exoscale.crossplane.io_providerconfigs.yaml b/package/crds/exoscale.crossplane.io_providerconfigs.yaml index c39bbe0d..b4d54adf 100644 --- a/package/crds/exoscale.crossplane.io_providerconfigs.yaml +++ b/package/crds/exoscale.crossplane.io_providerconfigs.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.17.1 name: providerconfigs.exoscale.crossplane.io spec: group: exoscale.crossplane.io @@ -139,6 +139,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -159,6 +166,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map users: description: Users of this provider configuration. format: int64 diff --git a/package/crds/exoscale.crossplane.io_providerconfigusages.yaml b/package/crds/exoscale.crossplane.io_providerconfigusages.yaml index 28fc9a9f..04e14ec2 100644 --- a/package/crds/exoscale.crossplane.io_providerconfigusages.yaml +++ b/package/crds/exoscale.crossplane.io_providerconfigusages.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.17.1 name: providerconfigusages.exoscale.crossplane.io spec: group: exoscale.crossplane.io diff --git a/package/crds/exoscale.crossplane.io_redis.yaml b/package/crds/exoscale.crossplane.io_redis.yaml index 22ce2e9c..0a969861 100644 --- a/package/crds/exoscale.crossplane.io_redis.yaml +++ b/package/crds/exoscale.crossplane.io_redis.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.17.1 name: redis.exoscale.crossplane.io spec: group: exoscale.crossplane.io @@ -67,6 +67,10 @@ spec: DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -136,6 +140,33 @@ spec: required: - zone type: object + managementPolicies: + default: + - '*' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + items: + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -175,43 +206,6 @@ spec: required: - name type: object - providerRef: - description: |- - ProviderReference specifies the provider that will be used to create, - observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef` - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: |- - Resolution specifies whether resolution of this reference is required. - The default is 'Required', which means the reconcile will fail if the - reference cannot be resolved. 'Optional' means this reference will be - a no-op if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: |- - Resolve specifies when this reference should be resolved. The default - is 'IfNotPresent', which will attempt to resolve the reference only when - the corresponding field is not present. Use 'Always' to resolve the - reference on every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: |- PublishConnectionDetailsTo specifies the connection secret config which @@ -379,6 +373,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -399,6 +400,16 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/test/e2e/bucket/01-assert.yaml b/test/e2e/bucket/01-assert.yaml index 2d61f418..eea2c32f 100644 --- a/test/e2e/bucket/01-assert.yaml +++ b/test/e2e/bucket/01-assert.yaml @@ -18,7 +18,7 @@ spec: sos: buckets: - e2e-test-kuttl-provider-exoscale - zone: CH-DK-2 + zone: ch-dk-2 providerConfigRef: name: provider-config writeConnectionSecretToRef: diff --git a/test/e2e/bucket/01-install-iamkey.yaml b/test/e2e/bucket/01-install-iamkey.yaml index e568872b..7e2d4a49 100644 --- a/test/e2e/bucket/01-install-iamkey.yaml +++ b/test/e2e/bucket/01-install-iamkey.yaml @@ -10,7 +10,7 @@ spec: sos: buckets: - e2e-test-kuttl-provider-exoscale - zone: CH-DK-2 + zone: ch-dk-2 providerConfigRef: name: provider-config writeConnectionSecretToRef: