Skip to content

Commit

Permalink
feat: option to enable/disable AOF
Browse files Browse the repository at this point in the history
  • Loading branch information
Hunter Thompson committed Dec 15, 2021
1 parent ea264b8 commit a5fcf73
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
13 changes: 13 additions & 0 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -31784,6 +31784,19 @@ The size of volume to use.

---

##### `enableAof`<sup>Optional</sup> <a name="cdk8s-redis-cluster.RedisOptions.property.enableAof"></a>

```typescript
public readonly enableAof: string;
```

- *Type:* `string`
- *Default:* yes

Enable AOF.

---

##### `namespace`<sup>Optional</sup> <a name="cdk8s-redis-cluster.RedisOptions.property.namespace"></a>

```typescript
Expand Down
7 changes: 6 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ export interface RedisOptions {
* @default undefined
*/
readonly redisConfig?: string[];
/**
* Enable AOF
* @default yes
*/
readonly enableAof?: string;
}

export class Redis extends Construct {
Expand Down Expand Up @@ -334,7 +339,7 @@ export class Redis extends Construct {
},
{
name: 'REDIS_AOF_ENABLED',
value: 'yes',
value: opts?.enableAof ? opts.enableAof : 'yes',
},
{
name: 'REDIS_TLS_ENABLED',
Expand Down
2 changes: 1 addition & 1 deletion test/__snapshots__/hello.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions test/hello.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ test('with values', () => {
volumeIopsPerGb: '100',
redisImage: 'test-image',
redisPassword: 'test2',
enableAof: 'no',
nodeSelector: {
test: 'test',
},
Expand Down

0 comments on commit a5fcf73

Please sign in to comment.