Skip to content

Commit f6db0e0

Browse files
committed
feat: ipam support additional pools
1 parent b38a260 commit f6db0e0

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

cmd/ipam/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func main() {
7474
"The interval at which the IPAM will synchronize the IPAM storage.")
7575
cmd.Flags().BoolVar(&options.ServerOpts.GraphvizEnabled, "enable-graphviz", false, "Enable the graphviz output for the IPAM.")
7676
cmd.Flags().StringSliceVar(&options.ServerOpts.Pools, "pools",
77-
[]string{"10.0.0.0/8", "192.168.0.0/16", "172.16.0.0/12"}, "The pools used by the IPAM.",
77+
[]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.",
7878
)
7979

8080
// Leader election flags.

deployments/liqo/templates/liqo-ipam-deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ spec:
5656
- --leader-election
5757
- --leader-election-namespace=$(POD_NAMESPACE)
5858
{{- end }}
59+
{{- if .Values.ipam.additionalPools }}
60+
{{- $d := dict "commandName" "--additional-pools" "list" .Values.ipam.additionalPools }}
61+
{{- include "liqo.concatenateList" $d | nindent 12 }}
62+
{{- end }}
5963
{{- if .Values.common.extraArgs }}
6064
{{- toYaml .Values.common.extraArgs | nindent 12 }}
6165
{{- end }}

pkg/ipam/initialize.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ func (lipam *LiqoIPAM) initialize(ctx context.Context) error {
2929
defer lipam.mutex.Unlock()
3030
klog.Info("Initializing IPAM")
3131

32+
klog.Infof("IPAM pools: %v", lipam.opts.Pools)
33+
3234
if err := lipam.initializeNetworks(ctx); err != nil {
3335
return err
3436
}

0 commit comments

Comments
 (0)