Skip to content

Commit

Permalink
style: Reorganize parameters struct to enhance readability.
Browse files Browse the repository at this point in the history
The code in the install.go file has been rearranged. Helm properties such as
'HelmRepository' and 'HelmReleaseName' have been moved to the top for better visibility,
while 'ListVersions' and 'NodesWithoutCilium' have been moved to the bottom.
The aim was to enhance code readability and organization.

Signed-off-by: Matthew Hembree <[email protected]>
  • Loading branch information
matthewhembree authored and tklauser committed Mar 26, 2024
1 parent a0ab9f6 commit e63351f
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ type Parameters struct {
// Useful to test from upstream where a helm release is not available yet.
HelmChartDirectory string

// HelmRepository specifies the Helm repository to download Cilium Helm charts from.
HelmRepository string

// HelmReleaseName specifies the Helm release name for the Cilium CLI.
// Useful for referencing Cilium installations installed directly through Helm
// or overriding the Cilium CLI for install/upgrade/enable.
HelmReleaseName string

// HelmOpts are all the options the user used to pass into the Cilium cli
// template.
HelmOpts values.Options
Expand All @@ -114,12 +122,6 @@ type Parameters struct {
// specified by other flags. This options take precedence over the HelmResetValues option.
HelmReuseValues bool

// ListVersions lists all the available versions for install without actually installing.
ListVersions bool

// NodesWithoutCilium enables the affinities to avoid scheduling Cilium components on nodes labeled with cilium.io/no-schedule
NodesWithoutCilium bool

// DryRun writes resources to be installed to stdout without actually installing them. For Helm
// installation mode only.
DryRun bool
Expand All @@ -128,13 +130,11 @@ type Parameters struct {
// For Helm installation mode only.
DryRunHelmValues bool

// HelmRepository specifies the Helm repository to download Cilium Helm charts from.
HelmRepository string
// ListVersions lists all the available versions for install without actually installing.
ListVersions bool

// HelmReleaseName specifies the Helm release name for the Cilium CLI.
// Useful for referencing Cilium installations installed directly through Helm
// or overriding the Cilium CLI for install/upgrade/enable.
HelmReleaseName string
// NodesWithoutCilium enables the affinities to avoid scheduling Cilium components on nodes labeled with cilium.io/no-schedule
NodesWithoutCilium bool
}

func (p *Parameters) IsDryRun() bool {
Expand Down

0 comments on commit e63351f

Please sign in to comment.