util

package
v0.0.0-...-e8d26fd Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Copyright 2024 Matrix Origin

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MinioSecret

func MinioSecret(namespace string) *corev1.Secret

func MinioShareStorage

func MinioShareStorage(minioSecretName string) v1alpha1.SharedStorageProvider

func NewLogSetTpl

func NewLogSetTpl(ns, image string) *v1alpha1.LogSet

NewLogSetTpl return a logSet template, name is random generated

func NewMoTpl

func NewMoTpl(namespace, version, repo string) *v1alpha1.MatrixOneCluster

func NewNamespaceTpl

func NewNamespaceTpl() *corev1.Namespace

func NewSecretTpl

func NewSecretTpl(ns string) *corev1.Secret

NewSecretTpl return a secret template, which namespace is ns, and name is random generated

func Patch

func Patch(ctx context.Context, cli client.Client, obj client.Object, mutateFn func() error, opts ...client.PatchOption) error

func SecretVolume

func SecretVolume(name string) corev1.Volume

SecretVolume return a volume has a secret as volumeSource, volume name is same to secret volume

Types

type PortForwardHandler

type PortForwardHandler struct {
	// contains filtered or unexported fields
}

func PortForward

func PortForward(config *rest.Config, ns, podName string, localPort, remotePort int) (*PortForwardHandler, error)

func (*PortForwardHandler) Ready

func (h *PortForwardHandler) Ready(timeout time.Duration) error

func (*PortForwardHandler) Stop

func (h *PortForwardHandler) Stop()

Jump to

Keyboard shortcuts

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