util

package
v1.9.0-industry.5 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 22 Imported by: 2

Documentation

Index

Constants

View Source
const (

	// CephConfTemplate is the content template of /etc/ceph/ceph.conf.
	CephConfTemplate = `` /* 244-byte string literal not displayed */

	// CephAdminKeyringTemplate is the content template of ceph client keyring.
	CephAdminKeyringTemplate = `` /* 156-byte string literal not displayed */

	// CephKeyringFileNameTemplate is the template of ceph client keyring file name.
	CephKeyringFileNameTemplate = "ceph.client.%s.keyring"
)
View Source
const (
	// Ceph defines the storage type of ceph
	Ceph = "Ceph"
	// TencentCloud defines the storage type of tencent cloud
	TencentCloud = "TencentCloud"
)

Variables

This section is empty.

Functions

func GetPatchData

func GetPatchData(oldObj, newObj interface{}) ([]byte, error)

GetPatchData generates the patch data of two objects with same type.

func GetSVInfoVersion

func GetSVInfoVersion(ctx context.Context, client clientset.Interface) (string, error)

GetSVInfoVersion returns storage vendor info ConfigMap's ResourceVersion.

Types

type CertContext

type CertContext struct {
	Key         []byte
	Cert        []byte
	SigningCert []byte
}

CertContext is set of files used for a kubernetes webhook server.

func SetupServerCert

func SetupServerCert(domain, commonName string) (*CertContext, error)

SetupServerCert setups the server cert. For example, user apiservers and admission webhooks can use the cert to prove their identify to the kube-apiserver

type SVInfo

type SVInfo struct {
	Version string
	Type    string
	// contains filtered or unexported fields
}

SVInfo is a bunch of information of storage vendor.

func GetSVInfo

func GetSVInfo(ctx context.Context, client clientset.Interface) (*SVInfo, error)

GetSVInfo returns the information of storage vendor.

Jump to

Keyboard shortcuts

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