pipelines

package
v0.0.0-...-6644658 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2020 License: Apache-2.0 Imports: 36 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

func Bootstrap

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

Bootstrap bootstraps a GitOps pipelines and repository structure.

func BuildResources

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

BuildResources builds all resources from a pipelines.

func CheckFileExists

func CheckFileExists(fs afero.Fs, dockerConfigJSONFilename string) (string, error)

check if the file exists or not

Types

type AddServiceOptions

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

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.
	InternalRegistryHostname string               // This is the internal registry hostname used for pushing images.
	OutputPath               string               // Where to write the bootstrapped files to?
	SealedSecretsService     types.NamespacedName // SealedSecrets Services name
	StatusTrackerAccessToken string               // The auth token to use to send commit-status notifications.
	Overwrite                bool                 // This allows to overwrite if there is an exixting gitops repository
	ServiceRepoURL           string               // This is the full URL to your GitHub repository for your app source.
	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.
}

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