Skip to content

Commit

Permalink
Merge pull request #464 from pych/sentinel-extra-volumes
Browse files Browse the repository at this point in the history
[Missed]Sentinel extra volumes
  • Loading branch information
ese authored Sep 6, 2022
2 parents 8992fae + 1b34773 commit f9e32ba
Show file tree
Hide file tree
Showing 6 changed files with 1,839 additions and 74 deletions.
29 changes: 25 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,23 +170,44 @@ If the user choose to have extra volumes creates and mounted, he could use the `
- Secrets that sidecars might use to backup of RDBs
- Extra users and their secrets and acls that could used the initContainers to create multiple users
- Extra Configurations that could merge on top the existing configurations
- To pass failover scripts for addition for additional operations

```
---
apiVersion: v1
kind: Secret
metadata:
name: foo
namespace: exm
type: Opaque
stringData:
password: MWYyZDFlMmU2N2Rm
---
apiVersion: databases.spotahome.com/v1
kind: RedisFailover
metadata:
name: redisfailover
name: foo
namespace: exm
spec:
sentinel:
replicas: 3
extraVolumes:
- name: foo
secret:
secretName: foo
optional: false
extraVolumeMounts:
- name: foo
mountPath: "/etc/foo"
readOnly: true
redis:
replicas: 3
extraVolumes:
- name: foo_user
- name: foo
secret:
secretName: mysecret
secretName: foo
optional: false
exraVolumeMounts:
extraVolumeMounts:
- name: foo
mountPath: "/etc/foo"
readOnly: true
Expand Down
2 changes: 2 additions & 0 deletions api/redisfailover/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ type SentinelSettings struct {
DNSPolicy corev1.DNSPolicy `json:"dnsPolicy,omitempty"`
PriorityClassName string `json:"priorityClassName,omitempty"`
ServiceAccountName string `json:"serviceAccountName,omitempty"`
ExtraVolumes []corev1.Volume `json:"extraVolumes,omitempty"`
ExtraVolumeMounts []corev1.VolumeMount `json:"extraVolumeMounts,omitempty"`
}

// AuthSettings contains settings about auth
Expand Down
14 changes: 14 additions & 0 deletions api/redisfailover/v1/zz_generated.deepcopy.go

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

9 changes: 9 additions & 0 deletions example/redisfailover/extravolumes-mounts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ metadata:
spec:
sentinel:
replicas: 3
extraVolumes:
- name: foo
secret:
secretName: foo
optional: false
extraVolumeMounts:
- name: foo
mountPath: "/etc/foo"
readOnly: true
redis:
replicas: 3
extraVolumes:
Expand Down
Loading

0 comments on commit f9e32ba

Please sign in to comment.