From a67ac6f4737ee5ffdaf4c1604adac4780e3b5a79 Mon Sep 17 00:00:00 2001 From: Yury Tsarev Date: Fri, 16 Feb 2024 10:52:06 +0100 Subject: [PATCH] Expose database version in XRD Signed-off-by: Yury Tsarev --- apis/definition.yaml | 5 +++++ apis/mariadb/composition.yaml | 5 +++-- apis/postgresql/composition.yaml | 5 +++-- examples/mariadb-claim.yaml | 1 + examples/postgres-claim.yaml | 1 + 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/apis/definition.yaml b/apis/definition.yaml index c78f089..c4b6dcd 100644 --- a/apis/definition.yaml +++ b/apis/definition.yaml @@ -45,6 +45,10 @@ spec: default: default storageGB: type: integer + description: Database size + version: + type: string + description: Database version passwordSecretRef: type: object description: "A reference to the Secret object containing database password" @@ -71,5 +75,6 @@ spec: required: - storageGB - passwordSecretRef + - version required: - parameters diff --git a/apis/mariadb/composition.yaml b/apis/mariadb/composition.yaml index b4ab128..afbb14e 100644 --- a/apis/mariadb/composition.yaml +++ b/apis/mariadb/composition.yaml @@ -45,8 +45,6 @@ spec: skuName: GP_Gen5_2 sslEnforcementEnabled: false sslMinimalTlsVersionEnforced: TLSEnforcementDisabled - storageMb: 5120 - version: "10.3" connectionDetails: - type: FromFieldPath fromFieldPath: status.atProvider.fqdn @@ -106,6 +104,9 @@ spec: - type: FromCompositeFieldPath fromFieldPath: spec.parameters.passwordSecretRef.key toFieldPath: spec.forProvider.administratorLoginPasswordSecretRef.key + - type: FromCompositeFieldPath + fromFieldPath: spec.parameters.version + toFieldPath: spec.forProvider.version - name: vnetrule base: diff --git a/apis/postgresql/composition.yaml b/apis/postgresql/composition.yaml index bf029e9..48e9f16 100644 --- a/apis/postgresql/composition.yaml +++ b/apis/postgresql/composition.yaml @@ -48,8 +48,6 @@ spec: skuName: GP_Gen5_2 sslEnforcementEnabled: false sslMinimalTlsVersionEnforced: TLSEnforcementDisabled - storageMb: 5120 - version: "11" connectionDetails: - type: FromFieldPath fromFieldPath: status.atProvider.fqdn @@ -109,6 +107,9 @@ spec: - type: FromCompositeFieldPath fromFieldPath: spec.parameters.passwordSecretRef.key toFieldPath: spec.forProvider.administratorLoginPasswordSecretRef.key + - type: FromCompositeFieldPath + fromFieldPath: spec.parameters.version + toFieldPath: spec.forProvider.version - name: vnetrule base: diff --git a/examples/mariadb-claim.yaml b/examples/mariadb-claim.yaml index f6e9d9f..7804438 100644 --- a/examples/mariadb-claim.yaml +++ b/examples/mariadb-claim.yaml @@ -10,6 +10,7 @@ spec: parameters: region: westus storageGB: 5 #Minimum value is 5 + version: "10.3" passwordSecretRef: namespace: default name: psqlsecret diff --git a/examples/postgres-claim.yaml b/examples/postgres-claim.yaml index d37093f..526b2f3 100644 --- a/examples/postgres-claim.yaml +++ b/examples/postgres-claim.yaml @@ -10,6 +10,7 @@ spec: parameters: region: westus storageGB: 5 #Minimum value is 5 + version: "11" passwordSecretRef: namespace: default name: psqlsecret