jx: github.com/jenkins-x/jx/pkg/cmd/clients/fake Index | Files

package fake

import "github.com/jenkins-x/jx/pkg/cmd/clients/fake"

Index

Package Files

fake_factory.go

func NewFakeFactory Uses

func NewFakeFactory() clients.Factory

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

type FakeFactory Uses

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

FakeFactory points to a fake factory implementation

func NewFakeFactoryFromClients Uses

func NewFakeFactoryFromClients(apiClient apiextensionsclientset.Interface,
    jxClient versioned.Interface,
    kubeClient kubernetes.Interface) *FakeFactory

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

func (*FakeFactory) AuthMergePipelineSecrets Uses

func (f *FakeFactory) AuthMergePipelineSecrets(config *auth.AuthConfig, secrets *corev1.SecretList, kind string, isCDPipeline bool) error

AuthMergePipelineSecrets merges the current config with the pipeline secrets provided in k8s secrets

func (*FakeFactory) CreateAddonAuthConfigService Uses

func (f *FakeFactory) CreateAddonAuthConfigService(namespace string, secrets *corev1.SecretList) (auth.ConfigService, error)

CreateAddonAuthConfigService creates a new addon auth configuration service

func (*FakeFactory) CreateApiExtensionsClient Uses

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

CreateApiExtensionsClient creates a new Kubernetes ApiExtensions client

func (*FakeFactory) CreateAuthConfigService Uses

func (f *FakeFactory) CreateAuthConfigService(configName string, namespace string) (auth.ConfigService, error)

CreateAuthConfigService creates a new service saving auth config under the provided name. Depending on the factory, It will either save the config to the local file-system, or a Vault

func (*FakeFactory) CreateCertManagerClient Uses

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

CreateCertManagerClient creates a new Kuberntes client for cert-manager resources

func (*FakeFactory) CreateChartmuseumAuthConfigService Uses

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

CreateChartmuseumAuthConfigService creates a new Chartmuseum authentication configuration service

func (*FakeFactory) CreateChatAuthConfigService Uses

func (f *FakeFactory) CreateChatAuthConfigService(namespace string, secrets *corev1.SecretList) (auth.ConfigService, error)

CreateChatAuthConfigService creates a new chat configuration service

func (*FakeFactory) CreateComplianceClient Uses

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

CreateComplianceClient creates a new Sonobuoy compliance client

func (*FakeFactory) CreateCustomJenkinsClient Uses

func (f *FakeFactory) CreateCustomJenkinsClient(kubeClient kubernetes.Interface, ns string, jenkinsServiceName string, in terminal.FileReader, out terminal.FileWriter, errOut io.Writer) (gojenkins.JenkinsClient, error)

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

func (*FakeFactory) CreateDynamicClient Uses

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

CreateDynamicClient creates a new Kubernetes Dynamic client

func (*FakeFactory) CreateGitProvider Uses

func (f *FakeFactory) CreateGitProvider(gitURL string, message string, authConfigSvc auth.ConfigService, gitKind string, batchMode bool, gitter gits.Gitter, in terminal.FileReader, out terminal.FileWriter, errOut io.Writer) (gits.GitProvider, error)

CreateGitProvider creates a new Git provider

func (*FakeFactory) CreateHelm Uses

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

CreateHelm creates a new Helm client

func (*FakeFactory) CreateIssueTrackerAuthConfigService Uses

func (f *FakeFactory) CreateIssueTrackerAuthConfigService(namespace string, secrets *corev1.SecretList) (auth.ConfigService, error)

CreateIssueTrackerAuthConfigService creates a new issuer tracker configuration service

func (*FakeFactory) CreateJXClient Uses

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

CreateJXClient creates a new Kubernetes client for Jenkins X CRDs

func (*FakeFactory) CreateJenkinsAuthConfigService Uses

func (f *FakeFactory) CreateJenkinsAuthConfigService(c kubernetes.Interface, ns string, jenkinsServiceName string) (auth.ConfigService, error)

CreateJenkinsAuthConfigService creates a new Jenkins authentication configuration service

func (*FakeFactory) CreateJenkinsClient Uses

func (f *FakeFactory) CreateJenkinsClient(kubeClient kubernetes.Interface, ns string, in terminal.FileReader, out terminal.FileWriter, errOut io.Writer) (gojenkins.JenkinsClient, error)

CreateJenkinsClient creates a new Jenkins client

func (*FakeFactory) CreateKnativeBuildClient Uses

func (f *FakeFactory) CreateKnativeBuildClient() (build.Interface, string, error)

CreateKnativeBuildClient creates knative build client

func (*FakeFactory) CreateKnativeServeClient Uses

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

CreateKnativeServeClient create a new Kubernetes client for Knative serve resources

func (*FakeFactory) CreateKubeClient Uses

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

CreateKubeClient creates a new Kubernetes client

func (*FakeFactory) CreateKubeConfig Uses

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

CreateKubeConfig creates the kubernetes configuration

func (*FakeFactory) CreateMetricsClient Uses

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

CreateMetricsClient creates a new Kubernetes metrics client

func (*FakeFactory) CreateSystemVaultClient Uses

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

CreateSystemVaultClient gets the system vault client for managing the secrets

func (*FakeFactory) CreateTable Uses

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

CreateTable creates a new table

func (*FakeFactory) CreateTektonClient Uses

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

CreateTektonClient create a new Kubernetes client for Tekton resources

func (*FakeFactory) CreateVaultClient Uses

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

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

func (*FakeFactory) CreateVaultOperatorClient Uses

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

CreateVaultOperatorClient creates a new vault operator client

func (*FakeFactory) GetCustomJenkinsURL Uses

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

GetCustomJenkinsURL gets a custom jenkins App service URL

func (*FakeFactory) GetDelegateFactory Uses

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

GetDelegateFactory returns the delegate factory

func (*FakeFactory) GetJenkinsURL Uses

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

GetJenkinsURL gets the Jenkins URL for the given namespace

func (*FakeFactory) ImpersonateUser Uses

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

ImpersonateUser returns a new factory impersonating the given user

func (*FakeFactory) IsInCDPipeline Uses

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 Uses

func (f *FakeFactory) IsInCluster() bool

function to tell if we are running incluster

func (*FakeFactory) ResetSecretsLocation Uses

func (f *FakeFactory) ResetSecretsLocation()

ResetSecretsLocation resets the location of the secrets stored in memory

func (*FakeFactory) SecretsLocation Uses

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

SecretsLocation indicates the location where the secrets are stored

func (*FakeFactory) SetBatch Uses

func (f *FakeFactory) SetBatch(batch bool)

SetBatch sets batch

func (*FakeFactory) SetDelegateFactory Uses

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

SetDelegateFactory sets the delegate factory

func (*FakeFactory) SetNamespace Uses

func (f *FakeFactory) SetNamespace(ns string)

SetNamespace sets the default namespace

func (*FakeFactory) SetOffline Uses

func (f *FakeFactory) SetOffline(offline bool)

SetOffline sets offline

func (*FakeFactory) SetSecretsLocation Uses

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 Uses

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

WithBearerToken returns a new factory with bearer token

Package fake imports 35 packages (graph) and is imported by 1 packages. Updated 2019-08-05. Refresh now. Tools for package owners.