provider

package
v0.0.0-...-8ff1004 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2019 License: AGPL-3.0 Imports: 62 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CredAttrUsername              = "username"
	CredAttrPassword              = "password"
	CredAttrClientCertificateData = "ClientCertificateData"
	CredAttrClientKeyData         = "ClientKeyData"
	CredAttrToken                 = "Token"
)
View Source
const (
	// K8s_ProviderType defines the Juju storage type which can be used
	// to provision storage on k8s models.
	K8s_ProviderType = storage.ProviderType("kubernetes")
)

Variables

This section is empty.

Functions

func ConfigDefaults

func ConfigDefaults() schema.Defaults

ConfigDefaults returns the default values for a kubernetes configuration.

func ConfigSchema

func ConfigSchema() environschema.Fields

ConfigSchema returns the configuration schema for a kubernetes provider config.

func NewK8sBroker

func NewK8sBroker(
	k8sRestConfig *rest.Config,
	cfg *config.Config,
	newClient NewK8sClientFunc,
	newWatcher NewK8sWatcherFunc,
	clock jujuclock.Clock,
) (caas.Broker, error)

NewK8sBroker returns a kubernetes client for the specified k8s cluster.

Types

type DockerConfig

type DockerConfig map[string]DockerConfigEntry

DockerConfig represents the config file used by the docker CLI.

type DockerConfigEntry

type DockerConfigEntry struct {
	Username string
	Password string
	Email    string
}

DockerConfigEntry represents an Auth entry in the dockerconfigjson.

type DockerConfigJson

type DockerConfigJson struct {
	Auths DockerConfig `json:"auths"`
}

DockerConfigJson represents ~/.docker/config.json file info.

type K8sContainerSpec

type K8sContainerSpec struct {
	LivenessProbe   *core.Probe     `json:"livenessProbe,omitempty"`
	ReadinessProbe  *core.Probe     `json:"readinessProbe,omitempty"`
	ImagePullPolicy core.PullPolicy `json:"imagePullPolicy,omitempty"`
}

K8sContainerSpec is a subset of v1.Container which defines attributes we expose for charms to set.

func (*K8sContainerSpec) Validate

func (*K8sContainerSpec) Validate() error

Validate is defined on ProviderContainer.

type K8sPodSpec

type K8sPodSpec struct {
	ServiceAccountName            string                   `json:"serviceAccountName,omitempty"`
	RestartPolicy                 core.RestartPolicy       `json:"restartPolicy,omitempty"`
	TerminationGracePeriodSeconds *int64                   `json:"terminationGracePeriodSeconds,omitempty"`
	ActiveDeadlineSeconds         *int64                   `json:"activeDeadlineSeconds,omitempty"`
	DNSPolicy                     core.DNSPolicy           `json:"dnsPolicy,omitempty"`
	AutomountServiceAccountToken  *bool                    `json:"automountServiceAccountToken,omitempty"`
	SecurityContext               *core.PodSecurityContext `json:"securityContext,omitempty"`
	Hostname                      string                   `json:"hostname,omitempty"`
	Subdomain                     string                   `json:"subdomain,omitempty"`
	PriorityClassName             string                   `json:"priorityClassName,omitempty"`
	Priority                      *int32                   `json:"priority,omitempty"`
	DNSConfig                     *core.PodDNSConfig       `json:"dnsConfig,omitempty"`
	ReadinessGates                []core.PodReadinessGate  `json:"readinessGates,omitempty"`
}

K8sPodSpec is a subset of v1.PodSpec which defines attributes we expose for charms to set.

func (*K8sPodSpec) Validate

func (*K8sPodSpec) Validate() error

Validate is defined on ProviderPod.

type NewK8sClientFunc

NewK8sClientFunc defines a function which returns a k8s client based on the supplied config.

type NewK8sWatcherFunc

type NewK8sWatcherFunc func(wi watch.Interface, name string, clock jujuclock.Clock) (*kubernetesWatcher, error)

NewK8sWatcherFunc defines a function which returns a k8s watcher based on the supplied config.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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