k8s

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const IstioSecretName = "cacerts"

IstioSecretName is the name used to create the Secret in Istio CA Namespace.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

Builder encapsulates IstioSecretDetails to add data into it.

func NewBuilder

func NewBuilder() *Builder

NewBuilder returns a new instance of Builder.

func (*Builder) AddCACert

func (b *Builder) AddCACert(caCert string) *Builder

AddCACert adds CACert Key in Secret's Data map.

func (*Builder) AddCAKey

func (b *Builder) AddCAKey(caKey string) *Builder

AddCAKey adds CAKey Key in Secret's Data map.

func (*Builder) AddCertChain

func (b *Builder) AddCertChain(caKey string) *Builder

AddCertChain adds CertChain Key in Secret's Data map.

func (*Builder) AddRootCertPem

func (b *Builder) AddRootCertPem(rootCert string) *Builder

AddRootCertPem adds RootCertPem Key in Secret's Data map.

func (*Builder) Build

func (b *Builder) Build() (*IstioSecretDetails, error)

Build builds the IstioSecretDetails structure.

type IstioSecretDetails

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

IstioSecretDetails is a structure used to contain all details about Kubernetes Secret Creation.

func (*IstioSecretDetails) Create

func (secret *IstioSecretDetails) Create(namespace string, cli kubernetes.Interface) error

Create method creates the secret in the istio namespace provided.

func (*IstioSecretDetails) CreateSecret

func (secret *IstioSecretDetails) CreateSecret(secretOptions *models.SecretOptions) error

CreateSecret creates secret at appropriate location according to the options provided.

func (*IstioSecretDetails) CreateSecretFile

func (secret *IstioSecretDetails) CreateSecretFile() (string, error)

CreateSecretFile creates secret in getmesh Directory if we get any error while creating secret.

func (*IstioSecretDetails) ForceCreate

func (secret *IstioSecretDetails) ForceCreate(namespace string, cli kubernetes.Interface) error

ForceCreate deletes the previous secret with similar name, and replace it with another.

func (*IstioSecretDetails) SaveToFile

func (secret *IstioSecretDetails) SaveToFile(namespace string, secretFilePath string) error

SaveToFile method prints out the secret to be verified and created later.

Jump to

Keyboard shortcuts

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