Version: v2.0.400-0...-20b1bbf Latest Latest

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

Go to latest
Published: Aug 2, 2021 License: Apache-2.0 Imports: 40 Imported by: 0




This section is empty.


This section is empty.


func NewFakeFactory

func NewFakeFactory() clients.Factory

NewFakeFactory creates a fake factory which uses fake k8s clients for testing


type FakeFactory

type FakeFactory struct {
	Batch bool
	// contains filtered or unexported fields

FakeFactory points to a fake factory implementation

func NewFakeFactoryFromClients

func NewFakeFactoryFromClients(apiClient apiextensionsclientset.Interface,
	jxClient versioned.Interface,
	kubeClient kubernetes.Interface,
	tektonClient tektonclient.Interface,
	dyncClient dynamic.Interface) *FakeFactory

NewFakeFactoryFromClients creates a fake factory which uses fake k8s clients for testing

func (*FakeFactory) CreateAddonAuthConfigService

func (f *FakeFactory) CreateAddonAuthConfigService(namespace string, serviceKind string) (auth.ConfigService, error)

CreateAddonAuthConfigService creates a new addon auth configuration service

func (*FakeFactory) CreateApiExtensionsClient

func (f *FakeFactory) CreateApiExtensionsClient() (apiextensionsclientset.Interface, error)

CreateApiExtensionsClient creates a new Kubernetes ApiExtensions client

func (*FakeFactory) CreateAuthConfigService

func (f *FakeFactory) CreateAuthConfigService(fileName string, namespace string,
	serverKind string, serviceKind string) (auth.ConfigService, error)

CreateAuthConfigService creates a new service which loads/saves the auth config from/to different sources depending on the current secrets location and cluster context. The sources can be vault, kubernetes secrets or local file.

func (*FakeFactory) CreateCertManagerClient

func (f *FakeFactory) CreateCertManagerClient() (certmngclient.Interface, error)

CreateCertManagerClient creates a new Kuberntes client for cert-manager resources

func (*FakeFactory) CreateChartmuseumAuthConfigService

func (f *FakeFactory) CreateChartmuseumAuthConfigService(namespace string, serviceKind string) (auth.ConfigService, error)

CreateChartmuseumAuthConfigService creates a new Chartmuseum authentication configuration service

func (*FakeFactory) CreateChatAuthConfigService

func (f *FakeFactory) CreateChatAuthConfigService(namespace string, serviceKind string) (auth.ConfigService, error)

CreateChatAuthConfigService creates a new chat configuration service

func (*FakeFactory) CreateComplianceClient

func (f *FakeFactory) CreateComplianceClient() (*client.SonobuoyClient, error)

CreateComplianceClient creates a new Sonobuoy compliance client

func (*FakeFactory) CreateCustomJenkinsClient

func (f *FakeFactory) CreateCustomJenkinsClient(kubeClient kubernetes.Interface, ns string, jenkinsServiceName string, handles util.IOFileHandles) (gojenkins.JenkinsClient, error)

CreateCustomJenkinsClient creates a new Jenkins client for the given custom Jenkins App

func (*FakeFactory) CreateDynamicClient

func (f *FakeFactory) CreateDynamicClient() (dynamic.Interface, string, error)

CreateDynamicClient creates a new Kubernetes Dynamic client

func (*FakeFactory) CreateExternalVaultClient

func (f *FakeFactory) CreateExternalVaultClient(vaultConfig vault.Vault, kubeClient kubernetes.Interface) (vault.Client, error)

func (*FakeFactory) CreateGitAuthConfigService

func (f *FakeFactory) CreateGitAuthConfigService(namespace string, serviceKind string) (auth.ConfigService, error)

CreateGitAuthConfigService creates a new git auth configuration service

func (*FakeFactory) CreateGitProvider

func (f *FakeFactory) CreateGitProvider(gitURL string, message string, authConfigSvc auth.ConfigService,
	gitKind string, ghOwner string, batchMode bool, gitter gits.Gitter, handles util.IOFileHandles) (gits.GitProvider, error)

CreateGitProvider creates a new Git provider

func (*FakeFactory) CreateHelm

func (f *FakeFactory) CreateHelm(verbose bool,
	helmBinary string,
	noTiller bool,
	helmTemplate bool) helm.Helmer

CreateHelm creates a new Helm client

func (*FakeFactory) CreateInternalVaultClient

func (f *FakeFactory) CreateInternalVaultClient(name string, namespace string) (vault.Client, error)

CreateInternalVaultClient returns the given vault client for managing secrets Will use default values for name and namespace if nil values are applied

func (*FakeFactory) CreateIssueTrackerAuthConfigService

func (f *FakeFactory) CreateIssueTrackerAuthConfigService(namespace string, serviceKind string) (auth.ConfigService, error)

CreateIssueTrackerAuthConfigService creates a new issuer tracker configuration service

func (*FakeFactory) CreateJXClient

func (f *FakeFactory) CreateJXClient() (versioned.Interface, string, error)

CreateJXClient creates a new Kubernetes client for Jenkins X CRDs

func (*FakeFactory) CreateJenkinsAuthConfigService

func (f *FakeFactory) CreateJenkinsAuthConfigService(namespace string, jenkinsServiceName string) (auth.ConfigService, error)

CreateJenkinsAuthConfigService creates a new Jenkins authentication configuration service

func (*FakeFactory) CreateJenkinsClient

func (f *FakeFactory) CreateJenkinsClient(kubeClient kubernetes.Interface, ns string, handles util.IOFileHandles) (gojenkins.JenkinsClient, error)

CreateJenkinsClient creates a new Jenkins client

func (*FakeFactory) CreateKnativeServeClient

func (f *FakeFactory) CreateKnativeServeClient() (kserve.Interface, string, error)

CreateKnativeServeClient create a new Kubernetes client for Knative serve resources

func (*FakeFactory) CreateKubeClient

func (f *FakeFactory) CreateKubeClient() (kubernetes.Interface, string, error)

CreateKubeClient creates a new Kubernetes client

func (*FakeFactory) CreateKubeConfig

func (f *FakeFactory) CreateKubeConfig() (*rest.Config, error)

CreateKubeConfig creates the kubernetes configuration

func (*FakeFactory) CreateKustomizer

func (f *FakeFactory) CreateKustomizer() kustomize.Kustomizer

CreateKustomizer creates a Kustomizer client

func (*FakeFactory) CreateLocalGitAuthConfigService

func (f *FakeFactory) CreateLocalGitAuthConfigService() (auth.ConfigService, error)

CreateLocalGitAuthConfigService creates a new service which loads/saves the auth config from/to a local file.

func (*FakeFactory) CreateMetricsClient

func (f *FakeFactory) CreateMetricsClient() (metricsclient.Interface, error)

CreateMetricsClient creates a new Kubernetes metrics client

func (*FakeFactory) CreateProwJobClient

func (f *FakeFactory) CreateProwJobClient() (prowjobclient.Interface, string, error)

CreateProwJobClient creates a new Kubernetes client for ProwJob resources

func (*FakeFactory) CreateSystemVaultClient

func (f *FakeFactory) CreateSystemVaultClient(namespace string) (vault.Client, error)

CreateSystemVaultClient gets the system vault client for managing the secrets

func (*FakeFactory) CreateTable

func (f *FakeFactory) CreateTable(out io.Writer) table.Table

CreateTable creates a new table

func (*FakeFactory) CreateTektonClient

func (f *FakeFactory) CreateTektonClient() (tektonclient.Interface, string, error)

CreateTektonClient create a new Kubernetes client for Tekton resources

func (*FakeFactory) CreateTektonPipelineResourceClient

func (f *FakeFactory) CreateTektonPipelineResourceClient() (resourceclient.Interface, string, error)

CreateTektonPipelineResourceClient create a new Kubernetes client for Tekton PipelineResource resources

func (*FakeFactory) CreateVaultOperatorClient

func (f *FakeFactory) CreateVaultOperatorClient() (vaultoperatorclient.Interface, error)

CreateVaultOperatorClient creates a new vault operator client

func (*FakeFactory) GetCustomJenkinsURL

func (f *FakeFactory) GetCustomJenkinsURL(kubeClient kubernetes.Interface, ns string, jenkinsServiceName string) (string, error)

GetCustomJenkinsURL gets a custom jenkins App service URL

func (*FakeFactory) GetDelegateFactory

func (f *FakeFactory) GetDelegateFactory() clients.Factory

GetDelegateFactory returns the delegate factory

func (*FakeFactory) GetJenkinsURL

func (f *FakeFactory) GetJenkinsURL(kubeClient kubernetes.Interface, ns string) (string, error)

GetJenkinsURL gets the Jenkins URL for the given namespace

func (*FakeFactory) ImpersonateUser

func (f *FakeFactory) ImpersonateUser(user string) clients.Factory

ImpersonateUser returns a new factory impersonating the given user

func (*FakeFactory) IsInCDPipeline

func (f *FakeFactory) IsInCDPipeline() bool

IsInCDPipeline we should only load the git / issue tracker API tokens if the current pod is in a pipeline and running as the Jenkins service account

func (*FakeFactory) IsInCluster

func (f *FakeFactory) IsInCluster() bool

function to tell if we are running incluster

func (*FakeFactory) ResetSecretsLocation

func (f *FakeFactory) ResetSecretsLocation()

ResetSecretsLocation resets the location of the secrets stored in memory

func (*FakeFactory) SecretsLocation

func (f *FakeFactory) SecretsLocation() secrets.SecretsLocationKind

SecretsLocation indicates the location where the secrets are stored

func (*FakeFactory) SetBatch

func (f *FakeFactory) SetBatch(batch bool)

SetBatch sets batch

func (*FakeFactory) SetDelegateFactory

func (f *FakeFactory) SetDelegateFactory(factory clients.Factory)

SetDelegateFactory sets the delegate factory

func (*FakeFactory) SetNamespace

func (f *FakeFactory) SetNamespace(ns string)

SetNamespace sets the default namespace

func (*FakeFactory) SetOffline

func (f *FakeFactory) SetOffline(offline bool)

SetOffline sets offline

func (*FakeFactory) SetSecretsLocation

func (f *FakeFactory) SetSecretsLocation(location secrets.SecretsLocationKind, persist bool) error

SetSecretsLocation configures the secrets location. It will persist the value in a config map if the persist flag is set.

func (*FakeFactory) WithBearerToken

func (f *FakeFactory) WithBearerToken(token string) clients.Factory

WithBearerToken returns a new factory with bearer token

Source Files

Jump to

Keyboard shortcuts

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