Documentation
¶
Index ¶
- func CopyToFilesystem(ctx context.Context, cred *credentials.Credentials, directory string, ...) error
- func DefaultContainerSecurityContexts(containers []corev1.Container) []corev1.Container
- func DefaultPodSecurityContext(securityContext *corev1.PodSecurityContext) *corev1.PodSecurityContext
- func GenerateDatabaseURLForGo(spec *DatabaseSpec) []byte
- func GenerateDatabaseURLForShopware(spec *DatabaseSpec) []byte
- func GenerateOpensearchURLForShopware(os *v1.OpensearchSpec, p []byte) []byte
- func GetAdminDeploymentMatchLabel() map[string]string
- func GetDefaultContainerAnnotations(defaultContainer string, store v1.Store, overwrite map[string]string) map[string]string
- func GetDefaultContainerExecAnnotations(defaultContainer string, ex v1.StoreExec) map[string]string
- func GetDefaultContainerSnapshotAnnotations(defaultContainer string, sn v1.StoreSnapshotSpec) map[string]string
- func GetDefaultContainerStoreLabels(store v1.Store, extra map[string]string) map[string]string
- func GetDefaultStoreExecLabels(store v1.Store, extra map[string]string, name, execType string) map[string]string
- func GetDefaultStoreInstanceDebugLabels(store v1.Store, storeDebugInstance v1.StoreDebugInstance) map[string]string
- func GetDefaultStoreLabels(store v1.Store) map[string]string
- func GetDefaultStoreSnapshotLabels(store v1.Store, overwrite map[string]string, name, subCommand string) map[string]string
- func GetMysqlShell(ctx context.Context, spec DatabaseSpec) *exec.Cmd
- func GetStorefrontDeploymentMatchLabel() map[string]string
- func GetWorkerDeploymentMatchLabel() map[string]string
- func Int64(v int64) *int64
- func MapEqual(a, b map[string]string) bool
- func MergeEnv(dst, src []corev1.EnvVar) []corev1.EnvVar
- func RestoreFromFilesystem(ctx context.Context, cred *credentials.Credentials, directory string, ...) error
- func RestrictedContainerSecurityContext() *corev1.SecurityContext
- func RestrictedPodSecurityContext() *corev1.PodSecurityContext
- func ShopwareKey(key string) string
- func StrPtr(s string) *string
- func TestS3Connection(ctx context.Context, s v1.S3Storage, c aws.Credentials) error
- func TestSQLConnection(ctx context.Context, spec *DatabaseSpec) error
- type DatabaseSpec
- type DumpInput
- type DumpOutput
- type FileEntry
- type MySQLDump
- type MySQLShell
- type RestoreInput
- type S3Downloader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyToFilesystem ¶
func CopyToFilesystem(ctx context.Context, cred *credentials.Credentials, directory string, s v1.S3Storage) error
func DefaultContainerSecurityContexts ¶
DefaultContainerSecurityContexts keeps user-provided container security contexts unchanged and only fills missing ones with the restricted defaults.
func DefaultPodSecurityContext ¶
func DefaultPodSecurityContext(securityContext *corev1.PodSecurityContext) *corev1.PodSecurityContext
DefaultPodSecurityContext keeps CRD-provided values unchanged and only falls back to the restricted defaults when podSecurityContext is missing.
func GenerateDatabaseURLForGo ¶
func GenerateDatabaseURLForGo(spec *DatabaseSpec) []byte
func GenerateDatabaseURLForShopware ¶
func GenerateDatabaseURLForShopware(spec *DatabaseSpec) []byte
func GenerateOpensearchURLForShopware ¶
func GenerateOpensearchURLForShopware(os *v1.OpensearchSpec, p []byte) []byte
func GetDefaultContainerSnapshotAnnotations ¶
func GetDefaultContainerSnapshotAnnotations(defaultContainer string, sn v1.StoreSnapshotSpec) map[string]string
func GetMysqlShell ¶
func GetMysqlShell(ctx context.Context, spec DatabaseSpec) *exec.Cmd
func MergeEnv ¶
Copy returns a new slice where src is overwriting dst. When a env in src is already present in dst, the value in dst will be overwritten by the value associated with the value in src.
func RestoreFromFilesystem ¶
func RestoreFromFilesystem(ctx context.Context, cred *credentials.Credentials, directory string, s v1.S3Storage, emptyBeforeRestore bool) error
func RestrictedContainerSecurityContext ¶
func RestrictedContainerSecurityContext() *corev1.SecurityContext
RestrictedContainerSecurityContext returns the fixed container-level settings required by the restricted Pod Security Standard. The CRD default only covers podSecurityContext, but allowPrivilegeEscalation and capabilities live on each container's securityContext.
func RestrictedPodSecurityContext ¶
func RestrictedPodSecurityContext() *corev1.PodSecurityContext
RestrictedPodSecurityContext mirrors the podSecurityContext default from the CRD for resources that were not API-server defaulted before reconciliation.
func ShopwareKey ¶
func TestS3Connection ¶
func TestSQLConnection ¶
func TestSQLConnection(ctx context.Context, spec *DatabaseSpec) error
Types ¶
type DatabaseSpec ¶
type DumpInput ¶
type DumpInput struct {
DumpFilePath string
DatabaseSpec
}
type DumpOutput ¶
type MySQLDump ¶
type MySQLDump struct {
// contains filtered or unexported fields
}
func NewMySQLDump ¶
func (MySQLDump) Dump ¶
func (h MySQLDump) Dump( ctx context.Context, input DumpInput, writer io.WriteCloser, ) (*DumpOutput, error)
type MySQLShell ¶
type MySQLShell struct {
// contains filtered or unexported fields
}
func NewMySQLShell ¶
func NewMySQLShell(binaryPath string) MySQLShell
func (MySQLShell) Dump ¶
func (h MySQLShell) Dump( ctx context.Context, input DumpInput, ) (DumpOutput, error)
func (MySQLShell) RestoreDump ¶
func (h MySQLShell) RestoreDump( ctx context.Context, input RestoreInput, ) error
type RestoreInput ¶
type RestoreInput struct {
DatabaseSpec
DumpFilePath string
}
type S3Downloader ¶
type S3Downloader struct {
// contains filtered or unexported fields
}
func NewS3Downloader ¶
func NewS3Downloader(client *minio.Client, bucket string) *S3Downloader
func (*S3Downloader) DownloadBucket ¶
func (s *S3Downloader) DownloadBucket(ctx context.Context, batchCount int, f func(minio.ObjectInfo, *minio.Object) error) error
DownloadBucket downloads all objects from the configured bucket and processes them with the provided function. The function is called for each object with the object's metadata and a reader for the object's content. The function is responsible for closing the reader after processing the object.