v4beta1

package
v4.7.4 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: Apache-2.0 Imports: 20 Imported by: 57

Documentation

Overview

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

Index

Constants

View Source
const (
	RequirementsName = "Requirements"

	// DefaultFailOnValidationError by default fail if validation fails when reading jx-requirements
	DefaultFailOnValidationError = true

	// Replaces the optional requirement and making jx hardcoded, if folks try changing the namespace in a jx-requirements.yml file it is highly likely to fail
	DefaultNamespace = "jx"
)
View Source
const (
	// RequirementsConfigFileName is the name of the requirements configuration file
	RequirementsConfigFileName = "jx-requirements.yml"
	// 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"
	// 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"
	// 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"
	// RequirementStorageBackupURL backup storage url
	RequirementStorageBackupURL = "JX_REQUIREMENT_STORAGE_BACKUP_URL"
	// RequirementStorageLogsURL logs storage url
	RequirementStorageLogsURL = "JX_REQUIREMENT_STORAGE_LOGS_URL"
	// RequirementStorageReportsURL report storage url
	RequirementStorageReportsURL = "JX_REQUIREMENT_STORAGE_REPORTS_URL"
	// RequirementStorageRepositoryURL repository storage url
	RequirementStorageRepositoryURL = "JX_REQUIREMENT_STORAGE_REPOSITORY_URL"
	// RequirementGkeProjectNumber is the gke project number
	RequirementGkeProjectNumber = "JX_REQUIREMENT_GKE_PROJECT_NUMBER"
	// RequirementDevEnvApprovers contains the optional list of users to populate the dev env's OWNERS with
	RequirementDevEnvApprovers = "JX_REQUIREMENT_DEV_ENV_APPROVERS"
)
View Source
const (
	// SettingsFileName the default file name of the settings file
	SettingsFileName = "settings.yaml"
)

Variables

View Source
var (
	// SchemeBuilder for building the schema :)
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme helper
	AddToScheme = SchemeBuilder.AddToScheme
)

ChartRepositoryTypeValues the string values for the secret storage

View Source
var IngressTypeValues = []string{"ingress", "istio", "httproute"}

IngressTypeValues the string values for the ingress types

RepositoryTypeValues the string values for the repository types

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: core.GroupName, Version: core.Version}

SchemeGroupVersion is group version used to register these objects

SecretStorageTypeValues the string values for the secret storage

View Source
var WebhookTypeValues = []string{string(WebhookTypeLighthouse)}

WebhookTypeValues the string values for the webhook types

Functions

func IsNewRequirementsFile added in v4.0.7

func IsNewRequirementsFile(s string) bool

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func MissingRequirement

func MissingRequirement(property string, fileName string) error

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

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type AutoUpdateConfig

type AutoUpdateConfig struct {
	// Enabled autoupdate
	Enabled bool `json:"enabled"`
	// Schedule cron of auto updates
	Schedule string `json:"schedule"`
	// AutoMerge if enabled lets auto merge any generated update PullRequests on the dev cluster git repository
	AutoMerge bool `json:"autoMerge,omitempty"`
}

AutoUpdateConfig contains auto update config

type AzureClusterNodesConfig added in v4.7.0

type AzureClusterNodesConfig struct {
	ClientID string `json:"clientID"`
}

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           *AzureDNSConfig          `json:"dns,omitempty"`
	AzureSecretStorageConfig *AzureSecretConfig       `json:"secretStorage,omitempty"`
	AzureStorageConfig       *AzureStorageConfig      `json:"storage,omitempty"`
	AzureClusterNodesConfig  *AzureClusterNodesConfig `json:"clusterNodes,omitempty"`
}

AzureConfig contains Azure specific requirements

type AzureDNSConfig

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

type AzureSecretConfig added in v4.0.13

type AzureSecretConfig struct {
	KeyVaultName string `json:"keyVaultName,omitempty"`
}

type AzureStorageConfig added in v4.0.15

type AzureStorageConfig struct {
	StorageAccountName string `json:"storageAccountName,omitempty"`
}

type ChartRepositoryType added in v4.0.19

type ChartRepositoryType string

ChartRepositoryType is the type of chart repository used for helm

const (
	// ChartRepositoryTypeNone no kind so implies a chart repository you push tarballs to like chart museum / nexus
	ChartRepositoryTypeNone ChartRepositoryType = ""
	// ChartRepositoryTypeOCI specifies that we use OCI (container images) to store charts
	ChartRepositoryTypeOCI ChartRepositoryType = "oci"
	// ChartRepositoryTypePages specifies that we use github pages (a branch in git) to store helm charts
	ChartRepositoryTypePages ChartRepositoryType = "pages"
)

type ClusterConfig

type ClusterConfig struct {
	DestinationConfig

	// AzureConfig the azure specific configuration
	AzureConfig *AzureConfig `json:"azure,omitempty"`
	// GKEConfig the gke specific configuration
	GKEConfig *GKEConfig `json:"gke,omitempty"`
	// 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"`
	// 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"`
	// 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"`
	// VaultSAName the service account name for vault
	// KanikoSAName the service account name for kaniko
	KanikoSAName string `json:"kanikoSAName,omitempty" envconfig:"JX_REQUIREMENT_KANIKO_SA_NAME"`
	// DevEnvApprovers contains an optional list of approvers to populate the initial OWNERS file in the dev env repo
	DevEnvApprovers []string `json:"devEnvApprovers,omitempty"`
	// Issue tracker to use for generating changelog
	IssueTracker *IssueTracker `json:"issueProvider,omitempty"`
}

ClusterConfig contains cluster specific requirements

func (*ClusterConfig) UnmarshalJSON

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

UnmarshalJSON method handles the rename of EnvironmentGitPrivate to EnvironmentGitPublic.

type DestinationConfig added in v4.0.20

type DestinationConfig struct {
	// ChartRepository the repository URL to deploy charts to
	ChartRepository string `json:"chartRepository,omitempty" envconfig:"JX_REQUIREMENT_CHART_REPOSITORY"`
	// ChartKind the chart repository kind (e.g. normal, OCI or github pages)
	ChartKind ChartRepositoryType `json:"chartKind,omitempty" envconfig:"JX_REQUIREMENT_CHART_KIND"`
	// ChartSecret an optional secret name used to be able to push to chart repositories
	ChartSecret string `json:"chartSecret,omitempty" envconfig:"JX_REQUIREMENT_CHART_SECRET"`
	// Registry the host name of the container registry
	Registry string `json:"registry,omitempty" envconfig:"JX_REQUIREMENT_REGISTRY"`
	// DockerRegistryOrg the default organisation used for container images
	DockerRegistryOrg string `json:"dockerRegistryOrg,omitempty"`
	// KanikoFlags allows global kaniko flags to be supplied such as to disable host verification
	KanikoFlags string `json:"kanikoFlags,omitempty" envconfig:"JX_REQUIREMENT_KANIKO_FLAGS"`
	// EnvironmentGitOwner the default git owner for environment repositories if none is specified explicitly
	EnvironmentGitOwner string `json:"environmentGitOwner,omitempty" envconfig:"JX_REQUIREMENT_ENV_GIT_OWNER"`
}

DestinationConfig the common cluster settings that can be specified in settings or requirements

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"`
	// GitURL optional git URL for the git repository for the environment. If its not specified its generated from the
	// git server, kind, owner and repository
	GitURL string `json:"gitUrl,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"`
	// Should pull requests be labeled so that if there is an existing pull request for the application it can be found and updated
	ReusePullRequest bool `json:"reusePullRequest,omitempty"`
	// Namespace is the target namespace for deploying resources in this environment.  Will default to "jx-{{ .Key }}" if omitted
	Namespace string `json:"namespace,omitempty"`
}

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

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

type IngressConfig

type IngressConfig struct {
	// APIVersion optional Ingress API version to use. Otherwise defaults to v1
	APIVersion string `json:"apiVersion,omitempty"`
	// DNS is enabled
	ExternalDNS bool `json:"externalDNS,omitempty"`
	// 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"`
	// Kind the kind of ingress used (ingress v1, ingress v2, istio etc)
	Kind IngressType `json:"kind,omitempty"`
	// 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"`
	// 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,omitempty"`
	// Annotations optional annotations added to ingresses
	Annotations map[string]string `json:"annotations,omitempty"`
}

IngressConfig contains dns specific requirements

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 IngressType added in v4.0.16

type IngressType string

IngressType is the type of a ingress strategy

const (
	// IngressTypeNone if we have yet to define a ingress type
	IngressTypeNone IngressType = ""
	// IngressTypeIngress uses the kubernetes extensions/v1 Ingress resources to create ingress
	IngressTypeIngress IngressType = "ingress"
	// IngressTypeIstio uses istio VirtualService resources to implement ingress instead of the extensions/v1 Ingress resources
	IngressTypeIstio IngressType = "istio"
	// IngressTypeHTTPRoute uses the Ingress V2 / HTTPRoute resources - see: https://kubernetes-sigs.github.io/service-apis/http-routing/
	IngressTypeHTTPRoute IngressType = "httproute"
)

type IssueTracker added in v4.2.0

type IssueTracker struct {
	Jira *JiraTracker `json:"jira,omitempty"`
}

IssueTracker is currently only used for generating the changelog. If Jira isn't set it defaults to the git provider.

type JiraTracker added in v4.2.0

type JiraTracker struct {
	ServerURL string `json:"serverUrl,omitempty"`
	Username  string `json:"userName,omitempty"`
	// The Jira API token is taken from the environment variable JIRA_API_TOKEN. Can be populated using the jx-boot-job-env-vars secret.
	// Not used at the moment
	Project string `json:"project,omitempty"`
}

JiraTracker has settings for jira

type LegacyStorageConfig deprecated added in v4.0.9

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

Deprecated: migrate to top level Requirements object

type LegacyStorageEntryConfig deprecated added in v4.0.9

type LegacyStorageEntryConfig 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"`
}

Deprecated: migrate to top level Requirements object

type MavenRepositoryConfig added in v4.1.4

type MavenRepositoryConfig struct {
	// ReleaseURL the release distribution URL
	ReleaseURL string `json:"releaseUrl,omitempty"`
	// SnapshotURL the snapshop distribution URL
	SnapshotURL string `json:"snapshotUrl,omitempty"`
}

MavenRepositoryConfig contains optional configuration for maven repository configuration

type RepositoryConfig added in v4.1.4

type RepositoryConfig struct {
	// Maven the username of the user
	Maven *MavenRepositoryConfig `json:"maven,omitempty"`
}

RepositoryConfig contains optional language specific repository configurations

type RepositoryType

type RepositoryType string

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

const (
	// 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 Requirements

type Requirements struct {
	metav1.TypeMeta `json:",inline"`

	// Spec the definition of the secret mappings
	Spec RequirementsConfig `json:"spec"`
}

Requirements represents a collection installation requirements for Jenkins X

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

func LoadRequirementsConfig

func LoadRequirementsConfig(dir string, failOnValidationErrors bool) (*Requirements, 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) (*Requirements, error)

LoadRequirementsConfigFile loads a specific project YAML configuration file

func LoadRequirementsConfigFileNoDefaults added in v4.0.10

func LoadRequirementsConfigFileNoDefaults(fileName string, failOnValidationErrors bool) (*Requirements, error)

LoadRequirementsConfigFile loads a specific project YAML configuration file

func NewRequirementsConfig

func NewRequirementsConfig() *Requirements

NewRequirementsConfig creates a default configuration file

func (*Requirements) MergeSave added in v4.0.6

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

MergeSave attempts to merge the provided Requirements 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 (*Requirements) SaveConfig added in v4.0.6

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

type RequirementsConfig

type RequirementsConfig struct {
	// AutoUpdate contains auto update config
	AutoUpdate AutoUpdateConfig `json:"autoUpdate,omitempty"`
	// Cluster contains cluster specific requirements
	Cluster ClusterConfig `json:"cluster"`
	// Environments the requirements for the environments
	Environments []EnvironmentConfig `json:"environments,omitempty"`
	// ExtraDomains to expose alternate services with custom ingress for specific applications
	ExtraDomains []IngressConfig `json:"extraDomains,omitempty"`
	// Ingress contains ingress specific requirements
	Ingress IngressConfig `json:"ingress"`
	// Kuberhealthy indicates if we have already installed Kuberhealthy upfront in the kubernetes cluster
	Kuberhealthy bool `json:"kuberhealthy,omitempty"`
	// 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"`
	// Repositories the configuration for language specific repositories
	Repositories *RepositoryConfig `json:"repositories,omitempty"`
	// 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,omitempty"`
	// Terraform specifies if  we are managing the kubernetes cluster and cloud resources with Terraform
	Terraform bool `json:"terraform,omitempty"`
	// TerraformVault indicates whether Vault has been installed upfront by Terraform
	TerraformVault bool `json:"terraformVault,omitempty"`
	// Vault the configuration for vault
	Vault VaultConfig `json:"vault,omitempty"`
	// 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 (*RequirementsConfig) AddOrUpdateStorageURL added in v4.0.4

func (c *RequirementsConfig) AddOrUpdateStorageURL(name, storageURL string)

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) GetStorageURL

func (c *RequirementsConfig) GetStorageURL(name string) string

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) OverrideRequirementsFromEnvironment

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

OverrideRequirementsFromEnvironment allows properties to be overridden with environment variables

func (*RequirementsConfig) RemoveStorageURL added in v4.0.4

func (c *RequirementsConfig) RemoveStorageURL(name string)

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

type ResourceReference

type ResourceReference struct {
	// API version of the referent.
	APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,5,opt,name=apiVersion"`
	// Kind of the referent.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
	Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
	// Name of the referent.
	// More info: http://kubernetes.io/docs/user-guide/identifiers#names
	Name string `json:"name" protobuf:"bytes,3,opt,name=name"`
	// UID of the referent.
	// More info: http://kubernetes.io/docs/user-guide/identifiers#uids
	UID types.UID `json:"uid,omitempty" protobuf:"bytes,4,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"`
}

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 Settings added in v4.0.20

type Settings struct {
	metav1.TypeMeta `json:",inline"`

	// Spec the definition of the settings
	Spec SettingsConfig `json:"spec"`
}

Settings represents application specific settings for use inside a pipeline of an application

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

type SettingsConfig added in v4.0.20

type SettingsConfig struct {
	// GitURL the git URL for your development cluster where the default environments and cluster configuration are specified
	GitURL string `json:"gitUrl,omitempty"`
	// Issue tracker to use for generating changelog
	IssueTracker *IssueTracker `json:"issueProvider,omitempty"`
	// Destination settings to define where release artifacts go in terms of containers and charts
	Destination *DestinationConfig `json:"destination"`
	// PromoteEnvironments the environments for promotion
	PromoteEnvironments []EnvironmentConfig `json:"promoteEnvironments,omitempty"`
	// IgnoreDevEnvironments if enabled do not inherit any environments from the
	IgnoreDevEnvironments bool `json:"ignoreDevEnvironments,omitempty"`
}

SettingsConfig contains the optional overrides you can specify on a per application basis

type StorageConfig

type StorageConfig struct {
	// Name of the bucket
	Name string `json:"name"`
	// 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"`
}

StorageConfig contains dns specific requirements

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

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)

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

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

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

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

type WebhookType

type WebhookType string

WebhookType is the type of a webhook strategy

const (
	// WebhookTypeLighthouse specifies that we use lighthouse for webhooks
	// see: https://github.com/jenkins-x/lighthouse
	WebhookTypeLighthouse WebhookType = "lighthouse"
)

Jump to

Keyboard shortcuts

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