Skip to content

Commit

Permalink
EVEREST-1145 | Add EKS NLB annotations for PSMDB and PG (#420)
Browse files Browse the repository at this point in the history
  • Loading branch information
mayankshah1607 authored Jun 12, 2024
1 parent a97f77e commit cf15a7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions controllers/providers/pg/applier.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ func (p *applier) Proxy() error {
Type: string(corev1.ServiceTypeLoadBalancer),
LoadBalancerSourceRanges: p.DB.Spec.Proxy.Expose.IPSourceRangesStringArray(),
}
if annotations, ok := common.ExposeAnnotationsMap[p.clusterType]; ok {
pg.Spec.Proxy.PGBouncer.ServiceExpose.Metadata.Annotations = annotations
}
default:
return fmt.Errorf("invalid expose type %s", database.Spec.Proxy.Expose.Type)
}
Expand Down
3 changes: 3 additions & 0 deletions controllers/providers/psmdb/applier.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ func (p *applier) Proxy() error {
psmdb.Spec.Replsets[0].Expose.Enabled = true
psmdb.Spec.Replsets[0].Expose.ExposeType = corev1.ServiceTypeLoadBalancer
psmdb.Spec.Replsets[0].Expose.LoadBalancerSourceRanges = database.Spec.Proxy.Expose.IPSourceRangesStringArray()
if annotations, ok := common.ExposeAnnotationsMap[p.clusterType]; ok {
psmdb.Spec.Replsets[0].Expose.ServiceAnnotations = annotations
}
default:
return fmt.Errorf("invalid expose type %s", database.Spec.Proxy.Expose.Type)
}
Expand Down

0 comments on commit cf15a7e

Please sign in to comment.