Skip to content

Commit

Permalink
feat: add redis configuration for ledger v1 in operator (#501)
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-nicolas authored Aug 28, 2023
1 parent 11b81d1 commit 09bb1e7
Show file tree
Hide file tree
Showing 168 changed files with 444 additions and 326 deletions.
11 changes: 11 additions & 0 deletions components/operator/apis/stack/v1beta3/ledger_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,21 @@ type LockingStrategyRedisConfig struct {
Retry time.Duration `json:"retry,omitempty"`
}

type LockingStrategy struct {
// +kubebuilder:Enum:={memory,redis}
// +kubebuilder:default:=memory
// +optional
Strategy string `json:"strategy,omitempty"`
// +optional
Redis *LockingStrategyRedisConfig `json:"redis"`
}

// +kubebuilder:object:generate=true
type LedgerSpec struct {
Postgres PostgresConfig `json:"postgres"`
// +optional
Locking LockingStrategy `json:"locking"`
// +optional
AllowPastTimestamps bool `json:"allowPastTimestamps"`
// +optional
DevProperties `json:",inline"`
Expand Down
21 changes: 21 additions & 0 deletions components/operator/apis/stack/v1beta3/zz_generated.deepcopy.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -4316,6 +4316,35 @@ spec:
type: boolean
dev:
type: boolean
locking:
properties:
redis:
properties:
duration:
description: A Duration represents the elapsed time
between two instants as an int64 nanosecond count.
The representation limits the largest representable
duration to approximately 290 years.
format: int64
type: integer
insecure:
type: boolean
retry:
description: A Duration represents the elapsed time
between two instants as an int64 nanosecond count.
The representation limits the largest representable
duration to approximately 290 years.
format: int64
type: integer
tls:
type: boolean
uri:
type: string
type: object
strategy:
default: memory
type: string
type: object
postgres:
properties:
disableSSLMode:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4327,6 +4327,35 @@ spec:
type: boolean
dev:
type: boolean
locking:
properties:
redis:
properties:
duration:
description: A Duration represents the elapsed time
between two instants as an int64 nanosecond count.
The representation limits the largest representable
duration to approximately 290 years.
format: int64
type: integer
insecure:
type: boolean
retry:
description: A Duration represents the elapsed time
between two instants as an int64 nanosecond count.
The representation limits the largest representable
duration to approximately 290 years.
format: int64
type: integer
tls:
type: boolean
uri:
type: string
type: object
strategy:
default: memory
type: string
type: object
postgres:
properties:
disableSSLMode:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -759,8 +759,8 @@ spec:
name: search-benthos-templates
status:
conditions:
- lastTransitionTime: "2023-08-11T09:21:34Z"
lastUpdateTime: "2023-08-11T09:21:34Z"
- lastTransitionTime: "2023-08-26T12:19:18Z"
lastUpdateTime: "2023-08-26T12:19:18Z"
status: "True"
type: Available
observedGeneration: 1
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ metadata:
name: auth
namespace: monopod-disabled-one-service
spec:
clusterIP: 10.0.0.150
clusterIP: 10.0.0.116
clusterIPs:
- 10.0.0.150
- 10.0.0.116
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ metadata:
name: control
namespace: monopod-disabled-one-service
spec:
clusterIP: 10.0.0.192
clusterIP: 10.0.0.216
clusterIPs:
- 10.0.0.192
- 10.0.0.216
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ metadata:
name: gateway
namespace: monopod-disabled-one-service
spec:
clusterIP: 10.0.0.175
clusterIP: 10.0.0.56
clusterIPs:
- 10.0.0.175
- 10.0.0.56
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ metadata:
name: payments
namespace: monopod-disabled-one-service
spec:
clusterIP: 10.0.0.165
clusterIP: 10.0.0.68
clusterIPs:
- 10.0.0.165
- 10.0.0.68
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ metadata:
name: search-benthos
namespace: monopod-disabled-one-service
spec:
clusterIP: 10.0.0.208
clusterIP: 10.0.0.219
clusterIPs:
- 10.0.0.208
- 10.0.0.219
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ metadata:
name: search
namespace: monopod-disabled-one-service
spec:
clusterIP: 10.0.0.20
clusterIP: 10.0.0.212
clusterIPs:
- 10.0.0.20
- 10.0.0.212
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ metadata:
name: stargate
namespace: monopod-disabled-one-service
spec:
clusterIP: 10.0.0.216
clusterIP: 10.0.0.161
clusterIPs:
- 10.0.0.216
- 10.0.0.161
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ metadata:
name: wallets
namespace: monopod-disabled-one-service
spec:
clusterIP: 10.0.0.145
clusterIP: 10.0.0.54
clusterIPs:
- 10.0.0.145
- 10.0.0.54
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ metadata:
name: webhooks
namespace: monopod-disabled-one-service
spec:
clusterIP: 10.0.0.120
clusterIP: 10.0.0.23
clusterIPs:
- 10.0.0.120
- 10.0.0.23
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -977,8 +977,8 @@ spec:
name: search-benthos-templates
status:
conditions:
- lastTransitionTime: "2023-08-11T09:21:35Z"
lastUpdateTime: "2023-08-11T09:21:35Z"
- lastTransitionTime: "2023-08-26T12:19:18Z"
lastUpdateTime: "2023-08-26T12:19:18Z"
status: "True"
type: Available
observedGeneration: 1
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ metadata:
name: auth
namespace: monopod-latest
spec:
clusterIP: 10.0.0.12
clusterIP: 10.0.0.112
clusterIPs:
- 10.0.0.12
- 10.0.0.112
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ metadata:
name: control
namespace: monopod-latest
spec:
clusterIP: 10.0.0.196
clusterIP: 10.0.0.107
clusterIPs:
- 10.0.0.196
- 10.0.0.107
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ metadata:
name: gateway
namespace: monopod-latest
spec:
clusterIP: 10.0.0.32
clusterIP: 10.0.0.86
clusterIPs:
- 10.0.0.32
- 10.0.0.86
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ metadata:
name: ledger
namespace: monopod-latest
spec:
clusterIP: 10.0.0.148
clusterIP: 10.0.0.122
clusterIPs:
- 10.0.0.148
- 10.0.0.122
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ metadata:
name: orchestration
namespace: monopod-latest
spec:
clusterIP: 10.0.0.111
clusterIP: 10.0.0.61
clusterIPs:
- 10.0.0.111
- 10.0.0.61
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ metadata:
name: payments
namespace: monopod-latest
spec:
clusterIP: 10.0.0.128
clusterIP: 10.0.0.104
clusterIPs:
- 10.0.0.128
- 10.0.0.104
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ metadata:
name: search-benthos
namespace: monopod-latest
spec:
clusterIP: 10.0.0.213
clusterIP: 10.0.0.227
clusterIPs:
- 10.0.0.213
- 10.0.0.227
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ metadata:
name: search
namespace: monopod-latest
spec:
clusterIP: 10.0.0.206
clusterIP: 10.0.0.192
clusterIPs:
- 10.0.0.206
- 10.0.0.192
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ metadata:
name: stargate
namespace: monopod-latest
spec:
clusterIP: 10.0.0.151
clusterIP: 10.0.0.10
clusterIPs:
- 10.0.0.151
- 10.0.0.10
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ metadata:
name: wallets
namespace: monopod-latest
spec:
clusterIP: 10.0.0.94
clusterIP: 10.0.0.220
clusterIPs:
- 10.0.0.94
- 10.0.0.220
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ metadata:
name: webhooks
namespace: monopod-latest
spec:
clusterIP: 10.0.0.167
clusterIP: 10.0.0.62
clusterIPs:
- 10.0.0.167
- 10.0.0.62
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
Expand Down
Loading

1 comment on commit 09bb1e7

@vercel
Copy link

@vercel vercel bot commented on 09bb1e7 Aug 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.