support

package
v0.0.0-...-62d03f0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GitCredentialsTemplatePath           = "../../../examples/tekton/aiedge-e2e/templates/credentials-git.secret.yaml.template"
	S3CredentialsTemplatePath            = "../../../examples/tekton/aiedge-e2e/templates/credentials-s3.secret.yaml.template"
	ImageRegistryCredentialsTemplatePath = "../../../examples/tekton/aiedge-e2e/templates/credentials-image-registry.secret.yaml.template"
	GitOpsCredentialsTemplatePath        = "../../../examples/tekton/gitops-update-pipeline/templates/example-git-credentials-secret.yaml.template"

	SelfSignedCertTemplatePath = "../../../examples/tekton/aiedge-e2e/templates/self-signed-cert.configmap.yaml.template"

	ManifestsDirectory = "../../../manifests"

	AIEdgeE2EDirectoryRelativePath    = "../../../examples/tekton/aiedge-e2e"
	GitOpsUpdateDirectoryRelativePath = "../../../examples/tekton/gitops-update-pipeline"

	TestDataDirectoryRelativePath = "../../../examples/tekton/aiedge-e2e/test-data/"
)
View Source
const (
	ConfigPath = "../config.json"
)

Variables

This section is empty.

Functions

func ClusterClientSet

func ClusterClientSet(config *rest.Config) (*kubernetes.Clientset, error)

func CreateObjectsFromResourceMap

func CreateObjectsFromResourceMap(ctx context.Context, clients *Clients, resourceMap resmap.ResMap, namespace string) error

func GetResultValueFromPipelineRun

func GetResultValueFromPipelineRun(resultName string, pipelineRun *pipelinev1.PipelineRun) (pipelinev1.ResultValue, error)

func KustomizeBuild

func KustomizeBuild(path string) (resmap.ResMap, error)

func LinkSecretToServiceAccount

func LinkSecretToServiceAccount(ctx context.Context, config *Config, serviceAccountName string, secretName string) error

func MountConfigMapAsWorkspaceToPipelineRun

func MountConfigMapAsWorkspaceToPipelineRun(configMapName string, workspaceName string, pipelineRun *pipelinev1.PipelineRun)

func MountSecretAsWorkspaceToPipelineRun

func MountSecretAsWorkspaceToPipelineRun(secretName string, workspaceName string, pipelineRun *pipelinev1.PipelineRun)

func NewArrayParamValue

func NewArrayParamValue(value []string) pipelinev1.ParamValue

func NewObjectParamValue

func NewObjectParamValue(value map[string]string) pipelinev1.ParamValue

func NewStringParamValue

func NewStringParamValue(value string) pipelinev1.ParamValue

func ReadFileAsPipelineRun

func ReadFileAsPipelineRun(path string) (pipelinev1.PipelineRun, error)

func ResourceToType

func ResourceToType[T any](resource *resource.Resource, t *T) error

func RunSetup

func RunSetup(ctx context.Context, config *Config) error

func SetPipelineRunParam

func SetPipelineRunParam(name string, value pipelinev1.ParamValue, pipelineRun *pipelinev1.PipelineRun)

func WaitFor

func WaitFor(duration time.Duration, tickRate time.Duration, f func() (bool, error)) error

Types

type Clients

type Clients struct {
	Kubernetes  *kubernetes.Clientset
	Task        pipelinev1.TaskInterface
	Pipeline    pipelinev1.PipelineInterface
	PipelineRun pipelinev1.PipelineRunInterface
}

func CreateClients

func CreateClients(namespace string) (Clients, error)

type Config

type Config struct {
	Namespace                string   `json:"namespace"`
	ImageRegistryUsername    string   `json:"image_registry_username"`
	ImageRegistryPassword    string   `json:"image_registry_password"`
	TargetImageTags          []string `json:"target_image_tags"`
	GitContainerFileRepo     string   `json:"git_container_file_repo"`
	GitContainerFileRevision string   `json:"git_container_file_revision"`
	ContainerRelativePath    string   `json:"container_relative_path"`
	GitUsername              string   `json:"git_username"`
	GitToken                 string   `json:"git_token"`

	GitFetchConfig GitFetchConfig `json:"git_fetch"`
	S3FetchConfig  S3FetchConfig  `json:"s3_fetch"`
	GitOpsConfig   GitOpsConfig   `json:"gitops"`

	Clients *Clients
}

func GetConfig

func GetConfig() (*Config, error)

type GitFetchConfig

type GitFetchConfig struct {
	Enabled           bool   `json:"enabled"`
	ModelRepo         string `json:"model_repo"`
	ModelRelativePath string `json:"model_relative_path"`
	ModelRevision     string `json:"model_revision"`
	ModelDir          string `json:"model_dir"`
	SelfSignedCert    string `json:"self_signed_cert"`
}

type GitOpsConfig

type GitOpsConfig struct {
	Enabled   bool   `json:"enabled"`
	Token     string `json:"token"`
	Username  string `json:"username"`
	Repo      string `json:"repo"`
	ApiServer string `json:"api_server"`
	Branch    string `json:"branch"`
}

type GitRepoURL

type GitRepoURL struct {
	Server   string
	OrgName  string
	RepoName string
}

func ParseGitURL

func ParseGitURL(rawURL string) (GitRepoURL, error)

type S3FetchConfig

type S3FetchConfig struct {
	Enabled        bool   `json:"enabled"`
	AWSSecret      string `json:"aws_secret"`
	AWSAccess      string `json:"aws_access"`
	Region         string `json:"region"`
	Endpoint       string `json:"endpoint"`
	BucketName     string `json:"bucket_name"`
	SelfSignedCert string `json:"self_signed_cert"`
}

Jump to

Keyboard shortcuts

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