v1alpha1

package
v0.0.375 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

+k8s:deepcopy-gen=package +k8s:openapi-gen=true Package v1alpha1 is the v1alpha1 version of the API. +groupName=gitops.jenkins-x.io

Index

Constants

View Source
const (
	// APIVersion the api version
	APIVersion = "gitops.jenkins-x.io/v1alpha1"

	// KindSecretMapping the kind
	KindSecretMapping = "SecretMapping"

	// KindSourceConfig the kind
	KindSourceConfig = "SourceConfig"
)
View Source
const (
	// KptStragegyFileName default name of the kpt strategy file
	KptStragegyFileName = "kpt-strategy.yaml"
)
View Source
const (
	// SecretMappingFileName default name of the secret mappings file
	SecretMappingFileName = "secret-mappings.yaml"
)
View Source
const (
	// SourceConfigFileName default name of the source repository configuration
	SourceConfigFileName = "source-config.yaml"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendType added in v0.0.55

type BackendType string

BackendType describes a secrets backend

const (
	// BackendTypeVault Vault is the Backed service
	BackendTypeVault BackendType = "vault"
	// BackendTypeGSM Google Secrets Manager is the Backed service
	BackendTypeGSM BackendType = "gcpSecretsManager"
	// BackendTypeNone if none is configured
	BackendTypeNone BackendType = ""
)

type Defaults added in v0.0.161

type Defaults struct {
	// DefaultBackendType the default back end to use if there's no specific mapping
	BackendType BackendType `json:"backendType,omitempty" validate:"nonzero"`
	// GcpSecretsManager config
	GcpSecretsManager GcpSecretsManager `json:"gcpSecretsManager,omitempty"`
}

Defaults contains default mapping configuration for any Kubernetes secrets to External Secrets

type GcpSecretsManager added in v0.0.151

type GcpSecretsManager struct {
	// Version of the referenced secret
	Version string `json:"version,omitempty"`
	// ProjectId for the secret, defaults to the current GCP project
	ProjectId string `json:"projectId,omitempty"`
	// UniquePrefix needs to be a unique prefix in the GCP project where the secret resides, defaults to cluster name
	UniquePrefix string `json:"uniquePrefix,omitempty"`
}

GcpSecretsManager the predicates which must be true to invoke the associated tasks/pipelines

type JenkinsConfig added in v0.0.349

type JenkinsConfig struct {
	// XmlTemplate the configuration template file to use to generate the projects XML configuration file
	XmlTemplate string `json:"xmlTemplate,omitempty"`

	// Server the name of the Jenkins Server to use
	Server string `json:"server,omitempty"`
}

JenkinsConfig the Jenkins configuration for a group or repository if applicable

type KptStrategies added in v0.0.301

type KptStrategies struct {
	// KptStrategyConfig contains a collection of merge strategies Jenkins X will use when performing kpt updates
	KptStrategyConfig []KptStrategyConfig `json:"config" validate:"nonzero"`
}

KptStrategies contains a collection of merge strategies Jenkins X will use when performing kpt updates

+k8s:openapi-gen=true

func (*KptStrategies) Validate added in v0.0.301

func (c *KptStrategies) Validate() error

validate the secrete mapping fields

type KptStrategyConfig added in v0.0.301

type KptStrategyConfig struct {
	// RelativePath the relative path to the folder the strategy should apply to
	RelativePath string `json:"relativePath" validate:"nonzero"`
	// Strategy is the merge strategy kpt will use see https://googlecontainertools.github.io/kpt/reference/pkg/update/#flags
	Strategy string `json:"strategy" validate:"nonzero"`
}

KptStrategyConfig used by jx gitops upgrade kpt

type Mapping

type Mapping struct {
	// Name the secret entry name which maps to the Key of the Secret.Data map
	Name string `json:"name,omitempty"`

	// Key the Vault key to load the secret value
	// +optional
	Key string `json:"key,omitempty"`

	// Property the Vault property on the key to load the secret value
	// +optional
	Property string `json:"property,omitempty"`
}

Mapping the predicates which must be true to invoke the associated tasks/pipelines

type Repository added in v0.0.189

type Repository struct {
	// Name the name of the repository
	Name string `json:"name,omitempty" validate:"nonzero"`

	// Scheduler the optional name of the scheduler to use if different to the group
	Scheduler string `json:"scheduler,omitempty"`

	// Jenkins the jenkins configuration if using Jenkins
	Jenkins *JenkinsConfig `json:"jenkins,omitempty"`

	// Description the optional description of this repository
	Description string `json:"description,omitempty"`

	// URL the URL to access this repository
	URL string `json:"url,omitempty"`

	// HTTPCloneURL the HTTP/HTTPS based clone URL
	HTTPCloneURL string `json:"httpCloneURL,omitempty"`

	// SSHCloneURL the SSH based clone URL
	SSHCloneURL string `json:"sshCloneURL,omitempty"`
}

Repository the name of the repository to import and the optional scheduler

type RepositoryGroup added in v0.0.189

type RepositoryGroup struct {
	// Provider the git provider server URL
	Provider string `json:"provider,omitempty"`

	// ProviderKind the git provider kind
	ProviderKind string `json:"providerKind,omitempty"`

	// ProviderName the git provider name
	ProviderName string `json:"providerName,omitempty"`

	// Owner the name of the organisation/owner/project/user that owns the repository
	Owner string `json:"owner,omitempty" validate:"nonzero"`

	// Repositories the repositories for the
	Repositories []Repository `json:"repositories,omitempty"`

	// Scheduler the default scheduler for this group
	Scheduler string `json:"scheduler,omitempty"`

	// Jenkins the jenkins configuration if using Jenkins
	Jenkins *JenkinsConfig `json:"jenkins,omitempty"`
}

SourceConfigSpec defines the desired state of SourceConfig.

type SecretMapping

type SecretMapping struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata"`

	// Spec holds the desired state of the SecretMapping from the client
	// +optional
	Spec SecretMappingSpec `json:"spec"`
}

SecretMapping represents a collection of mappings of Secrets to destinations in the underlying secret store (e.g. Vault keys)

+k8s:openapi-gen=true

func (*SecretMapping) Find

func (c *SecretMapping) Find(secretName string, dataKey string) *Mapping

Find finds a secret rule for the given secret name

func (*SecretMapping) FindRule added in v0.0.57

func (c *SecretMapping) FindRule(namespace string, secretName string) SecretRule

FindRule finds a secret rule for the given secret name

func (*SecretMapping) FindSecret added in v0.0.151

func (c *SecretMapping) FindSecret(secretName string) *SecretRule

Find finds a secret rule for the given secret name

func (*SecretMapping) SaveConfig added in v0.0.161

func (c *SecretMapping) SaveConfig(fileName string) error

SaveConfig saves the configuration file to the given project directory

func (*SecretMapping) Validate added in v0.0.63

func (c *SecretMapping) Validate() error

validate the secrete mapping fields

type SecretMappingList

type SecretMappingList struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []SecretMapping `json:"items"`
}

SecretMappingList contains a list of SecretMapping

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

type SecretMappingSpec

type SecretMappingSpec struct {
	// Secrets rules for each secret
	Secrets []SecretRule `json:"secrets,omitempty"`

	Defaults `json:"defaults,omitempty" validate:"nonzero"`
}

SecretMappingSpec defines the desired state of SecretMapping.

type SecretRule

type SecretRule struct {
	// Name name of the secret
	Name string `json:"name,omitempty"`
	// Namespace name of the secret
	Namespace string `json:"namespace,omitempty"`
	// BackendType for the secret
	BackendType BackendType `json:"backendType"`
	// Mappings one more mappings
	Mappings []Mapping `json:"mappings,omitempty"`
	// Mandatory marks this secret as being mandatory
	Mandatory bool `json:"mandatory,omitempty"`
	// GcpSecretsManager config
	GcpSecretsManager GcpSecretsManager `json:"gcpSecretsManager,omitempty"`
}

SecretRule the rules for a specific Secret

func (*SecretRule) Find

func (r *SecretRule) Find(dataKey string) *Mapping

Find finds a mapping for the given data name

type SourceConfig added in v0.0.189

type SourceConfig struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata"`

	// Spec holds the desired state of the SourceConfig from the client
	// +optional
	Spec SourceConfigSpec `json:"spec"`
}

SourceConfig represents a collection source repostory groups and repositories

+k8s:openapi-gen=true

type SourceConfigList added in v0.0.189

type SourceConfigList struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []SourceConfig `json:"items"`
}

SourceConfigList contains a list of SourceConfig

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

type SourceConfigSpec added in v0.0.189

type SourceConfigSpec struct {
	// Groups the groups of source repositories
	Groups []RepositoryGroup `json:"groups,omitempty"`

	// Scheduler the default scheduler for any group/repository which does not specify one
	Scheduler string `json:"scheduler,omitempty"`
}

SourceConfigSpec defines the desired state of SourceConfig.

Jump to

Keyboard shortcuts

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