pipelines

package
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Kustomize constants for kustomization.yaml
	Kustomize = "kustomization.yaml"
)

Variables

View Source
var (
	Rules = []v1rbac.PolicyRule{
		{
			APIGroups: []string{""},
			Resources: []string{"namespaces", "services"},
			Verbs:     []string{"patch", "get", "create"},
		},
		{
			APIGroups: []string{"rbac.authorization.k8s.io"},
			Resources: []string{"clusterroles", "roles"},
			Verbs:     []string{"bind", "patch", "get"},
		},
		{
			APIGroups: []string{"rbac.authorization.k8s.io"},
			Resources: []string{"clusterrolebindings", "rolebindings"},
			Verbs:     []string{"get", "create", "patch"},
		},
		{
			APIGroups: []string{"bitnami.com"},
			Resources: []string{"sealedsecrets"},
			Verbs:     []string{"get", "patch", "create"},
		},
		{
			APIGroups: []string{"apps"},
			Resources: []string{"deployments"},
			Verbs:     []string{"get", "create", "patch"},
		},
		{
			APIGroups: []string{"argoproj.io"},
			Resources: []string{"applications", "argocds"},
			Verbs:     []string{"get", "create", "patch"},
		},
	}
)

PolicyRules to be bound to service account

Functions

func AddEnv

func AddEnv(o *EnvParameters, appFs afero.Fs) error

AddEnv adds a new environment to the pipelines file.

func AddService

func AddService(o *AddServiceOptions, appFs afero.Fs) error

AddService is the entry-point from the CLI for adding new services.

func Bootstrap

func Bootstrap(o *BootstrapOptions, appFs afero.Fs) error

Bootstrap is the entry-point from the CLI for bootstrapping the GitOps configuration.

func BootstrapRepository added in v0.0.11

func BootstrapRepository(o *BootstrapOptions, f clientFactory, e executor) error

BootstrapRepository creates a new empty Git repository in the upstream git hosting service from the GitOpsRepoURL.

func BuildResources

func BuildResources(o *BuildParameters, appFs afero.Fs) error

BuildResources builds all resources from a pipelines.

func NewCmdExecutor added in v0.0.11

func NewCmdExecutor() cmdExecutor

NewCmdExecutor creates and returns an executor implementation that uses exec.Command to execute the commands.

Types

type AddServiceOptions

type AddServiceOptions struct {
	AppName              string
	EnvName              string
	GitRepoURL           string
	ImageRepo            string
	PipelinesFolderPath  string
	ServiceName          string
	WebhookSecret        string
	SealedSecretsService types.NamespacedName // SealedSecrets service name
	Insecure             bool
}

AddServiceOptions control how new services are added to the configuration.

type BootstrapOptions

type BootstrapOptions struct {
	GitOpsRepoURL            string // This is where the pipelines and configuration are.
	GitOpsWebhookSecret      string // This is the secret for authenticating hooks from your GitOps repo.
	Prefix                   string
	DockerConfigJSONFilename string
	ImageRepo                string               // This is where built images are pushed to.
	OutputPath               string               // Where to write the bootstrapped files to?
	SealedSecretsService     types.NamespacedName // SealedSecrets Services name
	GitHostAccessToken       string               // The auth token to use to send commit-status notifications, and access private repositories.
	Overwrite                bool                 // This allows to overwrite if there is an existing gitops repository
	ServiceRepoURL           string               // This is the full URL to your GitHub repository for your app source.
	SaveTokenKeyRing         bool                 // If true, the access-token will be saved in the keyring
	ServiceWebhookSecret     string               // This is the secret for authenticating hooks from your app source.
	PrivateRepoDriver        string               // Records the type of the GitOpsRepoURL driver if not a well-known host.
	CommitStatusTracker      bool                 // If true, this is a "private repository", i.e. requires authentication to clone the repository.
	Insecure                 bool                 // If true, use unencrypted, unsealed secrets. By default, sealed secrets are generated.
}

BootstrapOptions is a struct that provides the optional flags

type BuildParameters

type BuildParameters struct {
	PipelinesFolderPath string
	OutputPath          string
}

BuildParameters is a struct that provides flags for the BuildResources command.

type EnvParameters

type EnvParameters struct {
	PipelinesFolderPath string
	EnvName             string
	Cluster             string
}

EnvParameters encapsulates parameters for add env command.

Jump to

Keyboard shortcuts

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