Documentation ¶
Index ¶
- Constants
- func ConfigDefaults() schema.Defaults
- func ConfigSchema() environschema.Fields
- func NewK8sBroker(k8sRestConfig *rest.Config, cfg *config.Config, newClient NewK8sClientFunc, ...) (caas.Broker, error)
- type DockerConfig
- type DockerConfigEntry
- type DockerConfigJson
- type K8sContainerSpec
- type K8sPodSpec
- type NewK8sClientFunc
- type NewK8sWatcherFunc
Constants ¶
const ( CredAttrUsername = "username" CredAttrPassword = "password" CredAttrClientCertificateData = "ClientCertificateData" CredAttrClientKeyData = "ClientKeyData" CredAttrToken = "Token" )
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 ¶
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 ¶
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 ¶
type NewK8sClientFunc func(c *rest.Config) (kubernetes.Interface, apiextensionsclientset.Interface, error)
NewK8sClientFunc defines a function which returns a k8s client based on the supplied config.