-
Notifications
You must be signed in to change notification settings - Fork 459
/
types.go
35 lines (29 loc) · 1.31 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Gardener contributors
//
// SPDX-License-Identifier: Apache-2.0
package v1beta1
const (
// GardenerSeedLeaseNamespace is the namespace in which Gardenlet will report Seeds'
// status using Lease resources for each Seed
GardenerSeedLeaseNamespace = "gardener-system-seed-lease"
// GardenerShootIssuerNamespace is the namespace in which Gardenlet
// will sync service account issuer discovery documents
// of Shoot clusters which require managed issuer
GardenerShootIssuerNamespace = "gardener-system-shoot-issuer"
)
// IPFamily is a type for specifying an IP protocol version to use in Gardener clusters.
type IPFamily string
const (
// IPFamilyIPv4 is the IPv4 IP family.
IPFamilyIPv4 IPFamily = "IPv4"
// IPFamilyIPv6 is the IPv6 IP family.
IPFamilyIPv6 IPFamily = "IPv6"
)
// IsIPv4SingleStack determines whether the given list of IP families specifies IPv4 single-stack networking.
func IsIPv4SingleStack(ipFamilies []IPFamily) bool {
return len(ipFamilies) == 0 || (len(ipFamilies) == 1 && ipFamilies[0] == IPFamilyIPv4)
}
// IsIPv6SingleStack determines whether the given list of IP families specifies IPv6 single-stack networking.
func IsIPv6SingleStack(ipFamilies []IPFamily) bool {
return len(ipFamilies) == 1 && ipFamilies[0] == IPFamilyIPv6
}