Skip to content
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

Modifying DBInstance on every apply #1770

Closed
okgolove opened this issue Jun 7, 2023 · 3 comments
Closed

Modifying DBInstance on every apply #1770

okgolove opened this issue Jun 7, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@okgolove
Copy link

okgolove commented Jun 7, 2023

What happened?

RDS instance is modified by provider every time I apply the same manifest.

Provider diff log (the same every time):

2023/06/07 13:08:14 Found observed difference in dbinstance
  &v1alpha1.DBInstanceParameters{
        ... // 4 ignored and 31 identical fields
        NcharCharacterSetName:              nil,
        NetworkType:                        nil,
-       OptionGroupName:                    nil,
+       OptionGroupName:                    &"test-internal-dev-aa543a",
        PerformanceInsightsKMSKeyID:        nil,
        PerformanceInsightsRetentionPeriod: nil,
        ... // 3 ignored and 11 identical fields
  }

kubectl diff:

   creationTimestamp: "2023-06-07T07:47:56Z"
   finalizers:
   - finalizer.managedresource.crossplane.io
-  generation: 35
+  generation: 36
   name: test-internal-dev-aa543a
   resourceVersion: "3558141"
   uid: 8ef0d661-741c-4fed-ac0f-ec3f9d9f9aee
@@ -35,7 +35,7 @@
     enableIAMDatabaseAuthentication: false
     enablePerformanceInsights: false
     engine: sqlserver-ex
-    engineVersion: 15.00.4236.7.v1
+    engineVersion: "15.00"
     finalDBSnapshotIdentifier: test-internal-dev-aa543a
     iops: 3000
     licenseModel: license-included
@@ -51,6 +51,7 @@
     preferredMaintenanceWindow: thu:05:36-thu:06:06
     publiclyAccessible: true
     region: eu-north-1
+    skipFinalSnapshot: false
     storageEncrypted: false
     storageThroughput: 125
     storageType: gp3

How can we reproduce it?

  • Apply yaml and wait until created.
  • Apply again.
---
# Source: wit-server/templates/aws/rds.yaml
apiVersion: rds.aws.crossplane.io/v1alpha1
kind: DBInstance
metadata:
  name: test-internal-dev-aa543a
spec:
  forProvider:
    allocatedStorage: 100
    applyImmediately: true
    autogeneratePassword: true
    autoMinorVersionUpgrade: true
    backupRetentionPeriod: 0
    dbInstanceClass: "db.t3.small"
    deletionProtection: true
    engine: sqlserver-ex
    engineVersion: "15.00"
    dbParameterGroupNameRef:
      name: test-internal-dev-aa543a
    optionGroupName: test-internal-dev-aa543a
    masterUserPasswordSecretRef:
      key: password
      name: rds-master-password
      namespace: test
    publiclyAccessible: true
    dbSubnetGroupName: test-dev
    region: eu-north-1
    skipFinalSnapshot: false
    finalDBSnapshotIdentifier: test-internal-dev-aa543a
    storageEncrypted: false
    storageType: gp3
    masterUsername: wit
    vpcSecurityGroupIDRefs:
      - name: test-internal-dev-rds-aa543a
  writeConnectionSecretToRef:
    name: rds-connection-settings
    namespace: test
---
# Source: wit-server/templates/aws/rds.yaml
apiVersion: rds.aws.crossplane.io/v1alpha1
kind: DBParameterGroup
metadata:
  name: test-internal-dev-aa543a
spec:
  forProvider:
    description: test-internal-dev-aa543a
    dbParameterGroupFamily: "sqlserver-ex-15.0"
    region: eu-north-1
---
# Source: wit-server/templates/aws/rds.yaml
apiVersion: rds.aws.crossplane.io/v1alpha1
kind: OptionGroup
metadata:
  name: test-internal-dev-aa543a
spec:
  forProvider:
    engineName: sqlserver-ex
    majorEngineVersion: "15.00"
    optionGroupDescription: test-internal-dev-aa543a
    region: eu-north-1
---
# Source: wit-server/templates/aws/rds.yaml
apiVersion: ec2.aws.crossplane.io/v1beta1
kind: SecurityGroup
metadata:
  name: test-internal-dev-rds-aa543a
  namespace: test
spec:
  forProvider:
    description: RDS MSSQL for wit-server
    groupName: test-internal-dev-rds-aa543a
    ingress:
      - fromPort: 1433
        ipProtocol: tcp
        ipRanges:
          - cidrIp: 0.0.0.0/0
        toPort: 1433
    region: eu-north-1
    vpcId: vpc-xxxx

What environment did it happen in?

Crossplane version: v1.12.1
aws-provider version: 0.40.0

@okgolove okgolove added the bug Something isn't working label Jun 7, 2023
@MisterMX MisterMX changed the title Modifying DBInstasnce on every apply Modifying DBInstance on every apply Jun 27, 2023
@github-actions
Copy link

Crossplane does not currently have enough maintainers to address every issue and pull request. This issue has been automatically marked as stale because it has had no activity in the last 90 days. It will be closed in 14 days if no further activity occurs. Leaving a comment starting with /fresh will mark this issue as not stale.

@github-actions github-actions bot added the stale label Sep 26, 2023
@okgolove
Copy link
Author

/fresh
not stale

@github-actions github-actions bot removed the stale label Sep 27, 2023
@okgolove
Copy link
Author

I've tried to reproduce it using provider version 0.43.1 and it seems it is not reproduced now. Closing then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant