Skip to content

Commit

Permalink
feat: ipam support additional pools
Browse files Browse the repository at this point in the history
  • Loading branch information
fra98 committed Dec 2, 2024
1 parent b38a260 commit f6db0e0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/ipam/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func main() {
"The interval at which the IPAM will synchronize the IPAM storage.")
cmd.Flags().BoolVar(&options.ServerOpts.GraphvizEnabled, "enable-graphviz", false, "Enable the graphviz output for the IPAM.")
cmd.Flags().StringSliceVar(&options.ServerOpts.Pools, "pools",
[]string{"10.0.0.0/8", "192.168.0.0/16", "172.16.0.0/12"}, "The pools used by the IPAM.",
[]string{"10.0.0.0/8", "192.168.0.0/16", "172.16.0.0/12"}, "The pools used by the IPAM to acquire Networks and IPs from.",
)

// Leader election flags.
Expand Down
4 changes: 4 additions & 0 deletions deployments/liqo/templates/liqo-ipam-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ spec:
- --leader-election
- --leader-election-namespace=$(POD_NAMESPACE)
{{- end }}
{{- if .Values.ipam.additionalPools }}
{{- $d := dict "commandName" "--additional-pools" "list" .Values.ipam.additionalPools }}
{{- include "liqo.concatenateList" $d | nindent 12 }}
{{- end }}
{{- if .Values.common.extraArgs }}
{{- toYaml .Values.common.extraArgs | nindent 12 }}
{{- end }}
Expand Down
2 changes: 2 additions & 0 deletions pkg/ipam/initialize.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ func (lipam *LiqoIPAM) initialize(ctx context.Context) error {
defer lipam.mutex.Unlock()
klog.Info("Initializing IPAM")

klog.Infof("IPAM pools: %v", lipam.opts.Pools)

if err := lipam.initializeNetworks(ctx); err != nil {
return err
}
Expand Down

0 comments on commit f6db0e0

Please sign in to comment.