profiles

package
v0.8.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const AddCommitMessage = "Add profile manifests"
View Source
const (
	// ManifestFileName contains the manifests of all installed Profiles
	ManifestFileName = "profiles.yaml"
)
View Source
const UpdateCommitMessage = "Update profile manifests"

Variables

This section is empty.

Functions

This section is empty.

Types

type GetOptions

type GetOptions struct {
	Name      string
	Version   string
	Cluster   string
	Namespace string
	Writer    io.Writer
	Port      string
}

type Options added in v0.7.0

type Options struct {
	Name         string
	Cluster      string
	ConfigRepo   string
	Version      string
	ProfilesPort string
	Namespace    string
	Kubeconfig   string
	AutoMerge    bool
	HeadBranch   string
	BaseBranch   string
	Message      string
	Title        string
	Description  string
}

type ProfilesService added in v0.7.0

type ProfilesService interface {
	// Add installs a profile on a cluster
	Add(ctx context.Context, gitProvider gitproviders.GitProvider, opts Options) error
	// Get lists all the available profiles in a cluster
	Get(ctx context.Context, opts GetOptions) error
	// Update updates a profile
	Update(ctx context.Context, gitProvider gitproviders.GitProvider, opts Options) error
}

type ProfilesSvc added in v0.7.0

type ProfilesSvc struct {
	ClientSet kubernetes.Interface
	Logger    logger.Logger
}

func NewService added in v0.7.0

func NewService(clientSet kubernetes.Interface, log logger.Logger) *ProfilesSvc

func (*ProfilesSvc) Add added in v0.7.0

func (s *ProfilesSvc) Add(ctx context.Context, gitProvider gitproviders.GitProvider, opts Options) error

Add installs an available profile in a cluster's namespace by appending a HelmRelease to the profile manifest in the config repo, provided that such a HelmRelease does not exist with the same profile name and version in the same namespace and cluster.

func (*ProfilesSvc) Get added in v0.7.0

func (s *ProfilesSvc) Get(ctx context.Context, opts GetOptions) error

Get returns a list of available profiles.

func (*ProfilesSvc) GetProfile added in v0.7.0

func (s *ProfilesSvc) GetProfile(ctx context.Context, opts GetOptions) (*pb.Profile, string, error)

GetProfile returns a single available profile.

func (*ProfilesSvc) Update added in v0.7.0

func (s *ProfilesSvc) Update(ctx context.Context, gitProvider gitproviders.GitProvider, opts Options) error

Update updates an installed profile

Jump to

Keyboard shortcuts

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