Skip to content

Commit

Permalink
Configure nsx t1LR in aviinfrasetting
Browse files Browse the repository at this point in the history
  • Loading branch information
chenlin07 committed Oct 23, 2023
1 parent 78f5693 commit baf223e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ func (r *AKODeploymentConfigReconciler) reconcileDelete(

func (r *AKODeploymentConfigReconciler) secretToAKODeploymentConfig(c client.Client, log logr.Logger) handler.MapFunc {
return func(ctx context.Context, o client.Object) []reconcile.Request {
ctx = context.Background()
secret, ok := o.(*corev1.Secret)
if !ok {
log.Error(errors.New("invalid type"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,8 @@ func (r *AKODeploymentConfigReconciler) reconcileAviInfraSetting(
func (r *AKODeploymentConfigReconciler) createAviInfraSetting(adc *akoov1alpha1.AKODeploymentConfig) *akov1beta1.AviInfraSetting {
// ShardVSSize describes ingress shared virtual service size, default value is SMALL
shardSize := "SMALL"
//TODO(chenlin): Get t1LR from akoDeploymentConfig
t1LR := "temp-t1LR"
if adc.Spec.ExtraConfigs.IngressConfigs.ShardVSSize != "" {
shardSize = adc.Spec.ExtraConfigs.IngressConfigs.ShardVSSize
}
Expand Down Expand Up @@ -341,6 +343,9 @@ func (r *AKODeploymentConfigReconciler) createAviInfraSetting(adc *akoov1alpha1.
L7Settings: akov1beta1.AviInfraL7Settings{
ShardSize: shardSize,
},
NSXSettings: akov1beta1.AviInfraNSXSettings{
T1LR: &t1LR,
},
},
}
}
Expand Down
1 change: 1 addition & 0 deletions controllers/cluster/cluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ func (r *ClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_
// resources to the cluster
func (r *ClusterReconciler) serviceToCluster(c client.Client, log logr.Logger) handler.MapFunc {
return func(ctx context.Context, o client.Object) []reconcile.Request {
ctx = context.Background()
service, ok := o.(*corev1.Service)
if !ok {
log.Error(errors.New("invalid type"),
Expand Down
1 change: 1 addition & 0 deletions pkg/handlers/cluster_for_akodeploymentconfig_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
// resources to the AkoDeploymentConfig of this cluster
func AkoDeploymentConfigForCluster(c client.Client, log logr.Logger) handler.MapFunc {
return func(ctx context.Context, o client.Object) []reconcile.Request {
ctx = context.Background()
cluster, ok := o.(*clusterv1.Cluster)
if !ok {
log.Error(errors.New("invalid type"),
Expand Down
2 changes: 1 addition & 1 deletion pkg/handlers/cluster_for_machine_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
func MachinesForCluster(c client.Client, log logr.Logger) handler.MapFunc {

return func(ctx context.Context, o client.Object) []reconcile.Request {

ctx = context.Background()
cluster, ok := o.(*clusterv1.Cluster)
if !ok {
log.Error(errors.New("invalid type"),
Expand Down

0 comments on commit baf223e

Please sign in to comment.