storage

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestMinioStorageConnection added in v1.0.0

func TestMinioStorageConnection(client *minio.Client, bucketName string) error

TestMinioStorageConnection checks to see if the storage connection has all of the requirements for Onepanel This includes connecting, creating a file, downloading a file, deleting a file. An error with a human friendly message is returned, if there is one.

Types

type ArtifactRepositoryABSProvider

type ArtifactRepositoryABSProvider struct {
	KeyFormat          string `yaml:"keyFormat"`
	Bucket             string
	Endpoint           string
	Insecure           bool
	AccessKeySecret    ArtifactRepositorySecret `yaml:"accessKeySecret"`
	SecretKeySecret    ArtifactRepositorySecret `yaml:"secretKeySecret"`
	AccessKey          string                   `yaml:"accessKey,omitempty"`
	Secretkey          string                   `yaml:"secretKey,omitempty"`
	Container          string                   `yaml:"container"`
	StorageAccountKey  string                   `yaml:"storageAccountKey"`
	StorageAccountName string                   `yaml:"storageAccountName"`
}

ArtifactRepositoryABSProvider - Azure Blob Storage is meant to be used by the CLI. CLI will marshal this struct into the correct YAML structure for k8s configmap / secret.

type ArtifactRepositoryGCSProvider

type ArtifactRepositoryGCSProvider struct {
	KeyFormat               string `yaml:"keyFormat"`
	Bucket                  string
	Endpoint                string
	Insecure                bool
	ServiceAccountKey       string                   `yaml:"serviceAccountKey,omitempty"`
	ServiceAccountKeySecret ArtifactRepositorySecret `yaml:"serviceAccountKeySecret"`
	ServiceAccountJSON      string                   `yaml:"serviceAccountJSON,omitempty"`
}

ArtifactRepositoryGCSProvider is meant to be used by the CLI. CLI will marshal this struct into the correct YAML structure for k8s configmap / secret.

func (*ArtifactRepositoryGCSProvider) FormatKey

func (g *ArtifactRepositoryGCSProvider) FormatKey(namespace, workflowName, podName string) string

FormatKey replaces placeholder values with their actual values and returns this string. {{workflow.namespace}} -> namespace {{workflow.name}} -> workflowName {{pod.name}} -> podName

func (*ArtifactRepositoryGCSProvider) MarshalToYaml

func (g *ArtifactRepositoryGCSProvider) MarshalToYaml() (string, error)

MarshalToYaml is used by the CLI to generate configmaps during deployment or build operations.

type ArtifactRepositoryProvider

type ArtifactRepositoryProvider struct {
	S3  *ArtifactRepositoryS3Provider  `yaml:"s3,omitempty"`
	GCS *ArtifactRepositoryGCSProvider `yaml:"gcs,omitempty"`
	ABS *ArtifactRepositoryABSProvider `yaml:"abs,omitempty"`
}

ArtifactRepositoryProvider is used to setup access into AWS Cloud Storage or Google Cloud storage. - The relevant sub-struct (S3, GCS) is unmarshalled into from the cluster configmap. Right now, either the S3 or GCS struct will be filled in. Multiple cloud providers are not supported at the same time in params.yaml (manifests deployment).

func (*ArtifactRepositoryProvider) AccessKey added in v1.0.0

func (a *ArtifactRepositoryProvider) AccessKey() (string, error)

AccessKey returns the AccessKey of the currently set Provider

func (*ArtifactRepositoryProvider) AccessSecret added in v1.0.0

func (a *ArtifactRepositoryProvider) AccessSecret() (string, error)

AccessSecret returns the AccessSecret of the currently set Provider

func (*ArtifactRepositoryProvider) Bucket added in v1.0.0

func (a *ArtifactRepositoryProvider) Bucket() (string, error)

Bucket returns the name of the bucket of the currently set Provider

func (*ArtifactRepositoryProvider) Endpoint added in v1.0.0

func (a *ArtifactRepositoryProvider) Endpoint() (string, error)

Endpoint returns the Endpoint of the currently set Provider

func (*ArtifactRepositoryProvider) Load added in v1.0.0

Load loads any provider specific information required from the cluster

func (*ArtifactRepositoryProvider) MinioClient added in v1.0.0

func (a *ArtifactRepositoryProvider) MinioClient(namespace, domain string, useSsl bool) (*minio.Client, error)

MinioClient creates a Minio client using the currently set Provider

func (*ArtifactRepositoryProvider) PublicEndpoint added in v1.0.0

func (a *ArtifactRepositoryProvider) PublicEndpoint(namespace, domain string) (string, error)

PublicEndpoint returns the Publicly accessible endpoint of the currently set Provider

type ArtifactRepositoryS3Provider

type ArtifactRepositoryS3Provider struct {
	KeyFormat       string `yaml:"keyFormat"`
	Bucket          string
	Endpoint        string
	PublicEndpoint  string `yaml:"publicEndpoint"`
	PublicInsecure  bool   `yaml:"publicInsecure"`
	Insecure        bool
	Region          string                   `yaml:"region,omitempty"`
	AccessKeySecret ArtifactRepositorySecret `yaml:"accessKeySecret"`
	SecretKeySecret ArtifactRepositorySecret `yaml:"secretKeySecret"`
	AccessKey       string                   `yaml:"accessKey,omitempty"`
	Secretkey       string                   `yaml:"secretKey,omitempty"`
}

ArtifactRepositoryS3Provider is meant to be used by the CLI. CLI will marshal this struct into the correct YAML structure for k8s configmap / secret.

func (*ArtifactRepositoryS3Provider) FormatKey

func (a *ArtifactRepositoryS3Provider) FormatKey(namespace, workflowName, podName string) string

FormatKey replaces placeholder values with their actual values and returns this string. {{workflow.namespace}} -> namespace {{workflow.name}} -> workflowName {{pod.name}} -> podName

func (*ArtifactRepositoryS3Provider) MarshalToYaml

func (a *ArtifactRepositoryS3Provider) MarshalToYaml() (string, error)

MarshalToYaml is used by the CLI to generate configmaps during deployment or build operations.

type ArtifactRepositorySecret

type ArtifactRepositorySecret struct {
	Key  string `yaml:"key"`
	Name string `yaml:"name"`
}

ArtifactRepositorySecret holds information about a kubernetes Secret. - The "key" is the specific key inside the Secret. - The "name" is the name of the Secret. Usually, this is used to figure out what secret to look into for a specific value.

Jump to

Keyboard shortcuts

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