-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removing GATEWAY_PRIVATE_IP parameter from the LIQO install script
Route-operator gets the configuration from the clusterconfig.policy.liqo.io CRD
- Loading branch information
Showing
15 changed files
with
83 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package controllers | ||
|
||
import ( | ||
policyv1 "github.com/liqoTech/liqo/api/cluster-config/v1" | ||
"github.com/liqoTech/liqo/pkg/clusterConfig" | ||
"github.com/liqoTech/liqo/pkg/crdClient" | ||
"k8s.io/apimachinery/pkg/runtime/schema" | ||
"k8s.io/client-go/kubernetes/scheme" | ||
"k8s.io/client-go/rest" | ||
"k8s.io/klog/v2" | ||
"os" | ||
) | ||
|
||
func (r *RouteController) WatchConfiguration(config *rest.Config, gv *schema.GroupVersion) { | ||
config.ContentConfig.GroupVersion = gv | ||
config.APIPath = "/apis" | ||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() | ||
config.UserAgent = rest.DefaultKubernetesUserAgent() | ||
CRDclient, err := crdClient.NewFromConfig(config) | ||
if err != nil { | ||
klog.Error(err, err.Error()) | ||
os.Exit(1) | ||
} | ||
go clusterConfig.WatchConfiguration(func(configuration *policyv1.ClusterConfig) { | ||
if !r.IsConfigured { | ||
r.ClusterPodCIDR = configuration.Spec.LiqonetConfig.PodCIDR | ||
r.Configured <- true | ||
} | ||
//check if the podCIDR is different from the one on the cluster config | ||
//TODO: a go routine which removes all the configuration with the old podCIDR and triggers a new configuration for the new podCIDR | ||
if r.ClusterPodCIDR != configuration.Spec.LiqonetConfig.PodCIDR { | ||
r.ClusterPodCIDR = configuration.Spec.LiqonetConfig.PodCIDR | ||
} | ||
}, CRDclient, "") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters