Closed gogovan-vincentngai closed 1 year ago
Hey, I just looked at the bug and found you need to define a writeConnectionSecretToRef
in your Role
example:
apiVersion: postgresql.sql.crossplane.io/v1alpha1
kind: Role
metadata:
annotations:
crossplane.io/external-name: vincent-test
name: vincent-test
spec:
writeConnectionSecretToRef: <<<
name: db-pass-2 <<<
namespace: default <<<
forProvider:
passwordSecretRef:
name: db-pass
namespace: default
key: password
connectionLimit: -1
privileges:
login: true
The Reason for this is, in the current implementation, the difference is detected if the password in the created secret (from the writeConnectionSecretToRef
) is not the same as in the passwordSecretRef
. (see the code at https://github.com/crossplane-contrib/provider-sql/blob/c6c358b9f05e1e7f2e77906c20eb5d714e29143e/pkg/controller/postgresql/role/utils.go#L47). I hope I could help.
Sounds like this was resolved.
What happened?
GCPCloudSQL Role Password unable to update
How can we reproduce it?
success login
with the passwordUpdatedExternalResource
something updatedWhat environment did it happen in?
Crossplane version: 1.10.1 provider-sql: 0.6.0 Kubernetes version: 1.22 Kubernetes distribution: GKE