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
- type BackendType
- type BooleanFlag
- type Defaults
- type GcpSecretsManager
- type JenkinsServer
- type KptStrategies
- type KptStrategyConfig
- type Mapping
- type NotifyKind
- type Pattern
- type PipelineCatalog
- type PipelineCatalogList
- type PipelineCatalogSource
- type PipelineCatalogSpec
- type PipelineKind
- type QuickstartImport
- type QuickstartSource
- type Quickstarts
- type QuickstartsList
- type QuickstartsSpec
- type Repository
- type RepositoryGroup
- type SecretMapping
- func (c *SecretMapping) Find(secretName string, dataKey string) *Mapping
- func (c *SecretMapping) FindRule(namespace string, secretName string) SecretRule
- func (c *SecretMapping) FindSecret(secretName string) *SecretRule
- func (c *SecretMapping) SaveConfig(fileName string) error
- func (c *SecretMapping) Validate() error
- type SecretMappingList
- type SecretMappingSpec
- type SecretRule
- type SlackNotify
- type SourceConfig
- type SourceConfigList
- type SourceConfigSpec
Constants ¶
const ( // APIVersion the api version APIVersion = "gitops.jenkins-x.io/v1alpha1" // KindSecretMapping the kind KindSecretMapping = "SecretMapping" // KindSourceConfig the kind KindSourceConfig = "SourceConfig" // DomainPlaceholder what is the default domain value used as a place holder until // the real domain name can be discovered which is usually after the first apply // of kubernetes resources as we need to discover the LoadBalancer Service in the nginx namespace DomainPlaceholder = "change.me" )
const ( // SourceConfigFileName default name of the source repository configuration SourceConfigFileName = "source-config.yaml" //DefaultSlackChannel DefaultSlackChannel = "#jenkins-x-pipelines" )
const (
// KptStragegyFileName default name of the kpt strategy file
KptStragegyFileName = "kpt-strategy.yaml"
)
const (
// PipelineCatalogFileName default name of the kpt strategy file
PipelineCatalogFileName = "pipeline-catalog.yaml"
)
const (
// QuickstartsFileName default name of the source repository configuration
QuickstartsFileName = "quickstarts.yaml"
)
const (
// SecretMappingFileName default name of the secret mappings file
SecretMappingFileName = "secret-mappings.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 BooleanFlag ¶ added in v0.2.1
type BooleanFlag string
BooleanFlag a type that is used for string boolean values that can be blank or yes/no
var ( // BooleanFlagNone indicates no value BooleanFlagNone BooleanFlag = "" // BooleanFlagYes BooleanFlagYes indicates yes BooleanFlagYes BooleanFlag = "yes" // BooleanFlagNo indicates no BooleanFlagNo BooleanFlag = "no" )
func (BooleanFlag) Inherit ¶ added in v0.2.1
func (f BooleanFlag) Inherit(group BooleanFlag) BooleanFlag
Inherit if the current flag is blank lets use the group value
func (BooleanFlag) ToBool ¶ added in v0.2.1
func (f BooleanFlag) ToBool() bool
ToBool converts the flag to a boolean such that it is only true if the value is "yes"
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 JenkinsServer ¶ added in v0.0.487
type JenkinsServer struct { // Server the name of the Jenkins Server to use Server string `json:"server,omitempty"` // FolderTemplate the default template file to use to generate the folder job DSL script FolderTemplate string `json:"folderTemplate,omitempty"` // JobTemplate the default template file to use to generate the projects job DSL script JobTemplate string `json:"jobTemplate,omitempty"` // Groups the groups of source repositories Groups []RepositoryGroup `json:"groups,omitempty"` }
JenkinsServer the Jenkins server configuration
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 NotifyKind ¶ added in v0.2.1
type NotifyKind string
NotifyKind what kind of notification
var ( // NotifyKindNone indicates no notification NotifyKindNone NotifyKind = "" // NotifyKindNever never notify NotifyKindNever NotifyKind = "never" // NotifyKindAlways always notify NotifyKindAlways NotifyKind = "always" // NotifyKindFailure only failures NotifyKindFailure NotifyKind = "failure" // NotifyKindFailureOrFirstSuccess only failures or first success after failure NotifyKindFailureOrFirstSuccess NotifyKind = "failureOrNextSuccess" // NotifyKindSuccess only successful NotifyKindSuccess NotifyKind = "success" )
type Pattern ¶ added in v0.2.2
type Pattern struct { // Name Name string `json:"name,omitempty"` // Includes patterns to include in changing Includes []string `json:"include,omitempty"` // Excludes patterns to exclude from upgrading Excludes []string `json:"exclude,omitempty"` }
Pattern for matching strings
func (*Pattern) MatchesLabels ¶ added in v0.2.2
Matches returns true if the text matches the given text
type PipelineCatalog ¶ added in v0.0.447
type PipelineCatalog struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata"` // Spec holds the desired state of the PipelineCatalog from the client // +optional Spec PipelineCatalogSpec `json:"spec"` }
PipelineCatalog represents a collection quickstart project
+k8s:openapi-gen=true
type PipelineCatalogList ¶ added in v0.0.447
type PipelineCatalogList struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ListMeta `json:"metadata,omitempty"` Items []PipelineCatalog `json:"items"` }
PipelineCatalogList contains a list of Repositories
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type PipelineCatalogSource ¶ added in v0.0.447
type PipelineCatalogSource struct { ID string `json:"id,omitempty" protobuf:"bytes,1,opt,name=id"` Label string `json:"label,omitempty" protobuf:"bytes,2,opt,name=label"` GitURL string `json:"gitUrl,omitempty" protobuf:"bytes,3,opt,name=gitUrl"` GitRef string `json:"gitRef,omitempty" protobuf:"bytes,4,opt,name=gitRef"` }
PipelineCatalogSource the source of a pipeline catalog
type PipelineCatalogSpec ¶ added in v0.0.447
type PipelineCatalogSpec struct { // Repositories the repositories containing pipeline catalogs Repositories []PipelineCatalogSource `json:"repositories,omitempty"` }
PipelineCatalogSpec defines the desired state of PipelineCatalog.
type PipelineKind ¶ added in v0.2.2
type PipelineKind string
PipelineKind what pipeline to notify on
var ( // PipelineKindNone indicates all pipelines PipelineKindNone PipelineKind = "" // PipelineKindAll indicates all pipelines PipelineKindAll PipelineKind = "all" // PipelineKindRelease only notify on release pipelines PipelineKindRelease PipelineKind = "release" // PipelineKindPullRequest only notify on pullRequest pipelines PipelineKindPullRequest PipelineKind = "pullRequest" )
type QuickstartImport ¶ added in v0.0.493
type QuickstartImport struct { // File file name relative to the root directory to load File string `json:"file,omitempty"` Include []string `json:"includes,omitempty"` Excludes []string `json:"excludes,omitempty"` }
QuickstartImport imports quickstats from another folder (such as from the shared version stream)
func (*QuickstartImport) Matcher ¶ added in v0.0.493
func (i *QuickstartImport) Matcher() (func(source *QuickstartSource) bool, error)
Matcher returns a matcher for the given import
type QuickstartSource ¶ added in v0.0.493
type QuickstartSource struct { ID string Owner string Name string Version string Language string Framework string Tags []string DownloadZipURL string GitServer string GitKind string }
QuickstartSource the source of a quickstart
type Quickstarts ¶ added in v0.0.493
type Quickstarts struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata"` // Spec holds the specified quicksatrt configuration // +optional Spec QuickstartsSpec `json:"spec"` }
Quickstarts represents a collection quickstart project
+k8s:openapi-gen=true
type QuickstartsList ¶ added in v0.0.493
type QuickstartsList struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ListMeta `json:"metadata,omitempty"` Items []Quickstarts `json:"items"` }
QuickstartsList contains a list of Quickstarts
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type QuickstartsSpec ¶ added in v0.0.493
type QuickstartsSpec struct { // Quickstarts custom quickstarts to include Quickstarts []QuickstartSource `json:"quickstarts,omitempty"` // DefaultOwner the default owner if not specfied DefaultOwner string `json:"defaultOwner,omitempty"` // Imports import quickstarts from the version stream Imports []QuickstartImport `json:"imports,omitempty"` }
QuickstartsSpec defines the desired state of Quickstarts.
func (*QuickstartsSpec) DefaultValues ¶ added in v0.0.493
func (qs *QuickstartsSpec) DefaultValues(q *QuickstartSource)
DefaultValues defaults any missing values
func (*QuickstartsSpec) LoadImports ¶ added in v0.0.493
func (qs *QuickstartsSpec) LoadImports(i *QuickstartImport, matcher func(source *QuickstartSource) bool, dir string) ([]QuickstartSource, error)
LoadImports loads the imported quickstarts
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"` // JenkinsJobTemplate the template file to use to generate the projects job DSL script JenkinsJobTemplate string `json:"jenkinsJobTemplate,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"` // Slack optional slack notification configuration Slack *SlackNotify `json:"slack,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"` // JenkinsFolderTemplate the default template file to use to generate the folder job DSL script JenkinsFolderTemplate string `json:"jenkinsFolderTemplate,omitempty"` // JenkinsJobTemplate the default job template file to use to generate the projects job DSL script JenkinsJobTemplate string `json:"jenkinsJobTemplate,omitempty"` // Slack optional slack notification configuration Slack *SlackNotify `json:"slack,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 SlackNotify ¶ added in v0.2.1
type SlackNotify struct { // Channel the name of the channel to notify pipelines Channel string `json:"channel,omitempty"` // Kind kind of notification such as always, only failures, failures or first succeed, only succeeds etc Kind NotifyKind `json:"kind,omitempty"` // Pipeline kind of pipeline to notify on (all, releases, pull requests etc) Pipeline PipelineKind `json:"pipeline,omitempty"` // DirectMessage whether to use Direct Messages DirectMessage BooleanFlag `json:"directMessage,omitempty"` // NotifyReviewers whether to notify reviews of Pull Request pipelines NotifyReviewers BooleanFlag `json:"notifyReviewers,omitempty"` // Branch specify the branch name or filter to notify Branch *Pattern `json:"branch,omitempty"` // Context specify the context name or filter to notify Context *Pattern `json:"context,omitempty"` // PullRequestLabel specify the pull request labels to notify PullRequestLabel *Pattern `json:"pullRequestLabel,omitempty"` }
SlackNotify the slack notification configuration
func (*SlackNotify) Inherit ¶ added in v0.2.1
func (repo *SlackNotify) Inherit(group *SlackNotify) *SlackNotify
Inherit inherits the settings on this repository from the group
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"` // Slack optional default slack notification configuration inherited by groups Slack *SlackNotify `json:"slack,omitempty"` // JenkinsServers the jenkins servers configured for this repository JenkinsServers []JenkinsServer `json:"jenkinsServers,omitempty"` // JenkinsFolderTemplate the default template file to use to generate the folder job DSL script JenkinsFolderTemplate string `json:"jenkinsFolderTemplate,omitempty"` // JenkinsJobTemplate the default template file to use to generate the projects job DSL script JenkinsJobTemplate string `json:"jenkinsJobTemplate,omitempty"` }
SourceConfigSpec defines the desired state of SourceConfig.