profiles

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: MPL-2.0 Imports: 17 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
	Endpoint     string
}

type ProfilesRetriever added in v0.8.1

type ProfilesRetriever interface {
	Source() string
	RetrieveProfiles() (*pb.GetProfilesResponse, error)
}

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 {
	Logger logger.Logger
}

func NewService added in v0.7.0

func NewService(log logger.Logger) *ProfilesSvc

func (*ProfilesSvc) Add added in v0.7.0

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 (*ProfilesSvc) GetProfile added in v0.7.0

func (s *ProfilesSvc) GetProfile(ctx context.Context, r ProfilesRetriever, 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, r ProfilesRetriever, 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