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: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "configmapv21"
)

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound asserts notFoundError.

func IsWrongType

func IsWrongType(err error) bool

IsWrongType asserts wrongTypeError.

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

	// CalicoAddress may be empty on certain installations.
	CalicoAddress string
	// CalicoPrefixLength may be empty on certain installations.
	CalicoPrefixLength string
	ClusterIPRange     string
	DNSIP              string
	Provider           string
	RegistryDomain     string
}

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
	DNSIP              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"`
}

type IngressControllerGlobalController

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

type IngressControllerValues

type IngressControllerValues struct {
	ControllerServiceEnabled bool
	UseProxyProtocol         bool
}

IngressControllerValues provides values for generating the Ingress Controller configmap.

type NetExporter

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

type Resource

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

func New

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

func (*Resource) ApplyCreateChange

func (r *Resource) ApplyCreateChange(ctx context.Context, obj, createChange interface{}) error

func (*Resource) ApplyDeleteChange

func (r *Resource) ApplyDeleteChange(ctx context.Context, obj, deleteChange interface{}) error

ApplyDeleteChange is executed upon update events in case newDeleteChangeForUpdatePatch figured out there are ConfigMap types to be deleted.

func (*Resource) ApplyUpdateChange

func (r *Resource) ApplyUpdateChange(ctx context.Context, obj, updateChange interface{}) error

func (*Resource) GetCurrentState

func (r *Resource) GetCurrentState(ctx context.Context, obj interface{}) (interface{}, error)

func (*Resource) GetDesiredState

func (r *Resource) GetDesiredState(ctx context.Context, obj interface{}) (interface{}, error)

func (*Resource) Name

func (r *Resource) Name() string

func (*Resource) NewDeletePatch

func (r *Resource) NewDeletePatch(ctx context.Context, obj, currentState, desiredState interface{}) (*controller.Patch, error)

NewDeletePatch is a no-op because ConfigMap types in the tenant cluster are deleted with the tenant cluster itself upon a delete event.

func (*Resource) NewUpdatePatch

func (r *Resource) NewUpdatePatch(ctx context.Context, obj, currentState, desiredState interface{}) (*controller.Patch, error)

Jump to

Keyboard shortcuts

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