Documentation ¶
Index ¶
- func Marshal(config Interface, opts ...teleservices.MarshalOption) ([]byte, error)
- func ToUnknown(config Interface) (*storage.UnknownResource, error)
- type AWSEncryptionProvider
- type ComponentConfigs
- type ControlPlaneComponent
- type EncryptionProvider
- type Global
- type Interface
- type Kubelet
- type Resource
- func (r *Resource) Expiry() time.Time
- func (r *Resource) GetGlobalConfig() Global
- func (r *Resource) GetKubeletConfig() *Kubelet
- func (r *Resource) GetMetadata() teleservices.Metadata
- func (r *Resource) GetName() string
- func (r Resource) Merge(other Resource) Resource
- func (r *Resource) SetCloudProvider(provider string)
- func (r *Resource) SetExpiry(expires time.Time)
- func (r *Resource) SetGlobalConfig(config Global)
- func (r *Resource) SetName(name string)
- func (r *Resource) SetTTL(clock clockwork.Clock, ttl time.Duration)
- type Spec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Marshal ¶
func Marshal(config Interface, opts ...teleservices.MarshalOption) ([]byte, error)
Marshal marshals this resource as JSON
Types ¶
type AWSEncryptionProvider ¶
type AWSEncryptionProvider struct { // AccountID specifies AWS account ID used to construct the KMS key ARN. AccountID string `json:"accountID,omitempty"` // KeyID specifies the KMS key ID used to construct the KMS key ARN. KeyID string `json:"keyID,omitempty"` // Region specifies the AWS region of the KMS key. Region string `json:"region,omitempty"` }
AWSEncryptionProvider defines AWS encryption provider configuration. The configured fields will be used to construct KMS key ARN.
func (*AWSEncryptionProvider) ARN ¶
func (r *AWSEncryptionProvider) ARN() string
ARN returns the key ARN. Format: `arn:aws:kms:${Region}:${AccountID}:key/${KeyID}`
type ComponentConfigs ¶
type ComponentConfigs struct { // Kubelet defines kubelet configuration Kubelet *Kubelet `json:"kubelet,omitempty"` }
ComponentConfigs groups component configurations
type ControlPlaneComponent ¶
type ControlPlaneComponent struct {
json.RawMessage
}
ControlPlaneComponent defines configuration of a control plane component
type EncryptionProvider ¶
type EncryptionProvider struct { // Disabled disables resource encryption if set to true. Disabled bool `json:"disabled,omitempty"` // AWS specifies AWS encryption provider configuration. AWS *AWSEncryptionProvider `json:"aws,omitempty"` }
EncryptionProvider specifies configuration for an encryption provider.
type Global ¶
type Global struct { // CloudProvider specifies the cloud provider CloudProvider string `json:"cloudProvider,omitempty"` // CloudConfig describes the cloud configuration. // The configuration is provider-specific CloudConfig string `json:"cloudConfig,omitempty"` // ServiceCIDR represents the IP range from which to assign service cluster IPs. // This must not overlap with any IP ranges assigned to nodes for pods. // Targets: api server, controller manager ServiceCIDR string `json:"serviceCIDR,omitempty"` // ServiceNodePortRange defines the range of ports to reserve for services with NodePort visibility. // Inclusive at both ends of the range. // Targets: api server ServiceNodePortRange string `json:"serviceNodePortRange,omitempty"` // PodCIDR defines the CIDR Range for Pods in cluster. // Targets: controller manager, kubelet PodCIDR string `json:"podCIDR,omitempty"` // PodSubnetSize defines the size of the subnet allocated for each host. PodSubnetSize string `json:"podSubnetSize,omitempty"` // ProxyPortRange specifies the range of host ports (beginPort-endPort, single port or beginPort+offset, inclusive) // that may be consumed in order to proxy service traffic. // If (unspecified, 0, or 0-0) then ports will be randomly chosen. // Targets: kube-proxy ProxyPortRange string `json:"proxyPortRange,omitempty"` // FeatureGates defines the set of key=value pairs that describe feature gates for alpha/experimental features. // Targets: all components FeatureGates map[string]bool `json:"featureGates,omitempty"` // HighAvailability enables high availability mode for Kubernetes. HighAvailability *bool `json:"highAvailability,omitempty"` // FlannelBackend optionally specifies the backend to pair with flannel. FlannelBackend *string `json:"flannelBackend,omitempty"` // EncryptionProvider optionally specifies a Kubernetes encryption provider. EncryptionProvider *EncryptionProvider `json:"encryptionProvider,omitempty"` }
Global describes global configuration
type Interface ¶
type Interface interface { // Resource provides common resource methods teleservices.Resource // GetKubeletConfig returns the configuration of the kubelet GetKubeletConfig() *Kubelet // GetGlobalConfig returns the global configuration GetGlobalConfig() Global // SetGlobalConfig sets the new global configuration SetGlobalConfig(Global) // SetCloudProvider sets the cloud provider for this configuration SetCloudProvider(provider string) }
Interface manages cluster configuration
type Kubelet ¶
type Kubelet struct { // ExtraArgs lists additional command line arguments ExtraArgs []string `json:"extraArgs,omitempty"` // Config defines the kubelet configuration as a JSON-formatted // payload Config json.RawMessage `json:"config,omitempty"` }
Kubelet defines kubelet configuration
type Resource ¶
type Resource struct { // Kind is the resource kind Kind string `json:"kind"` // Version is the resource version Version string `json:"version"` // Metadata specifies resource metadata Metadata teleservices.Metadata `json:"metadata"` // Spec defines the resource Spec Spec `json:"spec"` }
Resource describes the cluster configuration resource
func NewEmpty ¶
func NewEmpty() *Resource
NewEmpty returns a new instance of the resource initialized to defaults
func (*Resource) GetGlobalConfig ¶
GetGlobalConfig returns the global configuration
func (*Resource) GetKubeletConfig ¶
GetKubeletConfig returns the configuration of the kubelet
func (*Resource) GetMetadata ¶
func (r *Resource) GetMetadata() teleservices.Metadata
GetMetadata returns resource metadata
func (Resource) Merge ¶
Merge merges changes from other into this resource. Only non-empty fields in other different from those in r will be set in r. Returns a copy of r with necessary modifications
func (*Resource) SetCloudProvider ¶
SetCloudProvider sets the cloud provider for this configuration
func (*Resource) SetGlobalConfig ¶
SetGlobalConfig sets the new global configuration
type Spec ¶
type Spec struct { // ComponentsConfigs groups component configurations ComponentConfigs // TODO: Scheduler, ControllerManager, Proxy // Global describes global configuration Global Global `json:"global,omitempty"` }
Spec defines the cluster configuration resource