Skip to content

Commit

Permalink
fix: modify operator adapt new cluster
Browse files Browse the repository at this point in the history
Signed-off-by: ONE7live <[email protected]>
  • Loading branch information
ONE7live committed Nov 1, 2023
1 parent 8e559f3 commit 929c1c4
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions pkg/clusterlink/operator/addons/option/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ import (
// AddonOption for cluster
type AddonOption struct {
clusterlinkv1alpha1.Cluster

Version string
UseProxy bool

KubeClientSet *kubernetes.Clientset
ControlPanelKubeConfig *clientcmdapi.Config
Version string
UseProxy bool
}

func (o *AddonOption) buildClusterConfig(opts *cmdOptions.Options) error {
Expand All @@ -42,20 +44,20 @@ func (o *AddonOption) buildClusterConfig(opts *cmdOptions.Options) error {
return nil
}

// preparation for option
// Complete preparation for option
func (o *AddonOption) Complete(opts *cmdOptions.Options) error {
return o.buildClusterConfig(opts)
}

// return spec.namespace
// GetSpecNamespace return spec.namespace
func (o *AddonOption) GetSpecNamespace() string {
return o.Spec.Namespace
}

func (o *AddonOption) GetImageRepository() string {
return o.Spec.ImageRepository
return o.Spec.ClusterLinkOptions.ImageRepository
}

func (o *AddonOption) GetIPFamily() string {
return string(o.Spec.IPFamily)
return string(o.Spec.ClusterLinkOptions.IPFamily)
}

0 comments on commit 929c1c4

Please sign in to comment.