Skip to content

Commit da53f27

Browse files
authored
Expose GRPC port for peer service (#33)
1 parent 492818e commit da53f27

3 files changed

Lines changed: 10 additions & 0 deletions

File tree

internal/controller/asset_controller.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,14 @@ func (r *AssetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl
6767
r.Context = ctx
6868
r.NamespacedName = req.NamespacedName
6969
asset := teranodev1alpha1.Asset{}
70+
7071
if err := r.Get(ctx, req.NamespacedName, &asset); err != nil {
7172
r.Log.Error(err, "unable to fetch asset CR")
7273
return result, nil
7374
}
7475

76+
r.Log.Info("reconciling asset", "cluster", asset.Name)
77+
7578
_, err := utils.ReconcileBatch(r.Log,
7679
r.ReconcileDeployment,
7780
r.ReconcileService,

internal/controller/constants.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ const (
3737
MinerHTTPPort = 8092
3838
PeerPort = 9905
3939
PeerLegacyPort = 8333
40+
PeerGRPCPort = 9904
4041
PeerHTTPPort = 9906
4142
PropagationGRPCPort = 8084
4243
PropagationHTTPPort = 8833

internal/controller/peer_service.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ func defaultPeerServiceSpec() *corev1.ServiceSpec {
6767
TargetPort: intstr.FromInt32(PeerLegacyPort),
6868
Protocol: corev1.ProtocolTCP,
6969
},
70+
{
71+
Name: "grpc",
72+
Port: int32(PeerGRPCPort),
73+
TargetPort: intstr.FromInt32(PeerGRPCPort),
74+
Protocol: corev1.ProtocolTCP,
75+
},
7076
{
7177
Name: "delve",
7278
Port: int32(DebuggerPort),

0 commit comments

Comments
 (0)