kubernetes

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2017 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateIngressLoaBalancer

func UpdateIngressLoaBalancer(client *Client, ingresses []Ingress, loadBalancerDNSName string) []error

UpdateIngressLoaBalancer can be used to update the loadBalancer object of an ingress resource using the lb DNS name.

Types

type Client

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

Client wraps the strategies used to access a Kubernetes API server. TODO: also allow cert based and bearer token auth

func NewClient

func NewClient(baseURL string) *Client

NewClient returns a new simple client to a Kubernetes API server using only its base URL. It should be enough to access an API endpoint via a proxy which takes care of all the authentication details, like `kubectl proxy`.

func (*Client) Get

func (c *Client) Get(resource string) (io.ReadCloser, error)

Get can be used for simple Kubernetes API requests that don't have any payload and require a simple GET.

func (*Client) Patch

func (c *Client) Patch(resource string, payload []byte) (io.ReadCloser, error)

Patch can be used for more complex requests where a payload needs to follow a PATCH request.

type Ingress

type Ingress struct {
	Metadata listMeta      `json:"metadata"`
	Spec     ingressSpec   `json:"spec"`
	Status   ingressStatus `json:"status"`
}

Ingress is used to deserialize Kubernete's API resources with the same name.

func (*Ingress) CertificateARN

func (i *Ingress) CertificateARN() string

CertificateARN returns the AWS certificate (IAM or ACM) ARN found in the ingress resource metadata. It returns an empty string if the annotation is missing.

func (*Ingress) Hostname

func (i *Ingress) Hostname() string

Hostname returns the DNS hostname already associated with the ingress. If not currently associated with any load balancer the result is an empty string

func (Ingress) String

func (i Ingress) String() string

String returns a string representation of the Ingress resource.

type IngressList

type IngressList struct {
	Kind       string              `json:"kind"`
	APIVersion string              `json:"apiVersion"`
	Metadata   ingressListMetadata `json:"metadata"`
	Items      []Ingress           `json:"items"`
}

IngressList is used to deserialize Kubernete's API resources with the same name.

func ListIngress

func ListIngress(client *Client) (*IngressList, error)

ListIngress can be used to obtain the list of ingress resources for all namespaces.

Jump to

Keyboard shortcuts

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