types

package
v0.0.0-...-c73967d Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	// application name
	Name          string `json:"name"`
	ApplicationId string `json:"appId"`
	// chart description
	Description string `json:"desc"`
	// application status
	Status string `json:"status"`
	// The URL to an icon file.
	Icon string `json:"icon,omitempty"`

	Charts []*ChartVersion `json:"charts"`
}

type ChartVersion

type ChartVersion struct {
	// Do not save ApplicationId into crd
	ApplicationId        string `json:"-"`
	ApplicationVersionId string `json:"verId"`
	repo.ChartVersion    `json:",inline"`
}

type Config

type Config struct {
	S3Options           *S3Options           `json:"s3,omitempty" yaml:"s3,omitempty" mapstructure:"s3"`
	OpenPitrixOptions   *OpenPitrixOptions   `json:"openpitrix,omitempty" yaml:"openpitrix,omitempty" mapstructure:"openpitrix"`
	MultiClusterOptions *MultiClusterOptions `json:"multicluster,omitempty" yaml:"multicluster,omitempty" mapstructure:"multicluster"`
	MySql               *MySqlOptions        `json:"mysql,omitempty" yaml:"mysql,omitempty"`
}

Config defines everything needed for apiserver to deal with external services

func TryLoadFromDisk

func TryLoadFromDisk() (*Config, error)

TryLoadFromDisk loads configuration from default location after server startup return nil error if configuration file not exists

type MultiClusterOptions

type MultiClusterOptions struct {
	// Enable
	Enable           bool `json:"enable"`
	EnableFederation bool `json:"enableFederation,omitempty"`

	// ProxyPublishService is the service name of multicluster component tower.
	//   If this field provided, apiserver going to use the ingress.ip of this service.
	// This field will be used when generating agent deployment yaml for joining clusters.
	ProxyPublishService string `json:"proxyPublishService,omitempty"`

	// ProxyPublishAddress is the public address of tower for all cluster agents.
	//   This field takes precedence over field ProxyPublishService.
	// If both field ProxyPublishService and ProxyPublishAddress are empty, apiserver will
	// return 404 Not Found for all cluster agent yaml requests.
	ProxyPublishAddress string `json:"proxyPublishAddress,omitempty"`

	// AgentImage is the image used when generating deployment for all cluster agents.
	AgentImage string `json:"agentImage,omitempty"`

	// ClusterControllerResyncSecond is the resync period used by cluster controller.
	ClusterControllerResyncSecond time.Duration `json:"clusterControllerResyncSecond,omitempty" yaml:"clusterControllerResyncSecond"`
}

type MySqlOptions

type MySqlOptions struct {
	Host     string `json:"host" yaml:"host"`
	Username string `json:"username" yaml:"username"`
	Password string `json:"password" yaml:"password"`
}

type OpenPitrixOptions

type OpenPitrixOptions struct {
	S3Options *s3.Options `json:"s3,omitempty" yaml:"s3,omitempty" mapstructure:"s3"`
}

type S3Options

type S3Options struct {
	Endpoint        string `json:"endpoint,omitempty" yaml:"endpoint"`
	Region          string `json:"region,omitempty" yaml:"region"`
	DisableSSL      bool   `json:"disableSSL" yaml:"disableSSL"`
	ForcePathStyle  bool   `json:"forcePathStyle" yaml:"forcePathStyle"`
	AccessKeyID     string `json:"accessKeyID,omitempty" yaml:"accessKeyID"`
	SecretAccessKey string `json:"secretAccessKey,omitempty" yaml:"secretAccessKey"`
	SessionToken    string `json:"sessionToken,omitempty" yaml:"sessionToken"`
	Bucket          string `json:"bucket,omitempty" yaml:"bucket"`
}

Options contains configuration to access a s3 service

type SavedIndex

type SavedIndex struct {
	APIVersion   string                  `json:"apiVersion"`
	Generated    time.Time               `json:"generated"`
	Applications map[string]*Application `json:"apps"`
	PublicKeys   []string                `json:"publicKeys,omitempty"`

	// Annotations are additional mappings uninterpreted by Helm. They are made available for
	// other applications to add information to the index file.
	Annotations map[string]string `json:"annotations,omitempty"`
}

func (*SavedIndex) Bytes

func (i *SavedIndex) Bytes() ([]byte, error)

Jump to

Keyboard shortcuts

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