cmd

package
v0.0.0-...-e7c744b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configure

func Configure(v *viper.Viper, p *pflag.FlagSet)

Configure configures some defaults in the Viper instance.

func CreateReleaseDeleter

func CreateReleaseDeleter(helmConfig helm.Config, db *gorm.DB, secretStore helmadapter.SecretStore, logger helm.Logger) helm.ReleaseDeleter

CreateReleaseDeleter creates a new helm3 specific deleter instance based on the provided argunments

func CreateUnifiedHelmReleaser

func CreateUnifiedHelmReleaser(
	helmConfig helm.Config,
	clusterConfig ClusterConfig,
	db *gorm.DB,
	commonSecretStore common.SecretStore,
	clusterService helm.ClusterService,
	orgService helm.OrgService,
	logger helm.Logger,
) (helm.UnifiedReleaser, helm.Service)

CreateUnifiedHelmReleaser utility function for assembling the helm releaser

Types

type AmazonCloudConfig

type AmazonCloudConfig struct {
	DefaultRegion string
}

func (AmazonCloudConfig) Validate

func (c AmazonCloudConfig) Validate() error

type CloudConfig

type CloudConfig struct {
	Amazon AmazonCloudConfig
}

func (CloudConfig) Validate

func (c CloudConfig) Validate() error

type CloudinfoConfig

type CloudinfoConfig struct {
	Endpoint string
}

func (CloudinfoConfig) Validate

func (c CloudinfoConfig) Validate() error

type ClusterAutoscaleConfig

type ClusterAutoscaleConfig struct {
	Namespace string

	Charts struct {
		ClusterAutoscaler struct {
			Chart                   string
			Version                 string
			ImageVersionConstraints []struct {
				K8sVersion string
				Tag        string
				Repository string
			}
		}
	}
}

type ClusterChartConfig

type ClusterChartConfig struct {
	Enabled bool

	ChartName    string
	ChartVersion string
	Values       values.Config

	ReleaseName string
}

ClusterChartConfig contains configuration for a chart to be installed.

func (ClusterChartConfig) Validate

func (c ClusterChartConfig) Validate() error

type ClusterChartConfigs

type ClusterChartConfigs []ClusterChartConfig

ClusterChartConfigs contains configuration for charts to be installed.

func (ClusterChartConfigs) Validate

func (c ClusterChartConfigs) Validate() error

type ClusterConfig

type ClusterConfig struct {
	Autoscale ClusterAutoscaleConfig

	DisasterRecovery ClusterDisasterRecoveryConfig

	DNS ClusterDNSConfig

	Expiry ClusterExpiryConfig

	Ingress ClusterIngressConfig

	Labels clusterconfig.LabelConfig

	// Initial manifest
	Manifest string

	Monitoring ClusterMonitoringConfig

	Logging ClusterLoggingConfig

	// Namespace to install Pipeline components to
	Namespace string

	// Posthook configs
	PostHook cluster.PostHookConfig

	SecurityScan ClusterSecurityScanConfig

	Vault ClusterVaultConfig

	Charts ClusterChartConfigs
}

ClusterConfig contains cluster configuration.

func (*ClusterConfig) Process

func (c *ClusterConfig) Process() error

Process post-processes the configuration after loading (before validation).

func (ClusterConfig) Validate

func (c ClusterConfig) Validate() error

Validate validates the configuration.

type ClusterDNSConfig

type ClusterDNSConfig struct {
	Enabled bool

	dns.Config `mapstructure:",squash"`
}

ClusterDNSConfig contains cluster DNS configuration.

func (ClusterDNSConfig) Validate

func (c ClusterDNSConfig) Validate() error

type ClusterDisasterRecoveryConfig

type ClusterDisasterRecoveryConfig struct {
	Enabled                  bool
	RunAsIntegratedServiceV2 bool
	Namespace                string

	Ark struct {
		SyncEnabled         bool
		BucketSyncInterval  time.Duration
		RestoreSyncInterval time.Duration
		BackupSyncInterval  time.Duration
		RestoreWaitTimeout  time.Duration
	}

	Charts struct {
		Ark struct {
			Chart        string
			Version      string
			Values       map[string]interface{}
			PluginImages struct {
				Aws struct {
					Repository string `chartConfig:"repository"`
					Tag        string `chartConfig:"tag"`
					PullPolicy string `chartConfig:"pullPolicy"`
				} `chartConfig:"aws"`
				Azure struct {
					Repository string `chartConfig:"repository"`
					Tag        string `chartConfig:"tag"`
					PullPolicy string `chartConfig:"pullPolicy"`
				} `chartConfig:"azure"`
				Gcp struct {
					Repository string `chartConfig:"repository"`
					Tag        string `chartConfig:"tag"`
					PullPolicy string `chartConfig:"pullPolicy"`
				} `chartConfig:"gcp"`
			}
		}
	}
}

type ClusterExpiryConfig

type ClusterExpiryConfig struct {
	Enabled bool
}

type ClusterGetter

type ClusterGetter interface {
	GetClusterByIDOnly(ctx context.Context, clusterID uint) (cluster.CommonCluster, error)
}

type ClusterIngressConfig

type ClusterIngressConfig struct {
	Enabled bool

	ingress.Config `mapstructure:",squash"`
}

func (ClusterIngressConfig) Validate

func (c ClusterIngressConfig) Validate() error

type ClusterLoggingConfig

type ClusterLoggingConfig struct {
	Enabled bool

	logging.Config `mapstructure:",squash"`
}

ClusterLoggingConfig contains cluster logging configuration.

func (ClusterLoggingConfig) Validate

func (c ClusterLoggingConfig) Validate() error

type ClusterMonitoringConfig

type ClusterMonitoringConfig struct {
	Enabled bool

	monitoring.Config `mapstructure:",squash"`
}

ClusterMonitoringConfig contains cluster monitoring configuration.

func (ClusterMonitoringConfig) Validate

func (c ClusterMonitoringConfig) Validate() error

type ClusterSecurityScanConfig

type ClusterSecurityScanConfig struct {
	Enabled bool

	securityscan.Config `mapstructure:",squash"`
}

ClusterSecurityScanConfig contains cluster security scan configuration.

func (ClusterSecurityScanConfig) Validate

func (c ClusterSecurityScanConfig) Validate() error

type ClusterVaultConfig

type ClusterVaultConfig struct {
	Enabled bool

	vault.Config `mapstructure:",squash"`
}

ClusterVaultConfig contains cluster vault configuration.

func (ClusterVaultConfig) Validate

func (c ClusterVaultConfig) Validate() error

type Config

type Config struct {
	// Cadence configuration
	Cadence cadence.Config

	Cloud CloudConfig

	Cloudinfo CloudinfoConfig

	// Cluster configuration
	Cluster ClusterConfig

	// Database configuration
	Database struct {
		database.Config `mapstructure:",squash"`

		AutoMigrate bool
	}

	Dex struct {
		APIAddr string
		APICa   string
	}

	Distribution DistributionConfig

	Helm helm.Config

	Kubernetes struct {
		Client struct {
			ForceGlobal bool
		}
	}

	// Log configuration
	Log log.Config

	Secret struct {
		TLS struct {
			DefaultValidity time.Duration
		}
	}

	// Telemetry configuration
	Telemetry TelemetryConfig

	// temporary switch to control the integrated service implementation
	IntegratedService struct {
		V2 bool
		// Integrated Service Operator related configuration
		Operator operator.Config
	}
}

func (*Config) Process

func (c *Config) Process() error

func (Config) Validate

func (c Config) Validate() error

type DistributionConfig

type DistributionConfig struct {
	EKS struct {
		TemplateLocation            string
		DefaultNodeVolumeEncryption *struct {
			Enabled          bool
			EncryptionKeyARN string
		}
		DefaultNodeVolumeSize int
		ExposeAdminKubeconfig bool
		SSH                   struct {
			Generate bool
		}
		EnableAddons bool
	}

	PKE struct {
		Amazon struct {
			Enabled                         bool
			GlobalRegion                    string
			DefaultEBSCSIDriverChartVersion string
			DefaultImages                   map[string]string
			DefaultNetworkProvider          string
			DefaultNodeVolumeSize           int
		}
		Azure struct {
			Enabled bool
		}
	}
}

type TelemetryConfig

type TelemetryConfig struct {
	Enabled bool
	Addr    string
	Debug   bool
}

TelemetryConfig contains telemetry configuration.

func (TelemetryConfig) Validate

func (c TelemetryConfig) Validate() error

Validate validates the configuration.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL