common

package
v0.0.0-...-1764fb8 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2019 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AlertManagerStatefulSetName is the name of the alertmanager stateful set.
	AlertManagerStatefulSetName = "alertmanager"

	// BackupBucketName is a constant for the name of bucket of object storage.
	BackupBucketName = "bucketName"

	// BackupSecretName defines the name of the secret containing the credentials which are required to
	// authenticate against the respective cloud provider (required to store the backups of Shoot clusters).
	BackupSecretName = "etcd-backup"

	// BackupInfrastructureForceDeletion is a constant for an annotation on a Backupinfrastructure indicating that it should be force deleted.
	BackupInfrastructureForceDeletion = "backupinfrastructure.garden.sapcloud.io/force-deletion"

	// BackupInfrastructureOperation is a constant for an annotation on a Backupinfrastructure indicating that an operation shall be performed.
	BackupInfrastructureOperation = "backupinfrastructure.garden.sapcloud.io/operation"

	// BackupInfrastructureReconcile is a constant for an annotation on a Backupinfrastructure indicating that a Backupinfrastructure reconciliation shall be triggered.
	BackupInfrastructureReconcile = "reconcile"

	// ChartPath is the path to the Helm charts.
	ChartPath = "charts"

	// CloudConfigPrefix is a constant for the prefix which is added to secret storing the original cloud config (which
	// is being downloaded from the cloud-config-downloader process)
	CloudConfigPrefix = "cloud-config"

	// CloudConfigFilePath is the path on the shoot worker nodes to which the operating system specific configuration
	// will be downloaded.
	CloudConfigFilePath = "/var/lib/cloud-config-downloader/downloads/cloud_config"

	// CloudProviderConfigName is the name of the configmap containing the cloud provider config.
	CloudProviderConfigName = "cloud-provider-config"

	// CloudProviderConfigMapKey is the key storing the cloud provider config as value in the cloud provider configmap.
	CloudProviderConfigMapKey = "cloudprovider.conf"

	// CloudPurposeShoot is a constant used while instantiating a cloud botanist for the Shoot cluster.
	CloudPurposeShoot = "shoot"

	// CloudPurposeSeed is a constant used while instantiating a cloud botanist for the Seed cluster.
	CloudPurposeSeed = "seed"

	// ConfirmationDeletion is an annotation on a Shoot resource whose value must be set to "true" in order to
	// allow deleting the Shoot (if the annotation is not set any DELETE request will be denied).
	ConfirmationDeletion = "confirmation.garden.sapcloud.io/deletion"

	// ControllerManagerInternalConfigMapName is the name of the internal config map in which the Gardener controller
	// manager stores its configuration.
	ControllerManagerInternalConfigMapName = "gardener-controller-manager-internal-config"

	// ControllerRegistrationName is the key of a label on extension namespaces that indicates the controller registration name.
	ControllerRegistrationName = "controllerregistration.core.gardener.cloud/name"

	// DNSProviderDeprecated is the key for an annotation on a Kubernetes Secret object whose value must point to a valid
	// DNS provider.
	// deprecated
	DNSProviderDeprecated = "dns.garden.sapcloud.io/provider"

	// DNSDomainDeprecated is the key for an annotation on a Kubernetes Secret object whose value must point to a valid
	// domain name.
	// deprecated
	DNSDomainDeprecated = "dns.garden.sapcloud.io/domain"

	// DNSProvider is the key for an annotation on a Kubernetes Secret object whose value must point to a valid
	// DNS provider.
	DNSProvider = "dns.gardener.cloud/provider"

	// DNSDomain is the key for an annotation on a Kubernetes Secret object whose value must point to a valid
	// domain name.
	DNSDomain = "dns.gardener.cloud/domain"

	// EtcdRoleMain is the constant defining the role for main etcd storing data about objects in Shoot.
	EtcdRoleMain = "main"

	// EtcdMainStatefulSetName is the constant defining the statefulset name for the main etcd.
	EtcdMainStatefulSetName = "etcd-main"

	// EtcdRoleEvents is the constant defining the role for etcd storing events in Shoot.
	EtcdRoleEvents = "events"

	// EtcdEventsStatefulSetName is the constant defining the statefulset name for the events etcd.
	EtcdEventsStatefulSetName = "etcd-events"

	// GardenNamespace is the namespace in which the configuration and secrets for
	// the Gardener controller manager will be stored (e.g., secrets for the Seed clusters).
	// It is also used by the gardener-apiserver.
	GardenNamespace = "garden"

	// GardenRole is the key for an annotation on a Kubernetes object indicating what it is used for.
	GardenRole = "garden.sapcloud.io/role"

	// GardenerRole is the key for an annotation on a Kubernetes object indicating what it is used for with the new
	// naming scheme.
	GardenerRole = "gardener.cloud/role"

	// GardenRoleShoot is the value of the GardenRole key indicating type 'shoot'.
	GardenRoleShoot = "shoot"

	// GardenRoleSeed is the value of the GardenRole key indicating type 'seed'.
	GardenRoleSeed = "seed"

	// GardenRoleExtension is the value of the GardenRole key indicating type 'extension'.
	GardenRoleExtension = "extension"

	// GardenRoleControlPlane is the value of the GardenRole key indicating type 'controlplane'.
	GardenRoleControlPlane = "controlplane"

	// GardenRoleSystemComponent is the value of the GardenRole key indicating type 'system-component'.
	GardenRoleSystemComponent = "system-component"

	// GardenRoleMonitoring is the value of the GardenRole key indicating type 'monitoring'.
	GardenRoleMonitoring = "monitoring"

	// GardenRoleOptionalAddon is the value of the GardenRole key indicating type 'optional-addon'.
	GardenRoleOptionalAddon = "optional-addon"

	// GardenRoleLogging is the value of the GardenRole key indicating type 'logging'.
	GardenRoleLogging = "logging"

	// GardenRoleDefaultDomain is the value of the GardenRole key indicating type 'default-domain'.
	GardenRoleDefaultDomain = "default-domain"

	// GardenRoleInternalDomain is the value of the GardenRole key indicating type 'internal-domain'.
	GardenRoleInternalDomain = "internal-domain"

	// GardenRoleAlertingSMTP is the value of the GardenRole key indicating type 'alerting-smtp'.
	GardenRoleAlertingSMTP = "alerting-smtp"

	// GardenRoleOpenVPNDiffieHellman is the value of the GardenRole key indicating type 'openvpn-diffie-hellman'.
	GardenRoleOpenVPNDiffieHellman = "openvpn-diffie-hellman"

	// GardenRoleMembers is the value of GardenRole key indicating type 'members'.
	GardenRoleMembers = "members"

	//GardenRoleProject is the value of GardenRole key indicating type 'project'.
	GardenRoleProject = "project"

	//GardenRoleBackup is the value of GardenRole key indicating type 'backup'.
	GardenRoleBackup = "backup"

	// GardenRoleVpa is the value of GardenRole key indicating type 'vpa'.
	GardenRoleVpa = "vpa"

	// GardenCreatedBy is the key for an annotation of a Shoot cluster whose value indicates contains the username
	// of the user that created the resource.
	GardenCreatedBy = "garden.sapcloud.io/createdBy"

	// GardenOperatedBy is the key for an annotation of a Shoot cluster whose value must be a valid email address and
	// is used to send alerts to.
	GardenOperatedBy = "garden.sapcloud.io/operatedBy"

	// GardenIgnoreAlerts is the key for an annotation of a Shoot cluster whose value indicates
	// if alerts for this cluster should be ignored
	GardenIgnoreAlerts = "shoot.garden.sapcloud.io/ignore-alerts"

	// GrafanaOperatorsPrefix is a constant for a prefix used for the operators Grafana instance.
	GrafanaOperatorsPrefix = "g-operators"

	// GrafanaUsersPrefix is a constant for a prefix used for the users Grafana instance.
	GrafanaUsersPrefix = "g-users"

	// IngressPrefix is the part of a FQDN which will be used to construct the domain name for an ingress controller of
	// a Shoot cluster. For example, when a Shoot specifies domain 'cluster.example.com', the ingress domain would be
	// '*.<IngressPrefix>.cluster.example.com'.
	IngressPrefix = "ingress"

	// InternalDomainKey is a key which must be present in an internal domain constructed for a Shoot cluster. If the
	// configured internal domain already contains it, it won't be added twice. If it does not contain it, it will be
	// appended.
	InternalDomainKey = "internal"

	// KubeAPIServerDeploymentName is the name of the kube-apiserver deployment.
	KubeAPIServerDeploymentName = "kube-apiserver"

	// AWSLBReadvertiserDeploymentName is the name for the aws-lb-readvertiser
	AWSLBReadvertiserDeploymentName = "aws-lb-readvertiser"

	// CloudControllerManagerDeploymentName is the name of the cloud-controller-manager deployment.
	CloudControllerManagerDeploymentName = "cloud-controller-manager"

	// CloudControllerManagerServerName is the name of the cloud-controller-manager server.
	CloudControllerManagerServerName = "cloud-controller-manager-server"

	// KubeControllerManagerDeploymentName is the name of the kube-controller-manager deployment.
	KubeControllerManagerDeploymentName = "kube-controller-manager"

	// KubeControllerManagerServerName is the name of the kube-controller-manager server.
	KubeControllerManagerServerName = "kube-controller-manager-server"

	// MachineControllerManagerDeploymentName is the name of the machine-controller-manager deployment.
	MachineControllerManagerDeploymentName = "machine-controller-manager"

	// KubeSchedulerDeploymentName is the name of the kube-scheduler deployment.
	KubeSchedulerDeploymentName = "kube-scheduler"

	// KubeSchedulerServerName is the name of the kube-scheduler server.
	KubeSchedulerServerName = "kube-scheduler-server"

	// KubeAddonManagerDeploymentName is the name of the kube-addon-manager deployment.
	KubeAddonManagerDeploymentName = "kube-addon-manager"

	// CalicoTyphaDeploymentName is the name of the calico-typha deployment.
	CalicoTyphaDeploymentName = "calico-typha"

	// CoreDNSDeploymentName is the name of the coredns deployment.
	CoreDNSDeploymentName = "coredns"

	// VPNShootDeploymentName is the name of the vpn-shoot deployment.
	VPNShootDeploymentName = "vpn-shoot"

	// MetricsServerDeploymentName is the name of the metrics-server deployment.
	MetricsServerDeploymentName = "metrics-server"

	// CalicoNodeDaemonSetName is the name of the calico-node daemon set.
	CalicoNodeDaemonSetName = "calico-node"

	// KubeProxyDaemonSetName is the name of the kube-proxy daemon set.
	KubeProxyDaemonSetName = "kube-proxy"

	// GrafanaOperatorsDeploymentName is the name of the grafana deployment.
	GrafanaOperatorsDeploymentName = "grafana-operators"

	// GrafanaUsersDeploymentName is the name of the grafana deployment for the user-facing grafana.
	GrafanaUsersDeploymentName = "grafana-users"

	// KubeStateMetricsShootDeploymentName is the name of the kube-state-metrics deployment.
	KubeStateMetricsShootDeploymentName = "kube-state-metrics"

	// KubeStateMetricsSeedDeploymentName is the name of the kube-state-metrics-shoot deployment.
	KubeStateMetricsSeedDeploymentName = "kube-state-metrics-seed"

	// NodeExporterDaemonSetName is the name of the node-exporter daemon set.
	NodeExporterDaemonSetName = "node-exporter"

	// ElasticSearchStatefulSetName is the name of the elasticsearch-logging stateful set.
	ElasticSearchStatefulSetName = "elasticsearch-logging"

	// KibanaDeploymentName is the name of the kibana-logging deployment.
	KibanaDeploymentName = "kibana-logging"

	// KibanaAdminIngressCredentialsSecretName is the name of the secret which holds admin credentials.
	KibanaAdminIngressCredentialsSecretName = "logging-ingress-credentials"

	// FluentBitDaemonSetName is the name of the fluent-bit daemon set.
	FluentBitDaemonSetName = "fluent-bit"

	// FluentdEsStatefulSetName is the name of the fluentd-es stateful set.
	FluentdEsStatefulSetName = "fluentd-es"

	// ProjectPrefix is the prefix of namespaces representing projects.
	ProjectPrefix = "garden-"

	// ProjectName is they key of a label on namespaces whose value holds the project name. Usually, the label is set
	// by the Gardener Dashboard.
	ProjectName = "project.garden.sapcloud.io/name"

	// NamespaceProject is they key of a label on namespace whose value holds the project uid.
	NamespaceProject = "namespace.garden.sapcloud.io/project"

	// PrometheusStatefulSetName is the name of the Prometheus stateful set.
	PrometheusStatefulSetName = "prometheus"

	// TerraformerConfigSuffix is the suffix used for the ConfigMap which stores the Terraform configuration and variables declaration.
	TerraformerConfigSuffix = ".tf-config"

	// TerraformerVariablesSuffix is the suffix used for the Secret which stores the Terraform variables definition.
	TerraformerVariablesSuffix = ".tf-vars"

	// TerraformerStateSuffix is the suffix used for the ConfigMap which stores the Terraform state.
	TerraformerStateSuffix = ".tf-state"

	// TerraformerPodSuffix is the suffix used for the name of the Pod which validates the Terraform configuration.
	TerraformerPodSuffix = ".tf-pod"

	// TerraformerJobSuffix is the suffix used for the name of the Job which executes the Terraform configuration.
	TerraformerJobSuffix = ".tf-job"

	// TerraformerPurposeInfraDeprecated is a constant for the complete Terraform setup with purpose 'infrastructure'.
	// deprecated
	TerraformerPurposeInfraDeprecated = "infra"

	// TerraformerPurposeInternalDNSDeprecated is a constant for the complete Terraform setup with purpose 'internal cluster domain'
	// deprecated
	TerraformerPurposeInternalDNSDeprecated = "internal-dns"

	// TerraformerPurposeExternalDNSDeprecated is a constant for the complete Terraform setup with purpose 'external cluster domain'.
	// deprecated
	TerraformerPurposeExternalDNSDeprecated = "external-dns"

	// TerraformerPurposeIngressDNSDeprecated is a constant for the complete Terraform setup with purpose 'ingress domain'.
	// deprecated
	TerraformerPurposeIngressDNSDeprecated = "ingress"

	// TerraformerPurposeBackup is a constant for the complete Terraform setup with purpose 'etcd backup'.
	TerraformerPurposeBackup = "backup"

	// TerraformerPurposeKube2IAM is a constant for the complete Terraform setup with purpose 'kube2iam roles'.
	TerraformerPurposeKube2IAM = "kube2iam"

	// ShootExpirationTimestamp is an annotation on a Shoot resource whose value represents the time when the Shoot lifetime
	// is expired. The lifetime can be extended, but at most by the minimal value of the 'clusterLifetimeDays' property
	// of referenced quotas.
	ShootExpirationTimestamp = "shoot.garden.sapcloud.io/expirationTimestamp"

	// ShootUseAsSeed is a constant for an annotation on a Shoot resource indicating that the Shoot shall be registered as Seed in the
	// Garden cluster once successfully created.
	ShootUseAsSeed = "shoot.garden.sapcloud.io/use-as-seed"

	// ShootStatus is a constant for a label on a Shoot resource indicating that the Shoot's health.
	// Shoot Care controller and can be used to easily identify Shoot clusters with certain states.
	ShootStatus = "shoot.garden.sapcloud.io/status"

	// ShootUnhealthy is a constant for a label on a Shoot resource indicating that the Shoot is unhealthy. It is set and unset by the
	// Shoot Care controller and can be used to easily identify Shoot clusters with issues.
	// Deprecated: Use ShootStatus instead
	ShootUnhealthy = "shoot.garden.sapcloud.io/unhealthy"

	// ShootHibernated is a constant for a label on the Shoot namespace in the Seed indicating the Shoot's hibernation status.
	// +deprecated: Use `Cluster` resource instead.
	ShootHibernated = "shoot.garden.sapcloud.io/hibernated"

	// ShootOperation is a constant for an annotation on a Shoot in a failed state indicating that an operation shall be performed.
	ShootOperation = "shoot.garden.sapcloud.io/operation"

	// ShootOperationMaintain is a constant for an annotation on a Shoot indicating that the Shoot maintenance shall be executed as soon as
	// possible.
	ShootOperationMaintain = "maintain"

	// ShootTasks is a constant for an annotation on a Shoot which states that certain tasks should be done.
	ShootTasks = "shoot.garden.sapcloud.io/tasks"

	// ShootTaskDeployInfrastructure is a name for a Shoot's infrastructure deployment task.
	ShootTaskDeployInfrastructure = "deployInfrastructure"

	// ShootTaskDeployKube2IAMResource is a name for a Shoot's Kube2IAM Resource deployment task.
	ShootTaskDeployKube2IAMResource = "deployKube2IAMResource"

	// ShootOperationRetry is a constant for an annotation on a Shoot indicating that a failed Shoot reconciliation shall be retried.
	ShootOperationRetry = "retry"

	// ShootOperationReconcile is a constant for an annotation on a Shoot indicating that a Shoot reconciliation shall be triggered.
	ShootOperationReconcile = "reconcile"

	// ShootSyncPeriod is a constant for an annotation on a Shoot which may be used to overwrite the global Shoot controller sync period.
	// The value must be a duration. It can also be used to disable the reconciliation at all by setting it to 0m. Disabling the reconciliation
	// does only mean that the period reconciliation is disabled. However, when the Gardener is restarted/redeployed or the specification is
	// changed then the reconciliation flow will be executed.
	ShootSyncPeriod = "shoot.garden.sapcloud.io/sync-period"

	// ShootIgnore is a constant for an annotation on a Shoot which may be used to tell the Gardener that the Shoot with this name should be
	// ignored completely. That means that the Shoot will never reach the reconciliation flow (independent of the operation (create/update/
	// delete)).
	ShootIgnore = "shoot.garden.sapcloud.io/ignore"

	// ShootUID is an annotation key for the shoot namespace in the seed cluster,
	// which value will be the value of `shoot.status.uid`
	ShootUID = "shoot.garden.sapcloud.io/uid"

	// AnnotateSeedNamespacePrefix is such a prefix so that the shoot namespace in the seed cluster
	// will be annotated with the annotations of the shoot resource starting with it.
	// For example, if the shoot is annotated with <AnnotateSeedNamespacePrefix>key=value,
	// then the namespace in the seed will be annotated with <AnnotateSeedNamespacePrefix>key=value, as well.
	AnnotateSeedNamespacePrefix = "custom.shoot.sapcloud.io/"

	// AnnotatePersistentVolumeMinimumSize is used to specify the minimum size of persistent volume in the cluster
	AnnotatePersistentVolumeMinimumSize = "persistentvolume.garden.sapcloud.io/minimumSize"

	// AnnotatePersistentVolumeProvider is used to tell volume provider in the k8s cluster
	AnnotatePersistentVolumeProvider = "persistentvolume.garden.sapcloud.io/provider"

	// BackupNamespacePrefix is a constant for backup namespace created for shoot's backup infrastructure related resources.
	BackupNamespacePrefix = "backup"

	// KubeAddonManagerImageName is the name of the KubeAddonManager image.
	KubeAddonManagerImageName = "kube-addon-manager"

	// CalicoNodeImageName is the name of the CalicoNode image.
	CalicoNodeImageName = "calico-node"

	// CalicoCNIImageName is the name of the CalicoCNI image.
	CalicoCNIImageName = "calico-cni"

	// CalicoTyphaImageName is the name of the CalicoTypha image.
	CalicoTyphaImageName = "calico-typha"

	// CalicoKubeControllersImageName is the name of the CalicoKubeControllers image.
	CalicoKubeControllersImageName = "calico-kube-controllers"

	// CoreDNSImageName is the name of the CoreDNS image.
	CoreDNSImageName = "coredns"

	// HyperkubeImageName is the name of the Hyperkube image.
	HyperkubeImageName = "hyperkube"

	// MetricsServerImageName is the name of the MetricsServer image.
	MetricsServerImageName = "metrics-server"

	// VPNShootImageName is the name of the VPNShoot image.
	VPNShootImageName = "vpn-shoot"

	// VPNSeedImageName is the name of the VPNSeed image.
	VPNSeedImageName = "vpn-seed"

	// NodeExporterImageName is the name of the NodeExporter image.
	NodeExporterImageName = "node-exporter"

	// KubeLegoImageName is the name of the KubeLego image.
	KubeLegoImageName = "kube-lego"

	// Kube2IAMImageName is the name of the Kube2IAM image.
	Kube2IAMImageName = "kube2iam"

	// KubernetesDashboardImageName is the name of the KubernetesDashboard image.
	KubernetesDashboardImageName = "kubernetes-dashboard"

	// BusyboxImageName is the name of the Busybox image.
	BusyboxImageName = "busybox"

	// NginxIngressControllerImageName is the name of the NginxIngressController image.
	NginxIngressControllerImageName = "nginx-ingress-controller"

	// IngressDefaultBackendImageName is the name of the IngressDefaultBackend image.
	IngressDefaultBackendImageName = "ingress-default-backend"

	// ClusterAutoscalerImageName is the name of the ClusterAutoscaler image.
	ClusterAutoscalerImageName = "cluster-autoscaler"

	// AlertManagerImageName is the name of the AlertManager image.
	AlertManagerImageName = "alertmanager"

	// ConfigMapReloaderImageName is the name of the ConfigMapReloader image.
	ConfigMapReloaderImageName = "configmap-reloader"

	// GrafanaImageName is the name of the Grafana image.
	GrafanaImageName = "grafana"

	// PrometheusImageName is the name of the Prometheus image.
	PrometheusImageName = "prometheus"

	// BlackboxExporterImageName is the name of the BlackboxExporter image.
	BlackboxExporterImageName = "blackbox-exporter"

	// KubeStateMetricsImageName is the name of the KubeStateMetrics image.
	KubeStateMetricsImageName = "kube-state-metrics"

	// ETCDImageName is the name of the ETCD image.
	ETCDImageName = "etcd"

	// ETCDBackupRestoreImageName is the name of the ETCDBackupRestore image.
	ETCDBackupRestoreImageName = "etcd-backup-restore"

	// AlicloudControllerManagerImageName is the name of the AlicloudControllerManager image.
	AlicloudControllerManagerImageName = "alicloud-controller-manager"

	// PacketControllerManagerImageName is the name of the PacketControllerManager image.
	PacketControllerManagerImageName = "packet-controller-manager"

	// CSIAttacherImageName is the name of csi attacher - https://github.com/kubernetes-csi/external-attacher
	CSIAttacherImageName = "csi-attacher"
	// CSIAttacher is the name of CSI Attacher
	CSIAttacher = "csi-attacher"

	// CSINodeDriverRegistrarImageName is the name of driver registrar - https://github.com/kubernetes-csi/node-driver-registrar
	CSINodeDriverRegistrarImageName = "csi-node-driver-registrar"

	// CSIProvisionerImageName is the name of csi provisioner - https://github.com/kubernetes-csi/external-provisioner
	CSIProvisionerImageName = "csi-provisioner"
	// CSIProvisioner is the name of CSI Provisioner
	CSIProvisioner = "csi-provisioner"

	// CSISnapshotterImageName is the name of csi plugin for Alicloud - https://github.com/kubernetes-csi/external-snapshotter
	CSISnapshotterImageName = "csi-snapshotter"
	// CSISnapshotter is the name of CSI Snapshotter
	CSISnapshotter = "csi-snapshotter"

	// CSIPluginAlicloudImageName is the name of csi plugin for Alicloud - https://github.com/AliyunContainerService/csi-plugin
	CSIPluginAlicloudImageName = "csi-plugin-alicloud"
	// CSIPluginAlicloud is the name of Alicloud CSI Plugin
	CSIPluginAlicloud = "csi-disk-plugin-alicloud"

	// CSIPluginPacketImageName is the name of csi plugin for Packet - https://github.com/packethost/csi-packet
	CSIPluginPacketImageName = "packet-storage-interface"
	// CSIPluginPacket is the name of Packet CSI Plugin
	CSIPluginPacket = "csi-disk-plugin-packet"

	// CSIPluginController is the name of CSI plugin controller
	CSIPluginController = "csi-plugin-controller"

	// AWSLBReadvertiserImageName is the name of the AWSLBReadvertiser image.
	AWSLBReadvertiserImageName = "aws-lb-readvertiser"

	// PauseContainerImageName is the name of the PauseContainer image.
	PauseContainerImageName = "pause-container"

	// TerraformerImageName is the name of the Terraformer image.
	TerraformerImageName = "terraformer"

	// ElasticsearchImageName is the name of the Elastic-Search image used for logging
	ElasticsearchImageName = "elasticsearch-oss"

	// ElasticsearchMetricsExporterImageName is the name of the metrics exporter image used to fetch elasticsearch metrics.
	ElasticsearchMetricsExporterImageName = "elasticsearch-metrics-exporter"

	// ElasticsearchSearchguardImageName is the name of the Elastic-Search image with installed searchguard plugin used for logging
	ElasticsearchSearchguardImageName = "elasticsearch-searchguard-oss"

	// CuratorImageName is the name of the curator image used to alter the Elastic-search logs
	CuratorImageName = "curator-es"

	// KibanaImageName is the name of the Kibana image used for logging  UI
	KibanaImageName = "kibana-oss"

	// SearchguardImageName is the name of the Searchguard image used for updating the users and roles
	SearchguardImageName = "sg-sgadmin"

	// FluentdEsImageName is the image of the Fluentd image used for logging
	FluentdEsImageName = "fluentd-es"

	// FluentBitImageName is the image of Fluent-bit image
	FluentBitImageName = "fluent-bit"

	// AlpineImageName is the name of alpine image
	AlpineImageName = "alpine"

	// AlpineIptablesImageName is the name of the alpine image with pre-installed iptable rules
	AlpineIptablesImageName = "alpine-iptables"

	// DependencyWatchdogDeploymentName is the name of the dependency controller resources.
	DependencyWatchdogDeploymentName = "dependency-watchdog"

	// SeedSpecHash is a constant for a label on `ControllerInstallation`s (similar to `pod-template-hash` on `Pod`s).
	SeedSpecHash = "seed-spec-hash"

	// RegistrationSpecHash is a constant for a label on `ControllerInstallation`s (similar to `pod-template-hash` on `Pod`s).
	RegistrationSpecHash = "registration-spec-hash"

	// VpaAdmissionControllerImageName is the name of the vpa-admission-controller image
	VpaAdmissionControllerImageName = "vpa-admission-controller"

	// VpaRecommenderImageName is the name of the vpa-recommender image
	VpaRecommenderImageName = "vpa-recommender"

	// VpaUpdaterImageName is the name of the vpa-updater image
	VpaUpdaterImageName = "vpa-updater"

	// VpaExporterImageName is the name of the vpa-exporter image
	VpaExporterImageName = "vpa-exporter"
)

Variables

View Source
var (
	// TerraformerChartPath is the path where the seed-terraformer charts reside.
	TerraformerChartPath = filepath.Join(ChartPath, "seed-terraformer", "charts")

	// ETCDMainStatefulSetName is the name of the etcd-main stateful set.
	ETCDMainStatefulSetName = fmt.Sprintf("etcd-%s", EtcdRoleMain)
	// ETCDEventsStatefulSetName is the name of the etcd-events stateful set.
	ETCDEventsStatefulSetName = fmt.Sprintf("etcd-%s", EtcdRoleEvents)

	// RequiredControlPlaneDeployments is a set of the required shoot control plane deployments
	// running in the seed.
	RequiredControlPlaneDeployments = sets.NewString(
		CloudControllerManagerDeploymentName,
		KubeAddonManagerDeploymentName,
		KubeAPIServerDeploymentName,
		KubeControllerManagerDeploymentName,
		KubeSchedulerDeploymentName,
		MachineControllerManagerDeploymentName,
		DependencyWatchdogDeploymentName,
	)

	// RequiredControlPlaneStatefulSets is a set of the required shoot control plane stateful
	// sets running in the seed.
	RequiredControlPlaneStatefulSets = sets.NewString(
		ETCDMainStatefulSetName,
		ETCDEventsStatefulSetName,
	)

	// RequiredSystemComponentDeployments is a set of the required system components.
	RequiredSystemComponentDeployments = sets.NewString(
		CalicoTyphaDeploymentName,
		CoreDNSDeploymentName,
		VPNShootDeploymentName,
		MetricsServerDeploymentName,
	)

	// RequiredSystemComponentDaemonSets is a set of the required shoot control plane daemon sets.
	RequiredSystemComponentDaemonSets = sets.NewString(
		CalicoNodeDaemonSetName,
		KubeProxyDaemonSetName,
	)

	// RequiredMonitoringSeedDeployments is a set of the required seed monitoring deployments.
	RequiredMonitoringSeedDeployments = sets.NewString(
		GrafanaOperatorsDeploymentName,
		GrafanaUsersDeploymentName,
		KubeStateMetricsSeedDeploymentName,
		KubeStateMetricsShootDeploymentName,
	)

	// RequiredMonitoringShootDaemonSets is a set of the required shoot monitoring daemon sets.
	RequiredMonitoringShootDaemonSets = sets.NewString(
		NodeExporterDaemonSetName,
	)

	// RequiredLoggingStatefulSets is a set of the required logging stateful sets.
	RequiredLoggingStatefulSets = sets.NewString(
		ElasticSearchStatefulSetName,
	)

	// RequiredLoggingDeployments is a set of the required logging deployments.
	RequiredLoggingDeployments = sets.NewString(
		KibanaDeploymentName,
	)
)
View Source
var GardenerDeletionGracePeriod = 5 * time.Minute

GardenerDeletionGracePeriod is the default grace period for Gardener's force deletion methods.

Functions

func AllPrivateNetworkBlocks

func AllPrivateNetworkBlocks() []net.IPNet

AllPrivateNetworkBlocks returns a list of all Private network (RFC1918) and Carrier-grade NAT (RFC6598) IPv4 blocks.

func CarrierGradeNATBlock

func CarrierGradeNATBlock() *net.IPNet

CarrierGradeNATBlock returns a Carrier-grade NAT (RFC6598) 100.64.0.0/10 IPv4 block

func ComputeClusterIP

func ComputeClusterIP(cidr gardencorev1alpha1.CIDR, lastByte byte) string

ComputeClusterIP parses the provided <cidr> and sets the last byte to the value of <lastByte>. For example, <cidr> = 100.64.0.0/11 and <lastByte> = 10 the result would be 100.64.0.10

func CurrentReplicaCount

func CurrentReplicaCount(client client.Client, namespace, deploymentName string) (int32, error)

CurrentReplicaCount returns the current replicaCount for the given deployment.

func DeleteAlertmanager

func DeleteAlertmanager(k8sClient kubernetes.Interface, namespace string) error

DeleteAlertmanager deletes all resources of the Alertmanager in a given namespace.

func DeleteGrafanaByRole

func DeleteGrafanaByRole(k8sClient kubernetes.Interface, namespace, role string) error

DeleteGrafanaByRole deletes the monitoring stack for the shoot owner.

func DeleteLoggingStack

func DeleteLoggingStack(k8sClient kubernetes.Interface, namespace string) error

DeleteLoggingStack deletes all resource of the EFK logging stack in the given namespace.

func DeleteOldGrafanaStack

func DeleteOldGrafanaStack(k8sClient kubernetes.Interface, namespace string) error

DeleteOldGrafanaStack deletes all left over grafana objects.

func DeleteVpa

func DeleteVpa(k8sClient kubernetes.Interface, namespace string) error

DeleteVpa delete all resources required for the vertical pod autoscaler in the given namespace.

func ExceptNetworks

func ExceptNetworks(networks []gardencorev1alpha1.CIDR, except ...gardencorev1alpha1.CIDR) ([]interface{}, error)

ExceptNetworks returns a list of maps with `network` key containing one of `networks` and `except` key containgn list of `cidr` which are part of those CIDRs.

Calling `ExceptNetworks([]garden.CIDR{"10.0.0.0/8","172.16.0.0/12"},"10.10.0.0/24","172.16.1.0/24")` produces:

[

{"network": "10.0.0.0/8", "except": ["10.10.0.0/24"]},
{"network": "172.16.0.0/12", "except": ["172.16.1.0/24"]},

]

func ExtractShootName

func ExtractShootName(backupInfrastructureName string) string

ExtractShootName returns Shoot resource name extracted from provided <backupInfrastructureName>.

func GenerateAddonConfig

func GenerateAddonConfig(values map[string]interface{}, enabled bool) map[string]interface{}

GenerateAddonConfig returns the provided <values> in case <enabled> is true. Otherwise, nil is being returned.

func GenerateBackupInfrastructureName

func GenerateBackupInfrastructureName(seedNamespace string, shootUID types.UID) string

GenerateBackupInfrastructureName returns BackupInfrastructure resource name created from provided <seedNamespace> and <shootUID>.

func GenerateBackupNamespaceName

func GenerateBackupNamespaceName(backupInfrastructureName string) string

GenerateBackupNamespaceName returns Backup namespace name created from provided <backupInfrastructureName>.

func GenerateTerraformVariablesEnvironment

func GenerateTerraformVariablesEnvironment(secret *corev1.Secret, keyValueMap map[string]string) map[string]string

GenerateTerraformVariablesEnvironment takes a <secret> and a <keyValueMap> and builds an environment which can be injected into the Terraformer job/pod manifest. The keys of the <keyValueMap> will be prefixed with 'TF_VAR_' and the value will be used to extract the respective data from the <secret>.

func GetDomainInfoFromAnnotations

func GetDomainInfoFromAnnotations(annotations map[string]string) (provider string, domain string, err error)

GetDomainInfoFromAnnotations returns the provider and the domain that is specified in the give annotations.

func GetLoadBalancerIngress

func GetLoadBalancerIngress(ctx context.Context, client client.Client, namespace, name string) (string, error)

GetLoadBalancerIngress takes a context, a client, a namespace and a service name. It queries for a load balancer's technical name (ip address or hostname). It returns the value of the technical name whereby it always prefers the IP address (if given) over the hostname. It also returns the list of all load balancer ingresses.

func GetSecretKeysWithPrefix

func GetSecretKeysWithPrefix(kind string, m map[string]*corev1.Secret) []string

GetSecretKeysWithPrefix returns a list of keys of the given map <m> which are prefixed with <kind>.

func InjectCSIFeatureGates

func InjectCSIFeatureGates(kubeVersion string, featureGates map[string]bool) (map[string]bool, error)

InjectCSIFeatureGates adds required feature gates for csi when starting Kubelet/Kube-APIServer based on kubernetes version

func IsFollowingNewNamingConvention

func IsFollowingNewNamingConvention(seedNamespace string) bool

IsFollowingNewNamingConvention determines whether the new naming convention followed for shoot resources. TODO: Remove this and use only "--" as separator, once we have all shoots deployed as per new naming conventions.

func MergeOwnerReferences

func MergeOwnerReferences(references []metav1.OwnerReference, newReferences ...metav1.OwnerReference) []metav1.OwnerReference

MergeOwnerReferences merges the newReferences with the list of existing references.

func Private12BitBlock

func Private12BitBlock() *net.IPNet

Private12BitBlock returns a private network (RFC1918) 172.16.0.0/12 IPv4 block

func Private16BitBlock

func Private16BitBlock() *net.IPNet

Private16BitBlock returns a private network (RFC1918) 192.168.0.0/16 IPv4 block

func Private8BitBlock

func Private8BitBlock() *net.IPNet

Private8BitBlock returns a private network (RFC1918) 10.0.0.0/8 IPv4 block

func ProjectForNamespace

func ProjectForNamespace(projectLister gardenlisters.ProjectLister, namespaceName string) (*gardenv1beta1.Project, error)

ProjectForNamespace returns the project object responsible for a given <namespace>. It tries to identify the project object by looking for the namespace name in the project statuses.

func ProjectNameForNamespace

func ProjectNameForNamespace(namespace *corev1.Namespace) string

ProjectNameForNamespace determines the project name for a given <namespace>. It tries to identify it first per the namespace's ownerReferences. If it doesn't help then it will check whether the project name is a label on the namespace object. If it doesn't help then the name can be inferred from the namespace name in case it is prefixed with the project prefix. If none of those approaches the namespace name itself is returned as project name.

func ReadLeaderElectionRecord

func ReadLeaderElectionRecord(k8sClient kubernetes.Interface, lock, namespace, name string) (*resourcelock.LeaderElectionRecord, error)

ReadLeaderElectionRecord returns the leader election record for a given lock type and a namespace/name combination.

func ReplaceCloudProviderConfigKey

func ReplaceCloudProviderConfigKey(cloudProviderConfig, separator, key, value string) string

ReplaceCloudProviderConfigKey replaces a key with the new value in the given cloud provider config.

func ShouldObjectBeRemoved

func ShouldObjectBeRemoved(obj metav1.Object, gracePeriod time.Duration) bool

ShouldObjectBeRemoved determines whether the given object should be gone now. This is calculated by first checking the deletion timestamp of an object: If the deletion timestamp is unset, the object should not be removed - i.e. this returns false. Otherwise, it is checked whether the deletionTimestamp is before the current time minus the grace period.

func ToExceptNetworks

func ToExceptNetworks(networks []net.IPNet, except ...gardencorev1alpha1.CIDR) ([]interface{}, error)

ToExceptNetworks returns a list of maps with `network` key containing one of `networks` and `except` key containgn list of `cidr` which are part of those CIDRs.

Calling `ToExceptNetworks(AllPrivateNetworkBlocks(),"10.10.0.0/24","172.16.1.0/24","192.168.1.0/24","100.64.1.0/24")` produces:

[

{"network": "10.0.0.0/8", "except": ["10.10.0.0/24"]},
{"network": "172.16.0.0/12", "except": ["172.16.1.0/24"]},
{"network": "192.168.0.0/16", "except": ["192.168.1.0/24"]},
{"network": "100.64.0.0/10", "except": ["100.64.1.0/24"]},

]

Types

type CloudConfigUserDataConfig

type CloudConfigUserDataConfig struct {
	ProvisionCloudProviderConfig bool
	KubeletParameters            []string
	HostnameOverride             bool
	EnableCSI                    bool
	ProviderIDProvided           bool
}

CloudConfigUserDataConfig is a struct containing cloud-specific configuration required to render the shoot-cloud-config chart properly.

Jump to

Keyboard shortcuts

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