Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrReadNamespace is returned when the names could not be read from service account ErrReadNamespace = errors.New("Could not read namespace from service account secret") )
Functions ¶
func CertPoolFromFile ¶
CertPoolFromFile returns an x509.CertPool containing the certificates in the given PEM-encoded file. Returns an error if the file could not be read, a certificate could not be parsed, or if the file does not contain any certificates
func CertsFromPEM ¶
func CertsFromPEM(pemCerts []byte) ([]*x509.Certificate, error)
CertsFromPEM returns the x509.Certificates contained in the given PEM-encoded byte array Returns an error if a certificate could not be parsed, or if the data does not contain any certificates
func NewClientInCluster ¶
func NewClientInCluster() *client
NewClientInCluster should work similarily to the official api NewInClient by setting up a client configuration for use within a k8s pod.
Types ¶
type Deployment ¶ added in v1.16.0
Deployment is Kubernetes deployment
type DeploymentList ¶ added in v1.16.0
type DeploymentList struct {
Items []Deployment `json:"items"`
}
DeploymentList
type Kubernetes ¶
type Kubernetes interface {
// UpdateDeployment patches deployment annotations with new metadata
UpdateDeployment(string, interface{}) error
// ListDeployments lists all micro deployments
ListDeployments(labels map[string]string) (*DeploymentList, error)
}
Kubernetes client
type Metadata ¶
type Metadata struct {
Name string `json:"name,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Annotations map[string]string `json:"annotations,omitempty"`
}
Metadata defines api request metadata
type Spec ¶ added in v1.16.0
type Spec struct {
Template *Template `json:"template,omitempty"`
}
Spec defines micro deployment spec