config

package
v3.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

+k8s:deepcopy-gen=package +k8s:openapi-gen=true Package v1 is the v1 version of the API. +groupName=config.jenkins.io +apiVersion=v1

Index

Constants

View Source
const (
	// RequirementsConfigFileName is the name of the requirements configuration file
	RequirementsConfigFileName = "jx-requirements.yml"
	// RequirementsValuesFileName is the name of the requirements configuration file
	RequirementsValuesFileName = "jx-requirements.values.yaml.gotmpl"
	// RequirementDomainIssuerUsername contains the username used for basic auth when requesting a domain
	RequirementDomainIssuerUsername = "JX_REQUIREMENT_DOMAIN_ISSUER_USERNAME"
	// RequirementDomainIssuerPassword contains the password used for basic auth when requesting a domain
	RequirementDomainIssuerPassword = "JX_REQUIREMENT_DOMAIN_ISSUER_PASSWORD"
	// RequirementDomainIssuerURL contains the URL to the service used when requesting a domain
	RequirementDomainIssuerURL = "JX_REQUIREMENT_DOMAIN_ISSUER_URL"
	// RequirementClusterName is the cluster name
	RequirementClusterName = "JX_REQUIREMENT_CLUSTER_NAME"
	// RequirementProject is the cloudprovider project
	RequirementProject = "JX_REQUIREMENT_PROJECT"
	// RequirementZone zone the cluster is in
	RequirementZone = "JX_REQUIREMENT_ZONE"
	// RequirementEnvGitOwner the default git owner for environment repositories if none is specified explicitly
	RequirementEnvGitOwner = "JX_REQUIREMENT_ENV_GIT_OWNER"
	// RequirementEnvGitPublic sets the visibility of the environment repositories as private (subscription required for GitHub Organisations)
	RequirementEnvGitPublic = "JX_REQUIREMENT_ENV_GIT_PUBLIC"
	// RequirementGitPublic sets the visibility of the application repositories as private (subscription required for GitHub Organisations)
	RequirementGitPublic = "JX_REQUIREMENT_GIT_PUBLIC"
	// RequirementExternalDNSServiceAccountName the service account name for external dns
	RequirementExternalDNSServiceAccountName = "JX_REQUIREMENT_EXTERNALDNS_SA_NAME"
	// RequirementVaultName the name for vault
	RequirementVaultName = "JX_REQUIREMENT_VAULT_NAME"
	// RequirementVaultServiceAccountName the service account name for vault
	RequirementVaultServiceAccountName = "JX_REQUIREMENT_VAULT_SA_NAME"
	// RequirementVeleroServiceAccountName the service account name for velero
	RequirementVeleroServiceAccountName = "JX_REQUIREMENT_VELERO_SA_NAME"
	// RequirementVeleroTTL defines the time to live (TTL) for the Velero backups in minutes
	RequirementVeleroTTL = "JX_REQUIREMENT_VELERO_TTL"
	// RequirementVeleroSchedule defines the schedule of the Velero backups in cron notation
	RequirementVeleroSchedule = "JX_REQUIREMENT_VELERO_SCHEDULE"
	// RequirementVaultKeyringName the keyring name for vault
	RequirementVaultKeyringName = "JX_REQUIREMENT_VAULT_KEYRING_NAME"
	// RequirementVaultKeyName the key name for vault
	RequirementVaultKeyName = "JX_REQUIREMENT_VAULT_KEY_NAME"
	// RequirementVaultBucketName the vault name for vault
	RequirementVaultBucketName = "JX_REQUIREMENT_VAULT_BUCKET_NAME"
	// RequirementVaultRecreateBucket recreate the bucket that vault uses
	RequirementVaultRecreateBucket = "JX_REQUIREMENT_VAULT_RECREATE_BUCKET"
	// RequirementVaultDisableURLDiscovery override the default lookup of the Vault URL, could be incluster service or external ingress
	RequirementVaultDisableURLDiscovery = "JX_REQUIREMENT_VAULT_DISABLE_URL_DISCOVERY"
	// RequirementSecretStorageType the secret storage type
	RequirementSecretStorageType = "JX_REQUIREMENT_SECRET_STORAGE_TYPE"
	// RequirementKanikoServiceAccountName the service account name for kaniko
	RequirementKanikoServiceAccountName = "JX_REQUIREMENT_KANIKO_SA_NAME"
	// RequirementKaniko if kaniko is required
	RequirementKaniko = "JX_REQUIREMENT_KANIKO"
	// RequirementIngressTLSProduction use the lets encrypt production server
	RequirementIngressTLSProduction = "JX_REQUIREMENT_INGRESS_TLS_PRODUCTION"
	// RequirementChartRepository the helm chart repository for jx
	RequirementChartRepository = "JX_REQUIREMENT_CHART_REPOSITORY"
	// RequirementRegistry the container registry for jx
	RequirementRegistry = "JX_REQUIREMENT_REGISTRY"
	// RequirementRepository the artifact repository for jx
	RequirementRepository = "JX_REQUIREMENT_REPOSITORY"
	// RequirementWebhook the webhook handler for jx
	RequirementWebhook = "JX_REQUIREMENT_WEBHOOK"
	// RequirementStorageBackupEnabled if backup storage is required
	RequirementStorageBackupEnabled = "JX_REQUIREMENT_STORAGE_BACKUP_ENABLED"
	// RequirementStorageBackupURL backup storage url
	RequirementStorageBackupURL = "JX_REQUIREMENT_STORAGE_BACKUP_URL"
	// RequirementStorageLogsEnabled if log storage is required
	RequirementStorageLogsEnabled = "JX_REQUIREMENT_STORAGE_LOGS_ENABLED"
	// RequirementStorageLogsURL logs storage url
	RequirementStorageLogsURL = "JX_REQUIREMENT_STORAGE_LOGS_URL"
	// RequirementStorageReportsEnabled if report storage is required
	RequirementStorageReportsEnabled = "JX_REQUIREMENT_STORAGE_REPORTS_ENABLED"
	// RequirementStorageReportsURL report storage url
	RequirementStorageReportsURL = "JX_REQUIREMENT_STORAGE_REPORTS_URL"
	// RequirementStorageRepositoryEnabled if repository storage is required
	RequirementStorageRepositoryEnabled = "JX_REQUIREMENT_STORAGE_REPOSITORY_ENABLED"
	// RequirementStorageRepositoryURL repository storage url
	RequirementStorageRepositoryURL = "JX_REQUIREMENT_STORAGE_REPOSITORY_URL"
	// RequirementGkeProjectNumber is the gke project number
	RequirementGkeProjectNumber = "JX_REQUIREMENT_GKE_PROJECT_NUMBER"
	// RequirementGitAppEnabled if the github app should be used for access tokens
	RequirementGitAppEnabled = "JX_REQUIREMENT_GITHUB_APP_ENABLED"
	// RequirementGitAppURL contains the URL to the github app
	RequirementGitAppURL = "JX_REQUIREMENT_GITHUB_APP_URL"
	// RequirementDevEnvApprovers contains the optional list of users to populate the dev env's OWNERS with
	RequirementDevEnvApprovers = "JX_REQUIREMENT_DEV_ENV_APPROVERS"
	// RequirementVersionsGitRef contains the git ref of the version stream
	RequirementVersionsGitRef = "JX_REQUIREMENT_VERSIONS_GIT_REF"
)
View Source
const (
	// DefaultProfileFile location of profle config
	DefaultProfileFile = "profile.yaml"
	// OpenSourceProfile constant for OSS profile
	OpenSourceProfile = "oss"
	// CloudBeesProfile constant for CloudBees profile
	CloudBeesProfile = "cloudbees"
)
View Source
const (
	// BootDeployNamespace environment variable for deployment namespace
	BootDeployNamespace = "DEPLOY_NAMESPACE"
)
View Source
const (
	// DefaultFailOnValidationError by default fail if validation fails when reading jx-requirements
	DefaultFailOnValidationError = true
)

Variables

View Source
var (
	// DefaultVersionsURL default version stream url
	DefaultVersionsURL = "https://github.com/jenkins-x/jenkins-x-versions.git"
	// DefaultVersionsRef default version stream ref
	DefaultVersionsRef = "master"
	// DefaultBootRepository default git repo for boot
	DefaultBootRepository = "https://github.com/jenkins-x/jenkins-x-boot-config.git"
	// LatestVersionStringsBucket optional bucket name to search in for latest version strings
	LatestVersionStringsBucket = ""
	// BinaryDownloadBaseURL the base URL for downloading the binary from - will always have "VERSION/jx-OS-ARCH.EXTENSION" appended to it when used
	BinaryDownloadBaseURL = "https://github.com/jenkins-x/jx/releases/download/v"
	// TLSDocURL the URL presented by `jx step verify preinstall` for documentation on configuring TLS
	TLSDocURL = "https://jenkins-x.io/docs/getting-started/setup/boot/#ingress"
)

Overrideable at build time - see Makefile

View Source
var PhaseValues = []string{"system", "apps"}

PhaseValues the string values for Phases

RepositoryTypeValues the string values for the repository types

SecretStorageTypeValues the string values for the secret storage

WebhookTypeValues the string values for the webhook types

Functions

func MissingRequirement

func MissingRequirement(property string, fileName string) error

MissingRequirement returns an error if there is a missing property in the requirements

Types

type Application

type Application struct {
	// Name of the application / helm chart
	Name string `json:"name"`
	// Repository the helm repository
	Repository string `json:"repository"`
	// Namespace to install the application into
	Namespace string `json:"namespace,omitempty"`
	// Phase of the pipeline to install application
	Phase Phase `json:"phase,omitempty"`
}

Application is an application to install during boot

func (*Application) DeepCopy

func (in *Application) DeepCopy() *Application

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Application.

func (*Application) DeepCopyInto

func (in *Application) DeepCopyInto(out *Application)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ApplicationConfig

type ApplicationConfig struct {
	// Applications of applications
	Applications []Application `json:"applications"`
	// DefaultNamespace the default namespace to install applications into
	DefaultNamespace string `json:"defaultNamespace"`
}

ApplicationConfig contains applications to install during boot

func LoadApplicationsConfig

func LoadApplicationsConfig(dir string) (*ApplicationConfig, error)

LoadApplicationsConfig loads the boot applications configuration file if there is not a file called `jx-apps.yml` in the given dir we will scan up the parent directories looking for the requirements file as we often run 'jx' steps in sub directories.

func (*ApplicationConfig) DeepCopy

func (in *ApplicationConfig) DeepCopy() *ApplicationConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationConfig.

func (*ApplicationConfig) DeepCopyInto

func (in *ApplicationConfig) DeepCopyInto(out *ApplicationConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AutoUpdateConfig

type AutoUpdateConfig struct {
	// Enabled autoupdate
	Enabled bool `json:"enabled"`
	// Schedule cron of auto updates
	Schedule string `json:"schedule"`
}

AutoUpdateConfig contains auto update config

func (*AutoUpdateConfig) DeepCopy

func (in *AutoUpdateConfig) DeepCopy() *AutoUpdateConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutoUpdateConfig.

func (*AutoUpdateConfig) DeepCopyInto

func (in *AutoUpdateConfig) DeepCopyInto(out *AutoUpdateConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AzureConfig

type AzureConfig struct {
	// RegistrySubscription the registry subscription for defaulting the container registry.
	// Not used if you specify a Registry explicitly
	RegistrySubscription string `json:"registrySubscription,omitempty"`
	*AzureDNSConfig      `json:"dns,omitempty"`
}

AzureConfig contains Azure specific requirements

func (*AzureConfig) DeepCopy

func (in *AzureConfig) DeepCopy() *AzureConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureConfig.

func (*AzureConfig) DeepCopyInto

func (in *AzureConfig) DeepCopyInto(out *AzureConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AzureDNSConfig added in v3.0.2

type AzureDNSConfig struct {
	TenantID       string `json:"tenantId,omitempty"`
	SubscriptionID string `json:"subscriptionId,omitempty"`
	ResourceGroup  string `json:"resourceGroup,omitempty"`
}

type BuildPackConfig

type BuildPackConfig struct {
	// Location contains location config
	BuildPackLibrary *BuildPackLibrary `json:"buildPackLibrary,omitempty"`
}

BuildPackConfig contains build pack info

func (*BuildPackConfig) DeepCopy

func (in *BuildPackConfig) DeepCopy() *BuildPackConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildPackConfig.

func (*BuildPackConfig) DeepCopyInto

func (in *BuildPackConfig) DeepCopyInto(out *BuildPackConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BuildPackLibrary

type BuildPackLibrary struct {
	// Name
	Name string `json:"name,omitempty"`
	// GitURL
	GitURL string `json:"gitURL,omitempty"`
	// GitRef
	GitRef string `json:"gitRef,omitempty"`
}

BuildPackLibrary contains buildpack location

func (*BuildPackLibrary) DeepCopy

func (in *BuildPackLibrary) DeepCopy() *BuildPackLibrary

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildPackLibrary.

func (*BuildPackLibrary) DeepCopyInto

func (in *BuildPackLibrary) DeepCopyInto(out *BuildPackLibrary)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterConfig

type ClusterConfig struct {
	// AzureConfig the azure specific configuration
	AzureConfig *AzureConfig `json:"azure,omitempty"`
	// ChartRepository the repository URL to deploy charts to
	ChartRepository string `json:"chartRepository,omitempty" envconfig:"JX_REQUIREMENT_CHART_REPOSITORY"`
	// GKEConfig the gke specific configuration
	GKEConfig *GKEConfig `json:"gke,omitempty"`
	// EnvironmentGitOwner the default git owner for environment repositories if none is specified explicitly
	EnvironmentGitOwner string `json:"environmentGitOwner,omitempty" envconfig:"JX_REQUIREMENT_ENV_GIT_OWNER"`
	// EnvironmentGitPublic determines whether jx boot create public or private git repos for the environments
	EnvironmentGitPublic bool `json:"environmentGitPublic,omitempty" envconfig:"JX_REQUIREMENT_ENV_GIT_PUBLIC"`
	// GitPublic determines whether jx boot create public or private git repos for the applications
	GitPublic bool `json:"gitPublic,omitempty" envconfig:"JX_REQUIREMENT_GIT_PUBLIC"`
	// Provider the kubernetes provider (e.g. gke)
	Provider string `json:"provider,omitempty"`
	// Namespace the namespace to install the dev environment
	Namespace string `json:"namespace,omitempty"`
	// ProjectID the cloud project ID e.g. on GCP
	ProjectID string `json:"project,omitempty" envconfig:"JX_REQUIREMENT_PROJECT"`
	// ClusterName the logical name of the cluster
	ClusterName string `json:"clusterName,omitempty" envconfig:"JX_REQUIREMENT_CLUSTER_NAME"`
	// VaultName the name of the vault if using vault for secrets
	// Deprecated
	VaultName string `json:"vaultName,omitempty"`
	// Region the cloud region being used
	Region string `json:"region,omitempty"`
	// Zone the cloud zone being used
	Zone string `json:"zone,omitempty" envconfig:"JX_REQUIREMENT_ZONE"`
	// GitName is the name of the default git service
	GitName string `json:"gitName,omitempty"`
	// GitKind is the kind of git server (github, bitbucketserver etc)
	GitKind string `json:"gitKind,omitempty"`
	// GitServer is the URL of the git server
	GitServer string `json:"gitServer,omitempty"`
	// ExternalDNSSAName the service account name for external dns
	ExternalDNSSAName string `json:"externalDNSSAName,omitempty" envconfig:"JX_REQUIREMENT_EXTERNALDNS_SA_NAME"`
	// Registry the host name of the container registry
	Registry string `json:"registry,omitempty" envconfig:"JX_REQUIREMENT_REGISTRY"`
	// VaultSAName the service account name for vault
	// Deprecated
	VaultSAName string `json:"vaultSAName,omitempty"`
	// KanikoSAName the service account name for kaniko
	KanikoSAName string `json:"kanikoSAName,omitempty" envconfig:"JX_REQUIREMENT_KANIKO_SA_NAME"`
	// HelmMajorVersion contains the major helm version number. Assumes helm 2.x with no tiller if no value specified
	HelmMajorVersion string `json:"helmMajorVersion,omitempty"`
	// DevEnvApprovers contains an optional list of approvers to populate the initial OWNERS file in the dev env repo
	DevEnvApprovers []string `json:"devEnvApprovers,omitempty"`
	// DockerRegistryOrg the default organisation used for container images
	DockerRegistryOrg string `json:"dockerRegistryOrg,omitempty"`
	// StrictPermissions lets you decide how to boot the cluster when it comes to permissions
	// If it's false, cluster wide permissions will be used, normal, namespaced permissions will be used otherwise
	// and extra steps will be necessary to get the cluster working
	StrictPermissions bool `json:"strictPermissions,omitempty"`
}

ClusterConfig contains cluster specific requirements

func (*ClusterConfig) DeepCopy

func (in *ClusterConfig) DeepCopy() *ClusterConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterConfig.

func (*ClusterConfig) DeepCopyInto

func (in *ClusterConfig) DeepCopyInto(out *ClusterConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterConfig) UnmarshalJSON

func (t *ClusterConfig) UnmarshalJSON(data []byte) error

UnmarshalJSON method handles the rename of EnvironmentGitPrivate to EnvironmentGitPublic.

type EnvironmentConfig

type EnvironmentConfig struct {
	// Key is the key of the environment configuration
	Key string `json:"key,omitempty"`
	// Owner is the git user or organisation for the repository
	Owner string `json:"owner,omitempty"`
	// Repository is the name of the repository within the owner
	Repository string `json:"repository,omitempty"`
	// GitServer is the URL of the git server
	GitServer string `json:"gitServer,omitempty"`
	// GitKind is the kind of git server (github, bitbucketserver etc)
	GitKind string `json:"gitKind,omitempty"`
	// Ingress contains ingress specific requirements
	Ingress IngressConfig `json:"ingress,omitempty"`
	// RemoteCluster specifies this environment runs on a remote cluster to the development cluster
	RemoteCluster bool `json:"remoteCluster,omitempty"`
	// PromotionStrategy what kind of promotion strategy to use
	PromotionStrategy v1.PromotionStrategyType `json:"promotionStrategy,omitempty"`
	// URLTemplate is the template to use for your environment's exposecontroller generated URLs
	URLTemplate string `json:"urlTemplate,omitempty"`
}

EnvironmentConfig configures the organisation and repository name of the git repositories for environments

func (*EnvironmentConfig) DeepCopy

func (in *EnvironmentConfig) DeepCopy() *EnvironmentConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvironmentConfig.

func (*EnvironmentConfig) DeepCopyInto

func (in *EnvironmentConfig) DeepCopyInto(out *EnvironmentConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GKEConfig

type GKEConfig struct {
	// ProjectNumber the unique project number GKE assigns to a project (required for workload identity).
	ProjectNumber string `json:"projectNumber,omitempty" envconfig:"JX_REQUIREMENT_GKE_PROJECT_NUMBER"`
}

GKEConfig contains GKE specific requirements

func (*GKEConfig) DeepCopy

func (in *GKEConfig) DeepCopy() *GKEConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GKEConfig.

func (*GKEConfig) DeepCopyInto

func (in *GKEConfig) DeepCopyInto(out *GKEConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GithubAppConfig

type GithubAppConfig struct {
	// Enabled this determines whether this install should use the jenkins x github app for access tokens
	Enabled bool `json:"enabled" envconfig:"JX_REQUIREMENT_GITHUB_APP_ENABLED"`
	// Schedule cron of the github app token refresher
	Schedule string `json:"schedule,omitempty"`
	// URL contains a URL to the github app
	URL string `json:"url,omitempty" envconfig:"JX_REQUIREMENT_GITHUB_APP_URL"`
}

GithubAppConfig contains github app config

func (*GithubAppConfig) DeepCopy

func (in *GithubAppConfig) DeepCopy() *GithubAppConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GithubAppConfig.

func (*GithubAppConfig) DeepCopyInto

func (in *GithubAppConfig) DeepCopyInto(out *GithubAppConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IngressConfig

type IngressConfig struct {
	// DNS is enabled
	ExternalDNS bool `json:"externalDNS"`
	// CloudDNSSecretName secret name which contains the service account for external-dns and cert-manager issuer to
	// access the Cloud DNS service to resolve a DNS challenge
	CloudDNSSecretName string `json:"cloud_dns_secret_name,omitempty"`
	// Domain to expose ingress endpoints
	Domain string `json:"domain"`
	// IgnoreLoadBalancer if the nginx-controller LoadBalancer service should not be used to detect and update the
	// domain if you are using a dynamic domain resolver like `.nip.io` rather than a real DNS configuration.
	// With this flag enabled the `Domain` value will be used and never re-created based on the current LoadBalancer IP address.
	IgnoreLoadBalancer bool `json:"ignoreLoadBalancer,omitempty"`
	// Exposer the exposer used to expose ingress endpoints. Defaults to "Ingress"
	Exposer string `json:"exposer,omitempty"`
	// NamespaceSubDomain the sub domain expression to expose ingress. Defaults to ".jx."
	NamespaceSubDomain string `json:"namespaceSubDomain"`
	// TLS enable automated TLS using certmanager
	TLS TLSConfig `json:"tls"`
	// DomainIssuerURL contains a URL used to retrieve a Domain
	DomainIssuerURL string `json:"domainIssuerURL,omitempty" envconfig:"JX_REQUIREMENT_DOMAIN_ISSUER_URL"`
}

IngressConfig contains dns specific requirements

func (*IngressConfig) DeepCopy

func (in *IngressConfig) DeepCopy() *IngressConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressConfig.

func (*IngressConfig) DeepCopyInto

func (in *IngressConfig) DeepCopyInto(out *IngressConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*IngressConfig) IsAutoDNSDomain

func (i *IngressConfig) IsAutoDNSDomain() bool

IsAutoDNSDomain returns true if the domain is configured to use an auto DNS sub domain like '.nip.io' or '.xip.io'

type JxInstallProfile

type JxInstallProfile struct {
	InstallType string
}

JxInstallProfile contains the jx profile info

func (*JxInstallProfile) DeepCopy

func (in *JxInstallProfile) DeepCopy() *JxInstallProfile

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JxInstallProfile.

func (*JxInstallProfile) DeepCopyInto

func (in *JxInstallProfile) DeepCopyInto(out *JxInstallProfile)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Phase

type Phase string

Phase of the pipeline to install application

const (
	// ApplicationsConfigFileName is the name of the applications configuration file
	ApplicationsConfigFileName = "jx-apps.yml"
	// PhaseSystem is installed before the apps phase
	PhaseSystem Phase = "system"
	// PhaseApps is installed after the system phase
	PhaseApps Phase = "apps"
)

type RepositoryType

type RepositoryType string

RepositoryType is the type of a repository we use to store artifacts (jars, tarballs, npm packages etc)

const (
	// RepositoryTypeUnknown if we have yet to configure a repository
	RepositoryTypeUnknown RepositoryType = ""
	// RepositoryTypeArtifactory if you wish to use Artifactory as the artifact repository
	RepositoryTypeArtifactory RepositoryType = "artifactory"
	// RepositoryTypeBucketRepo if you wish to use bucketrepo as the artifact repository. see https://github.com/jenkins-x/bucketrepo
	RepositoryTypeBucketRepo RepositoryType = "bucketrepo"
	// RepositoryTypeNone if you do not wish to install an artifact repository
	RepositoryTypeNone RepositoryType = "none"
	// RepositoryTypeNexus if you wish to use Sonatype Nexus as the artifact repository
	RepositoryTypeNexus RepositoryType = "nexus"
)

type RequirementsConfig

type RequirementsConfig struct {
	// AutoUpdate contains auto update config
	AutoUpdate AutoUpdateConfig `json:"autoUpdate,omitempty"`
	// BootConfigURL contains the url to which the dev environment is associated with
	BootConfigURL string `json:"bootConfigURL,omitempty"`
	// BuildPackConfig contains custom build pack settings
	BuildPacks *BuildPackConfig `json:"buildPacks,omitempty"`
	// Cluster contains cluster specific requirements
	Cluster ClusterConfig `json:"cluster"`
	// Environments the requirements for the environments
	Environments []EnvironmentConfig `json:"environments,omitempty"`
	// GithubApp contains github app config
	GithubApp *GithubAppConfig `json:"githubApp,omitempty"`
	// GitOps if enabled we will setup a webhook in the boot configuration git repository so that we can
	// re-run 'jx boot' when changes merge to the master branch
	GitOps bool `json:"gitops,omitempty"`
	// Indicates if we are using helmfile and helm 3 to spin up environments. This is currently an experimental
	// feature flag used to implement better Multi-Cluster support. See https://github.com/jenkins-x/jx/issues/6442
	Helmfile bool `json:"helmfile,omitempty"`
	// Kaniko whether to enable kaniko for building docker images
	Kaniko bool `json:"kaniko,omitempty"`
	// Ingress contains ingress specific requirements
	Ingress IngressConfig `json:"ingress"`
	// PipelineUser the user name and email used for running pipelines
	PipelineUser *UserNameEmailConfig `json:"pipelineUser,omitempty"`
	// Repository specifies what kind of artifact repository you wish to use for storing artifacts (jars, tarballs, npm modules etc)
	Repository RepositoryType `json:"repository,omitempty" envconfig:"JX_REQUIREMENT_REPOSITORY"`
	// SecretStorage how should we store secrets for the cluster
	SecretStorage SecretStorageType `json:"secretStorage,omitempty" envconfig:"JX_REQUIREMENT_SECRET_STORAGE_TYPE"`
	// Storage contains storage requirements
	Storage StorageConfig `json:"storage"`
	// Terraform specifies if  we are managing the kubernetes cluster and cloud resources with Terraform
	Terraform bool `json:"terraform,omitempty"`
	// Vault the configuration for vault
	Vault VaultConfig `json:"vault,omitempty"`
	// Velero the configuration for running velero for backing up the cluster resources
	Velero VeleroConfig `json:"velero,omitempty"`
	// VersionStream contains version stream info
	VersionStream VersionStreamConfig `json:"versionStream"`
	// Webhook specifies what engine we should use for webhooks
	Webhook WebhookType `json:"webhook,omitempty"`
}

RequirementsConfig contains the logical installation requirements in the `jx-requirements.yml` file when installing, configuring or upgrading Jenkins X via `jx boot`

func GetRequirementsConfigFromTeamSettings

func GetRequirementsConfigFromTeamSettings(settings *v1.TeamSettings) (*RequirementsConfig, error)

GetRequirementsConfigFromTeamSettings reads the BootRequirements string from TeamSettings and unmarshals it

func LoadRequirementsConfig

func LoadRequirementsConfig(dir string, failOnValidationErrors bool) (*RequirementsConfig, string, error)

LoadRequirementsConfig loads the project configuration if there is a project configuration file if there is not a file called `jx-requirements.yml` in the given dir we will scan up the parent directories looking for the requirements file as we often run 'jx' steps in sub directories.

func LoadRequirementsConfigFile

func LoadRequirementsConfigFile(fileName string, failOnValidationErrors bool) (*RequirementsConfig, error)

LoadRequirementsConfigFile loads a specific project YAML configuration file

func NewRequirementsConfig

func NewRequirementsConfig() *RequirementsConfig

NewRequirementsConfig creates a default configuration file

func (*RequirementsConfig) DeepCopy

func (in *RequirementsConfig) DeepCopy() *RequirementsConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequirementsConfig.

func (*RequirementsConfig) DeepCopyInto

func (in *RequirementsConfig) DeepCopyInto(out *RequirementsConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RequirementsConfig) Environment

func (c *RequirementsConfig) Environment(name string) (*EnvironmentConfig, error)

Environment looks up the environment configuration based on environment name

func (*RequirementsConfig) EnvironmentMap

func (c *RequirementsConfig) EnvironmentMap() map[string]interface{}

EnvironmentMap creates a map of maps tree which can be used inside Go templates to access the environment configurations

func (*RequirementsConfig) IsCloudProvider

func (c *RequirementsConfig) IsCloudProvider() bool

IsCloudProvider returns true if the kubenretes provider is a cloud

func (*RequirementsConfig) IsEmpty

func (c *RequirementsConfig) IsEmpty() bool

IsEmpty returns true if this configuration is empty

func (*RequirementsConfig) IsLazyCreateSecrets

func (c *RequirementsConfig) IsLazyCreateSecrets(flag string) (bool, error)

IsLazyCreateSecrets returns a boolean whether secrets should be lazily created

func (*RequirementsConfig) MergeSave

func (c *RequirementsConfig) MergeSave(src *RequirementsConfig, requirementsFileName string) error

MergeSave attempts to merge the provided RequirementsConfig with the caller's data. It does so overriding values in the source struct with non-zero values from the provided struct it defines non-zero per property and not for a while embedded struct, meaning that nested properties in embedded structs should also be merged correctly. if a slice is added a transformer will be needed to handle correctly merging the contained values

func (*RequirementsConfig) OverrideRequirementsFromEnvironment

func (c *RequirementsConfig) OverrideRequirementsFromEnvironment(gkeProjectNumber func(projectId string) (string, error))

OverrideRequirementsFromEnvironment allows properties to be overridden with environment variables

func (*RequirementsConfig) SaveConfig

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

SaveConfig saves the configuration file to the given project directory

func (*RequirementsConfig) ToMap

func (c *RequirementsConfig) ToMap() (map[string]interface{}, error)

ToMap converts this object to a map of maps for use in helm templating

type RequirementsValues

type RequirementsValues struct {
	// RequirementsConfig contains the logical installation requirements
	RequirementsConfig *RequirementsConfig `json:"jxRequirements,omitempty"`
}

RequirementsValues contains the logical installation requirements in the `jx-requirements.yml` file as helm values

func (*RequirementsValues) DeepCopy

func (in *RequirementsValues) DeepCopy() *RequirementsValues

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequirementsValues.

func (*RequirementsValues) DeepCopyInto

func (in *RequirementsValues) DeepCopyInto(out *RequirementsValues)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SecretStorageType

type SecretStorageType string

SecretStorageType is the type of storage used for secrets

const (
	// SecretStorageTypeVault specifies that we use vault to store secrets
	SecretStorageTypeVault SecretStorageType = "vault"
	// SecretStorageTypeLocal specifies that we use the local file system in
	// `~/.jx/localSecrets` to store secrets
	SecretStorageTypeLocal SecretStorageType = "local"
)

type StorageConfig

type StorageConfig struct {
	// Logs for storing build logs
	Logs StorageEntryConfig `json:"logs"`
	// Tests for storing test results, coverage + code quality reports
	Reports StorageEntryConfig `json:"reports"`
	// Repository for storing repository artifacts
	Repository StorageEntryConfig `json:"repository"`
	// Backup for backing up kubernetes resource
	Backup StorageEntryConfig `json:"backup"`
}

StorageConfig contains dns specific requirements

func (*StorageConfig) DeepCopy

func (in *StorageConfig) DeepCopy() *StorageConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageConfig.

func (*StorageConfig) DeepCopyInto

func (in *StorageConfig) DeepCopyInto(out *StorageConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type StorageEntryConfig

type StorageEntryConfig struct {
	// Enabled if the storage is enabled
	Enabled bool `json:"enabled"`
	// URL the cloud storage bucket URL such as 'gs://mybucket' or 's3://foo' or `azblob://thingy'
	// see https://jenkins-x.io/architecture/storage/
	URL string `json:"url"`
}

StorageEntryConfig contains dns specific requirements for a kind of storage

func (*StorageEntryConfig) DeepCopy

func (in *StorageEntryConfig) DeepCopy() *StorageEntryConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageEntryConfig.

func (*StorageEntryConfig) DeepCopyInto

func (in *StorageEntryConfig) DeepCopyInto(out *StorageEntryConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TLSConfig

type TLSConfig struct {
	// TLS enabled
	Enabled bool `json:"enabled"`
	// Email address to register with services like LetsEncrypt
	Email string `json:"email"`
	// Production false uses self-signed certificates from the LetsEncrypt staging server, true enables the production
	// server which incurs higher rate limiting https://letsencrypt.org/docs/rate-limits/
	Production bool `json:"production"`
	// SecretName the name of the secret which contains the TLS certificate
	SecretName string `json:"secretName,omitempty"`
}

TLSConfig contains TLS specific requirements

func (*TLSConfig) DeepCopy

func (in *TLSConfig) DeepCopy() *TLSConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSConfig.

func (*TLSConfig) DeepCopyInto

func (in *TLSConfig) DeepCopyInto(out *TLSConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UserNameEmailConfig

type UserNameEmailConfig struct {
	// Username the username of the user
	Username string `json:"username,omitempty"`
	// Email the email address of the user
	Email string `json:"email,omitempty"`
}

UserNameEmailConfig contains the user name and email of a user (e.g. pipeline user)

func (*UserNameEmailConfig) DeepCopy

func (in *UserNameEmailConfig) DeepCopy() *UserNameEmailConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserNameEmailConfig.

func (*UserNameEmailConfig) DeepCopyInto

func (in *UserNameEmailConfig) DeepCopyInto(out *UserNameEmailConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VaultAWSConfig

type VaultAWSConfig struct {
	VaultAWSUnsealConfig
	AutoCreate          bool   `json:"autoCreate,omitempty"`
	DynamoDBTable       string `json:"dynamoDBTable,omitempty"`
	DynamoDBRegion      string `json:"dynamoDBRegion,omitempty"`
	ProvidedIAMUsername string `json:"iamUserName,omitempty"`
}

VaultAWSConfig contains all the Vault configuration needed by Vault to be deployed in AWS

func (*VaultAWSConfig) DeepCopy

func (in *VaultAWSConfig) DeepCopy() *VaultAWSConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultAWSConfig.

func (*VaultAWSConfig) DeepCopyInto

func (in *VaultAWSConfig) DeepCopyInto(out *VaultAWSConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VaultAWSUnsealConfig

type VaultAWSUnsealConfig struct {
	KMSKeyID  string `json:"kmsKeyId,omitempty"`
	KMSRegion string `json:"kmsRegion,omitempty"`
	S3Bucket  string `json:"s3Bucket,omitempty"`
	S3Prefix  string `json:"s3Prefix,omitempty"`
	S3Region  string `json:"s3Region,omitempty"`
}

VaultAWSUnsealConfig contains references to existing AWS resources that can be used to install Vault

func (*VaultAWSUnsealConfig) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultAWSUnsealConfig.

func (*VaultAWSUnsealConfig) DeepCopyInto

func (in *VaultAWSUnsealConfig) DeepCopyInto(out *VaultAWSUnsealConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VaultAzureConfig

type VaultAzureConfig struct {
	TenantID           string `json:"tenantId,omitempty"`
	VaultName          string `json:"vaultName,omitempty"`
	KeyName            string `json:"keyName,omitempty"`
	StorageAccountName string `json:"storageAccountName,omitempty"`
	ContainerName      string `json:"containerName,omitempty"`
}

VaultAzureConfig contains all the Vault configuration needed by Vault to be deployed in Azure

func (*VaultAzureConfig) DeepCopy

func (in *VaultAzureConfig) DeepCopy() *VaultAzureConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultAzureConfig.

func (*VaultAzureConfig) DeepCopyInto

func (in *VaultAzureConfig) DeepCopyInto(out *VaultAzureConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VaultConfig

type VaultConfig struct {
	// Name the name of the Vault if using Jenkins X managed Vault instance.
	// Cannot be used in conjunction with the URL attribute
	Name string `json:"name,omitempty"`

	Bucket         string `json:"bucket,omitempty" envconfig:"JX_REQUIREMENT_VAULT_BUCKET_NAME"`
	RecreateBucket bool   `json:"recreateBucket,omitempty"`

	Keyring string `json:"keyring,omitempty" envconfig:"JX_REQUIREMENT_VAULT_KEYRING_NAME"`
	Key     string `json:"key,omitempty" envconfig:"JX_REQUIREMENT_VAULT_KEY_NAME"`

	// DisableURLDiscovery allows us to optionally override the default lookup of the Vault URL, could be incluster service or external ingress
	DisableURLDiscovery bool `json:"disableURLDiscovery,omitempty"`

	// AWSConfig describes the AWS specific configuration needed for the Vault Operator.
	AWSConfig *VaultAWSConfig `json:"aws,omitempty"`

	// AzureConfig describes the Azure specific configuration needed for the Vault Operator.
	AzureConfig *VaultAzureConfig `json:"azure,omitempty"`

	// URL specifies the URL of an Vault instance to use for secret storage.
	// Needs to be specified together with the Service Account and namespace to use for connecting to Vault.
	// This cannot be used in conjunction with the Name attribute.
	URL string `json:"url,omitempty"`

	// ServiceAccount is the name of the Kubernetes service account allowed to authenticate against Vault.
	ServiceAccount string `json:"serviceAccount,omitempty" envconfig:"JX_REQUIREMENT_VAULT_SA_NAME"`

	// Namespace of the Kubernetes service account allowed to authenticate against Vault.
	Namespace string `json:"namespace,omitempty"`

	// SecretEngineMountPoint is the secret engine mount point to be used for writing data into the KV engine of Vault.
	// If not specified the 'secret' is used.
	SecretEngineMountPoint string `json:"secretEngineMountPoint,omitempty"`

	// KubernetesAuthPath is the auth path of used for this cluster
	// If not specified the 'kubernetes' is used.
	KubernetesAuthPath string `json:"kubernetesAuthPath,omitempty"`
}

VaultConfig contains Vault configuration for Boot

func (*VaultConfig) DeepCopy

func (in *VaultConfig) DeepCopy() *VaultConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultConfig.

func (*VaultConfig) DeepCopyInto

func (in *VaultConfig) DeepCopyInto(out *VaultConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VeleroConfig

type VeleroConfig struct {
	// Namespace the namespace to install velero into
	Namespace string `json:"namespace,omitempty"`
	// ServiceAccount the cloud service account used to run velero
	ServiceAccount string `json:"serviceAccount,omitempty" envconfig:"JX_REQUIREMENT_VELERO_SA_NAME"`
	// Schedule of backups
	Schedule string `json:"schedule" envconfig:"JX_REQUIREMENT_VELERO_SCHEDULE"`
	// TimeToLive period for backups to be retained
	TimeToLive string `json:"ttl" envconfig:"JX_REQUIREMENT_VELERO_TTL"`
}

VeleroConfig contains the configuration for velero

func (*VeleroConfig) DeepCopy

func (in *VeleroConfig) DeepCopy() *VeleroConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VeleroConfig.

func (*VeleroConfig) DeepCopyInto

func (in *VeleroConfig) DeepCopyInto(out *VeleroConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VersionStreamConfig

type VersionStreamConfig struct {
	// URL of the version stream to use
	URL string `json:"url"`
	// Ref of the version stream to use
	Ref string `json:"ref" envconfig:"JX_REQUIREMENT_VERSIONS_GIT_REF"`
}

VersionStreamConfig contains version stream config

func (*VersionStreamConfig) DeepCopy

func (in *VersionStreamConfig) DeepCopy() *VersionStreamConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VersionStreamConfig.

func (*VersionStreamConfig) DeepCopyInto

func (in *VersionStreamConfig) DeepCopyInto(out *VersionStreamConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WebhookType

type WebhookType string

WebhookType is the type of a webhook strategy

const (
	// WebhookTypeNone if we have yet to define a webhook
	WebhookTypeNone WebhookType = ""
	// WebhookTypeProw specifies that we use prow for webhooks
	// see: https://github.com/kubernetes/test-infra/tree/master/prow
	WebhookTypeProw WebhookType = "prow"
	// WebhookTypeLighthouse specifies that we use lighthouse for webhooks
	// see: https://github.com/jenkins-x/lighthouse
	WebhookTypeLighthouse WebhookType = "lighthouse"
	// WebhookTypeJenkins specifies that we use jenkins webhooks
	WebhookTypeJenkins WebhookType = "jenkins"
)

Jump to

Keyboard shortcuts

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