common

package
v1.0.6-2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const ITERATIONS = 10

Number of iterations we are storing

Variables

This section is empty.

Functions

func AddArchSelector

func AddArchSelector(arch []string, nodeSelectorTerms *[]corev1.NodeSelectorTerm)

func AddRegionSelector

func AddRegionSelector(region string, nodeSelectorTerms *[]corev1.NodeSelectorTerm)

func AddZoneSelector

func AddZoneSelector(zone string, nodeSelectorTerms *[]corev1.NodeSelectorTerm)

func BackupCACrypto

func BackupCACrypto(client k8sclient.Client, scheme *runtime.Scheme, instance v1.Object, labels map[string]string) error

func BackupCrypto

func BackupCrypto(client k8sclient.Client, scheme *runtime.Scheme, instance v1.Object, labels map[string]string) error

func CreateBackupSecret

func CreateBackupSecret(client k8sclient.Client, scheme *runtime.Scheme, instance v1.Object, secret *corev1.Secret) error

func CreateBackupSecretData

func CreateBackupSecretData(crypto *Crypto) (map[string][]byte, error)

func GetBackupSecret

func GetBackupSecret(client k8sclient.Client, instance v1.Object) (*corev1.Secret, error)

func GetCACrypto

func GetCACrypto(client k8sclient.Client, instance v1.Object) (*current.MSP, *current.MSP, *current.MSP)

func GetCrypto

func GetCrypto(prefix common.SecretType, client k8sclient.Client, instance v1.Object) *current.MSP

func GetEcertAdmincertEncoded

func GetEcertAdmincertEncoded(client k8sclient.Client, instance v1.Object) ([]string, error)

func GetEcertCACertEncoded

func GetEcertCACertEncoded(client k8sclient.Client, instance v1.Object) ([]string, error)

func GetEcertIntercertEncoded

func GetEcertIntercertEncoded(client k8sclient.Client, instance v1.Object) ([]string, error)

func GetEcertKeystoreEncoded

func GetEcertKeystoreEncoded(client k8sclient.Client, instance v1.Object) (string, error)

func GetEcertSignCertEncoded

func GetEcertSignCertEncoded(client k8sclient.Client, instance v1.Object) (string, error)

func GetNodeSelectorTerms

func GetNodeSelectorTerms(arch []string, zone, region string) []corev1.NodeSelectorTerm

func GetPodAntiAffinity

func GetPodAntiAffinity(orgName string) *corev1.PodAntiAffinity

func GetTLSCACertEncoded

func GetTLSCACertEncoded(client k8sclient.Client, instance v1.Object) ([]string, error)

func GetTLSIntercertEncoded

func GetTLSIntercertEncoded(client k8sclient.Client, instance v1.Object) ([]string, error)

func GetTLSKeystoreEncoded

func GetTLSKeystoreEncoded(client k8sclient.Client, instance v1.Object) (string, error)

func GetTLSSignCertEncoded

func GetTLSSignCertEncoded(client k8sclient.Client, instance v1.Object) (string, error)

func UpdateBackupSecret

func UpdateBackupSecret(client k8sclient.Client, scheme *runtime.Scheme, instance v1.Object, secret *corev1.Secret) error

func UpdateBackupSecretData

func UpdateBackupSecretData(data map[string][]byte, crypto *Crypto) (map[string][]byte, error)

Types

type Backup

type Backup struct {
	List      []*current.MSP `json:"list"`
	Timestamp string         `json:"timestamp"`
}

type CACryptoBytes

type CACryptoBytes struct {
	Cert           []byte
	Key            []byte
	OperationsCert []byte
	OperationsKey  []byte
	TLSCert        []byte
	TLSKey         []byte
}

func GetCACryptoBytes

func GetCACryptoBytes(client k8sclient.Client, instance v1.Object) (*CACryptoBytes, error)

func GetTLSCACryptoBytes

func GetTLSCACryptoBytes(client k8sclient.Client, instance v1.Object) (*CACryptoBytes, error)

type CACryptoEncoded

type CACryptoEncoded struct {
	Cert           string
	Key            string
	OperationsCert string
	OperationsKey  string
	TLSCert        string
	TLSKey         string
}

func GetCACryptoEncoded

func GetCACryptoEncoded(client k8sclient.Client, instance v1.Object) (*CACryptoEncoded, error)

func GetTLSCACryptoEncoded

func GetTLSCACryptoEncoded(client k8sclient.Client, instance v1.Object) (*CACryptoEncoded, error)

type Crypto

type Crypto struct {
	TLS        *current.MSP
	Ecert      *current.MSP
	Operations *current.MSP
	CA         *current.MSP
}

type Result

type Result struct {
	reconcile.Result
	Status               *current.CRStatus
	OverrideUpdateStatus bool
}

Directories

Path Synopsis
images/mocks
Code generated by counterfeiter.
Code generated by counterfeiter.
mocks
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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