Skip to content

Commit

Permalink
fix(redis): remove REDIS_CA_CERT secret key
Browse files Browse the repository at this point in the history
  • Loading branch information
byashimov committed May 7, 2024
1 parent 779d980 commit 709d51a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Fix `ServiceIntegration` deletion when instance has no id set
- Change `Kafka` field `userConfig.kafka_version`: enum ~~`[3.4, 3.5, 3.6]`~~`[3.4, 3.5, 3.6, 3.7]`
- Add `ServiceIntegration` `flink_external_postgresql` type
- Remove `REDIS_CA_CERT` secret key. Can't be used with the service type

## v0.19.0 - 2024-04-18

Expand Down
6 changes: 6 additions & 0 deletions controllers/generic_service_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,12 @@ func (h *genericServiceHandler) get(ctx context.Context, avn *aiven.Client, avnG
return secret, err
}

// Redis shouldn't expose CA_CERT
// It can't be used to connect to redis
if o.getServiceType() == "redis" {
return secret, nil
}

cert, err := avnGen.ProjectKmsGetCA(ctx, spec.Project)
if err != nil {
return nil, fmt.Errorf("cannot retrieve project CA certificate: %w", err)
Expand Down
1 change: 0 additions & 1 deletion tests/redis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,4 @@ func TestRedis(t *testing.T) {
assert.NotEmpty(t, secret.Data["REDIS_PORT"])
assert.NotEmpty(t, secret.Data["REDIS_USER"])
assert.NotEmpty(t, secret.Data["REDIS_PASSWORD"])
assert.NotEmpty(t, secret.Data["REDIS_CA_CERT"])
}

0 comments on commit 709d51a

Please sign in to comment.