Skip to content

Commit

Permalink
chore: Merge branch 'main' into releases/v2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyrag committed May 2, 2024
2 parents 3c2d57c + f97c1cc commit d2da650
Show file tree
Hide file tree
Showing 83 changed files with 1,725 additions and 539 deletions.
14 changes: 9 additions & 5 deletions components/ledger/internal/api/v2/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,17 @@ func getFiltersForVolumes(r *http.Request) (*ledgerstore.FiltersForVolumes, erro
}

func getQueryBuilder(r *http.Request) (query.Builder, error) {
data, err := io.ReadAll(r.Body)
if err != nil {
return nil, err
q := r.URL.Query().Get("query")
if q == "" {
data, err := io.ReadAll(r.Body)
if err != nil {
return nil, err
}
q = string(data)
}

if len(data) > 0 {
return query.ParseJSON(string(data))
if len(q) > 0 {
return query.ParseJSON(q)
}
return nil, nil
}
Expand Down
1 change: 1 addition & 0 deletions components/operator/api/formance.com/v1beta1/auth_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ type AuthStatus struct {
//+kubebuilder:printcolumn:name="Stack",type=string,JSONPath=".spec.stack",description="Stack"
//+kubebuilder:printcolumn:name="Ready",type=string,JSONPath=".status.ready",description="Is ready"
//+kubebuilder:printcolumn:name="Info",type=string,JSONPath=".status.info",description="Info"
//+kubebuilder:metadata:labels=formance.com/kind=module

// Auth is the Schema for the auths API
type Auth struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ type GatewayStatus struct {
//+kubebuilder:printcolumn:name="Auth enabled",type=string,JSONPath=".status.authEnabled",description="Is authentication enabled"
//+kubebuilder:printcolumn:name="Ready",type=string,JSONPath=".status.ready",description="Is ready"
//+kubebuilder:printcolumn:name="Info",type=string,JSONPath=".status.info",description="Info"
//+kubebuilder:metadata:labels=formance.com/kind=module

// Gateway is the Schema for the gateways API
type Gateway struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ type LedgerStatus struct {
//+kubebuilder:printcolumn:name="Stack",type=string,JSONPath=".spec.stack",description="Stack"
//+kubebuilder:printcolumn:name="Ready",type=string,JSONPath=".status.ready",description="Is ready"
//+kubebuilder:printcolumn:name="Info",type=string,JSONPath=".status.info",description="Info"
//+kubebuilder:metadata:labels=formance.com/kind=module

// Ledger is the Schema for the ledgers API
type Ledger struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ type OrchestrationStatus struct {
TemporalURI *URI `json:"temporalURI,omitempty"`
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:resource:scope=Cluster
//+kubebuilder:printcolumn:name="Stack",type=string,JSONPath=".spec.stack",description="Stack"
//+kubebuilder:printcolumn:name="Ready",type=string,JSONPath=".status.ready",description="Is ready"
//+kubebuilder:printcolumn:name="Info",type=string,JSONPath=".status.info",description="Info"

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Cluster
// +kubebuilder:printcolumn:name="Stack",type=string,JSONPath=".spec.stack",description="Stack"
// +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=".status.ready",description="Is ready"
// +kubebuilder:printcolumn:name="Info",type=string,JSONPath=".status.info",description="Info"
// +kubebuilder:metadata:labels=formance.com/kind=module
// Orchestration is the Schema for the orchestrations API
type Orchestration struct {
metav1.TypeMeta `json:",inline"`
Expand Down
14 changes: 7 additions & 7 deletions components/operator/api/formance.com/v1beta1/payments_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ type PaymentsStatus struct {
ModuleStatus `json:",inline"`
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:resource:scope=Cluster
//+kubebuilder:printcolumn:name="Stack",type=string,JSONPath=".spec.stack",description="Stack"
//+kubebuilder:printcolumn:name="Ready",type=string,JSONPath=".status.ready",description="Is ready"
//+kubebuilder:printcolumn:name="Info",type=string,JSONPath=".status.info",description="Info"

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Cluster
// +kubebuilder:printcolumn:name="Stack",type=string,JSONPath=".spec.stack",description="Stack"
// +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=".status.ready",description="Is ready"
// +kubebuilder:printcolumn:name="Info",type=string,JSONPath=".status.info",description="Info"
// +kubebuilder:metadata:labels=formance.com/kind=module
// Payments is the Schema for the payments API
type Payments struct {
metav1.TypeMeta `json:",inline"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ type ReconciliationStatus struct {
ModuleStatus `json:",inline"`
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:resource:scope=Cluster
//+kubebuilder:printcolumn:name="Stack",type=string,JSONPath=".spec.stack",description="Stack"
//+kubebuilder:printcolumn:name="Ready",type=string,JSONPath=".status.ready",description="Is ready"
//+kubebuilder:printcolumn:name="Info",type=string,JSONPath=".status.info",description="Info"

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Cluster
// +kubebuilder:printcolumn:name="Stack",type=string,JSONPath=".spec.stack",description="Stack"
// +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=".status.ready",description="Is ready"
// +kubebuilder:printcolumn:name="Info",type=string,JSONPath=".status.info",description="Info"
// +kubebuilder:metadata:labels=formance.com/kind=module
// Reconciliation is the Schema for the reconciliations API
type Reconciliation struct {
metav1.TypeMeta `json:",inline"`
Expand Down
14 changes: 7 additions & 7 deletions components/operator/api/formance.com/v1beta1/search_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ type SearchStatus struct {
TopicCleaned bool `json:"topicCleaned,omitempty"`
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:resource:scope=Cluster
//+kubebuilder:printcolumn:name="Stack",type=string,JSONPath=".spec.stack",description="Stack"
//+kubebuilder:printcolumn:name="Ready",type=string,JSONPath=".status.ready",description="Is ready"
//+kubebuilder:printcolumn:name="Info",type=string,JSONPath=".status.info",description="Info"

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Cluster
// +kubebuilder:printcolumn:name="Stack",type=string,JSONPath=".spec.stack",description="Stack"
// +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=".status.ready",description="Is ready"
// +kubebuilder:printcolumn:name="Info",type=string,JSONPath=".status.info",description="Info"
// +kubebuilder:metadata:labels=formance.com/kind=module
// Search is the Schema for the searches API
type Search struct {
metav1.TypeMeta `json:",inline"`
Expand Down
14 changes: 7 additions & 7 deletions components/operator/api/formance.com/v1beta1/stargate_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ type StargateStatus struct {
ModuleStatus `json:",inline"`
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:resource:scope=Cluster
//+kubebuilder:printcolumn:name="Stack",type=string,JSONPath=".spec.stack",description="Stack"
//+kubebuilder:printcolumn:name="Ready",type=string,JSONPath=".status.ready",description="Is ready"
//+kubebuilder:printcolumn:name="Info",type=string,JSONPath=".status.info",description="Info"

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Cluster
// +kubebuilder:printcolumn:name="Stack",type=string,JSONPath=".spec.stack",description="Stack"
// +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=".status.ready",description="Is ready"
// +kubebuilder:printcolumn:name="Info",type=string,JSONPath=".status.info",description="Info"
// +kubebuilder:metadata:labels=formance.com/kind=module
// Stargate is the Schema for the stargates API
type Stargate struct {
metav1.TypeMeta `json:",inline"`
Expand Down
14 changes: 7 additions & 7 deletions components/operator/api/formance.com/v1beta1/wallets_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ type WalletsStatus struct {
ModuleStatus `json:",inline"`
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:resource:scope=Cluster
//+kubebuilder:printcolumn:name="Stack",type=string,JSONPath=".spec.stack",description="Stack"
//+kubebuilder:printcolumn:name="Ready",type=string,JSONPath=".status.ready",description="Is ready"
//+kubebuilder:printcolumn:name="Info",type=string,JSONPath=".status.info",description="Info"

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Cluster
// +kubebuilder:printcolumn:name="Stack",type=string,JSONPath=".spec.stack",description="Stack"
// +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=".status.ready",description="Is ready"
// +kubebuilder:printcolumn:name="Info",type=string,JSONPath=".status.info",description="Info"
// +kubebuilder:metadata:labels=formance.com/kind=module
// Wallets is the Schema for the wallets API
type Wallets struct {
metav1.TypeMeta `json:",inline"`
Expand Down
14 changes: 7 additions & 7 deletions components/operator/api/formance.com/v1beta1/webhooks_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ type WebhooksStatus struct {
ModuleStatus `json:",inline"`
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:resource:scope=Cluster
//+kubebuilder:printcolumn:name="Stack",type=string,JSONPath=".spec.stack",description="Stack"
//+kubebuilder:printcolumn:name="Ready",type=string,JSONPath=".status.ready",description="Is ready"
//+kubebuilder:printcolumn:name="Info",type=string,JSONPath=".status.info",description="Info"

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Cluster
// +kubebuilder:printcolumn:name="Stack",type=string,JSONPath=".spec.stack",description="Stack"
// +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=".status.ready",description="Is ready"
// +kubebuilder:printcolumn:name="Info",type=string,JSONPath=".status.info",description="Info"
// +kubebuilder:metadata:labels=formance.com/kind=module
// Webhooks is the Schema for the webhooks API
type Webhooks struct {
metav1.TypeMeta `json:",inline"`
Expand Down
2 changes: 2 additions & 0 deletions components/operator/config/crd/bases/formance.com_auths.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
formance.com/kind: module
name: auths.formance.com
spec:
group: formance.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
formance.com/kind: module
name: gateways.formance.com
spec:
group: formance.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
formance.com/kind: module
name: ledgers.formance.com
spec:
group: formance.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
formance.com/kind: module
name: orchestrations.formance.com
spec:
group: formance.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
formance.com/kind: module
name: payments.formance.com
spec:
group: formance.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
formance.com/kind: module
name: reconciliations.formance.com
spec:
group: formance.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
formance.com/kind: module
name: searches.formance.com
spec:
group: formance.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
formance.com/kind: module
name: stargates.formance.com
spec:
group: formance.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
formance.com/kind: module
name: wallets.formance.com
spec:
group: formance.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
formance.com/kind: module
name: webhooks.formance.com
spec:
group: formance.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
formance.com/kind: module
name: auths.formance.com
spec:
group: formance.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
formance.com/kind: module
name: gateways.formance.com
spec:
group: formance.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
formance.com/kind: module
name: ledgers.formance.com
spec:
group: formance.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
formance.com/kind: module
name: orchestrations.formance.com
spec:
group: formance.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
formance.com/kind: module
name: payments.formance.com
spec:
group: formance.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
formance.com/kind: module
name: reconciliations.formance.com
spec:
group: formance.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
formance.com/kind: module
name: searches.formance.com
spec:
group: formance.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
formance.com/kind: module
name: stargates.formance.com
spec:
group: formance.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
formance.com/kind: module
name: wallets.formance.com
spec:
group: formance.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
formance.com/kind: module
name: webhooks.formance.com
spec:
group: formance.com
Expand Down
4 changes: 2 additions & 2 deletions components/operator/internal/core/volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ func NewVolumeFromConfigMap(name string, configMap *corev1.ConfigMap) corev1.Vol
}
}

func NewVolumeMount(name, mountPath string) corev1.VolumeMount {
func NewVolumeMount(name, mountPath string, readOnly bool) corev1.VolumeMount {
return corev1.VolumeMount{
Name: name,
ReadOnly: true,
ReadOnly: readOnly,
MountPath: mountPath,
}
}
2 changes: 1 addition & 1 deletion components/operator/internal/resources/auths/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func createDeployment(ctx Context, stack *v1beta1.Stack, auth *v1beta1.Auth, dat
Env: env,
Image: image,
VolumeMounts: []corev1.VolumeMount{
NewVolumeMount("config", "/config"),
NewVolumeMount("config", "/config", true),
},
Ports: []corev1.ContainerPort{deployments.StandardHTTPPort()},
LivenessProbe: deployments.DefaultLiveness("http"),
Expand Down
Loading

0 comments on commit d2da650

Please sign in to comment.