configmap

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsInvalidExecution

func IsInvalidExecution(err error) bool

IsInvalidExecution asserts invalidExecutionError.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound asserts notFoundError.

Types

type CertExporter

type CertExporter struct {
	Namespace string `json:"namespace"`
}

type ClusterAutoscaler

type ClusterAutoscaler struct {
	Cluster ClusterAutoscalerCluster `json:"cluster"`
	Image   Image                    `json:"image"`
}

type ClusterAutoscalerCluster

type ClusterAutoscalerCluster struct {
	ID string `json:"id"`
}

type ClusterConfig

type ClusterConfig struct {
	APIDomain  string
	ClusterID  string
	Namespaces []string
}

ClusterConfig is used by the configmap resources to provide config to calculate the current state.

type Config

type Config struct {
	Logger micrologger.Logger
	Tenant tenantcluster.Interface
}

Config represents the configuration used to create a new configmap service.

type ConfigMapSpec

type ConfigMapSpec struct {
	App         string
	Labels      map[string]string
	Name        string
	Namespace   string
	ReleaseName string
	Type        string
	ValuesJSON  string
}

ConfigMapSpec is used to generate the desired state.

type ConfigMapValues

type ConfigMapValues struct {
	ClusterID         string
	CoreDNS           CoreDNSValues
	IngressController IngressControllerValues
	Organization      string
	RegistryDomain    string
	WorkerCount       int
}

ConfigMapValues is used by the configmap resources to provide data to the configmap service.

type CoreDNS

type CoreDNS struct {
	Cluster CoreDNSCluster `json:"cluster"`
	Image   Image          `json:"image"`
}

type CoreDNSCluster

type CoreDNSCluster struct {
	Calico     CoreDNSClusterCalico     `json:"calico"`
	Kubernetes CoreDNSClusterKubernetes `json:"kubernetes"`
}

type CoreDNSClusterCalico

type CoreDNSClusterCalico struct {
	CIDR string `json:"CIDR"`
}

type CoreDNSClusterKubernetes

type CoreDNSClusterKubernetes struct {
	API CoreDNSClusterKubernetesAPI `json:"API"`
	DNS CoreDNSClusterKubernetesDNS `json:"DNS"`
}

type CoreDNSClusterKubernetesAPI

type CoreDNSClusterKubernetesAPI struct {
	ClusterIPRange string `json:"clusterIPRange"`
}

type CoreDNSClusterKubernetesDNS

type CoreDNSClusterKubernetesDNS struct {
	IP string `json:"IP"`
}

type CoreDNSValues

type CoreDNSValues struct {
	CalicoAddress      string
	CalicoPrefixLength string
	ClusterIPRange     string
}

CoreDNSValues provides values for generating the CoreDNS configmap.

type DefaultConfigMap

type DefaultConfigMap struct {
	Image Image `json:"image"`
}

type ExporterValues

type ExporterValues struct {
	Namespace string `json:"namespace"`
}

type Image

type Image struct {
	Registry string `json:"registry"`
}

type IngressController

type IngressController struct {
	Controller IngressControllerController `json:"controller"`
	Global     IngressControllerGlobal     `json:"global"`
	Image      Image                       `json:"image"`
}

type IngressControllerController

type IngressControllerController struct {
	Replicas int                                `json:"replicas"`
	Service  IngressControllerControllerService `json:"service"`
}

type IngressControllerControllerService

type IngressControllerControllerService struct {
	Enabled bool `json:"enabled"`
}

type IngressControllerGlobal

type IngressControllerGlobal struct {
	Controller IngressControllerGlobalController `json:"controller"`
	Migration  IngressControllerGlobalMigration  `json:"migration"`
}

type IngressControllerGlobalController

type IngressControllerGlobalController struct {
	TempReplicas     int  `json:"tempReplicas"`
	UseProxyProtocol bool `json:"useProxyProtocol"`
}

type IngressControllerGlobalMigration

type IngressControllerGlobalMigration struct {
	Enabled bool `json:"enabled"`
}

type IngressControllerValues

type IngressControllerValues struct {
	ControllerServiceEnabled bool
	MigrationEnabled         bool
	UseProxyProtocol         bool
}

IngressControllerValues provides values for generating the Ingress Controller configmap.

type Interface

type Interface interface {
	ApplyCreateChange(ctx context.Context, clusterConfig ClusterConfig, configMapsToCreate []*corev1.ConfigMap) error
	ApplyDeleteChange(ctx context.Context, clusterConfig ClusterConfig, configMapsToDelete []*corev1.ConfigMap) error
	ApplyUpdateChange(ctx context.Context, clusterConfig ClusterConfig, configMapsToUpdate []*corev1.ConfigMap) error
	GetCurrentState(ctx context.Context, configMapConfig ClusterConfig) ([]*corev1.ConfigMap, error)
	GetDesiredState(ctx context.Context, configMapConfig ClusterConfig, configMapValues ConfigMapValues, providerChartSpecs []key.ChartSpec) ([]*corev1.ConfigMap, error)
	NewDeletePatch(ctx context.Context, currentState, desiredState []*corev1.ConfigMap) (*controller.Patch, error)
	NewUpdatePatch(ctx context.Context, currentState, desiredState []*corev1.ConfigMap) (*controller.Patch, error)
}

type NetExporter

type NetExporter struct {
	Namespace string `json:"namespace"`
}

type Service

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

Service provides shared functionality for managing configmaps.

func New

func New(config Config) (*Service, error)

New creates a new configmap service.

func (*Service) ApplyCreateChange

func (s *Service) ApplyCreateChange(ctx context.Context, clusterConfig ClusterConfig, configMapsToCreate []*corev1.ConfigMap) error

func (*Service) ApplyDeleteChange

func (s *Service) ApplyDeleteChange(ctx context.Context, clusterConfig ClusterConfig, configMapsToDelete []*corev1.ConfigMap) error

func (*Service) ApplyUpdateChange

func (s *Service) ApplyUpdateChange(ctx context.Context, clusterConfig ClusterConfig, configMapsToUpdate []*corev1.ConfigMap) error

func (*Service) GetCurrentState

func (s *Service) GetCurrentState(ctx context.Context, clusterConfig ClusterConfig) ([]*corev1.ConfigMap, error)

func (*Service) GetDesiredState

func (s *Service) GetDesiredState(ctx context.Context, clusterConfig ClusterConfig, configMapValues ConfigMapValues, providerChartSpecs []key.ChartSpec) ([]*corev1.ConfigMap, error)

func (*Service) NewDeletePatch

func (s *Service) NewDeletePatch(ctx context.Context, currentState, desiredState []*corev1.ConfigMap) (*controller.Patch, error)

NewDeletePatch is a no-op because configmaps in the tenant cluster are deleted with the tenant cluster resources.

func (*Service) NewUpdatePatch

func (s *Service) NewUpdatePatch(ctx context.Context, currentState, desiredState []*corev1.ConfigMap) (*controller.Patch, error)

Jump to

Keyboard shortcuts

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