Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultConfigurationName is the default name of configuration DefaultConfigurationName = "kubesphere" // DefaultConfigurationFileName is the default filename of configuration DefaultConfigurationFileName = DefaultConfigurationName + ".yaml" ENV_JENKINS_ADMIN_TOKEN = "JENKINS_ADMIN_TOKEN" )
Variables ¶
This section is empty.
Functions ¶
func GetGitOpsEngine ¶
func GetGitOpsEngine(argoOption *ArgoCDOption, fluxOption *FluxCDOption) v1alpha1.Engine
GetGitOpsEngine return gitops engine type
Types ¶
type ArgoCDOption ¶
type ArgoCDOption struct { Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty" description:"enabled ArgoCD"` Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty" description:"Which namespace the ArgoCD located"` }
ArgoCDOption as the ArgoCD integration configuration
func (*ArgoCDOption) AddFlags ¶
func (o *ArgoCDOption) AddFlags(fs *pflag.FlagSet, parentOptions *ArgoCDOption)
AddFlags adds the flags which related to argocd
type AuthMode ¶
type AuthMode string
AuthMode is the auth mode of current project TODO add a validation method to verify all the supported values
var ( // AuthModeToken let it use the token directly AuthModeToken AuthMode = "token" )
type Config ¶
type Config struct { JenkinsOptions *jenkins.Options `json:"devops,omitempty" yaml:"devops,omitempty" mapstructure:"devops"` KubernetesOptions *k8s.KubernetesOptions `json:"kubernetes,omitempty" yaml:"kubernetes,omitempty" mapstructure:"kubernetes"` RedisOptions *cache.Options `json:"redis,omitempty" yaml:"redis,omitempty" mapstructure:"redis"` S3Options *s3.Options `json:"s3,omitempty" yaml:"s3,omitempty" mapstructure:"s3"` SonarQubeOptions *sonarqube.Options `json:"sonarqube,omitempty" yaml:"sonarQube,omitempty" mapstructure:"sonarqube"` ArgoCDOption *ArgoCDOption `json:"argocd,omitempty" yaml:"argocd,omitempty" mapstructure:"argocd"` FluxCDOption *FluxCDOption `json:"fluxcd,omitempty" yaml:"fluxcd,omitempty" mapstructure:"fluxcd"` AuthenticationOptions *authoptions.AuthenticationOptions `json:"authentication,omitempty" yaml:"authentication,omitempty" mapstructure:"authentication"` AuthMode AuthMode `json:"authMode,omitempty" yaml:"authMode,omitempty" mapstructure:"authMode"` JWTSecret string `json:"jwtSecret,omitempty" yaml:"jwtSecret,omitempty" mapstructure:"jwtSecret"` GitOpsOptions *GitOpsOptions `json:"gitops,omitempty" yaml:"gitops,omitempty" mapstructure:"gitops"` }
Config defines everything needed for apiserver to deal with external services
func TryLoadFromDisk ¶
TryLoadFromDisk loads configuration from default location after server startup return nil error if configuration file not exists
func (*Config) ToMap ¶
ToMap simply converts config to map[string]bool to hide sensitive information
func (*Config) TryLoadFromEnv ¶
func (conf *Config) TryLoadFromEnv()
type FluxCDOption ¶
type FluxCDOption struct {
Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty" description:"enabled FluxCD"`
}
FluxCDOption as the FluxCD integration configuration
func (*FluxCDOption) AddFlags ¶
func (o *FluxCDOption) AddFlags(fs *pflag.FlagSet, parentOptions *FluxCDOption)
AddFlags adds the flags which related to fluxcd
type GitOpsOptions ¶
type GitOpsOptions struct { // RootDir is the root directory to save git repositories data RootDir string `json:"rootDir,omitempty" yaml:"rootDir,omitempty"` // NewFilePerm is the permissions for new files or folders in git repository, default is 0755. NewFilePerm os.FileMode `json:"newFilePerm,omitempty" yaml:"newFilePerm,omitempty"` }
func NewGitOpsOptions ¶
func NewGitOpsOptions() *GitOpsOptions
Click to show internal directories.
Click to hide internal directories.