@@ -166,8 +166,12 @@ type FoundationDBClusterSpec struct {
166
166
167
167
// Services defines the configuration for services that sit in front of our
168
168
// pods.
169
+ // Deprecated: Use Routing instead.
169
170
Services ServiceConfig `json:"services,omitempty"`
170
171
172
+ // Routing defines the configuration for routing to our pods.
173
+ Routing RoutingConfig `json:"routing,omitempty"`
174
+
171
175
// IgnoreUpgradabilityChecks determines whether we should skip the check for
172
176
// client compatibility when performing an upgrade.
173
177
IgnoreUpgradabilityChecks bool `json:"ignoreUpgradabilityChecks,omitempty"`
@@ -1568,23 +1572,28 @@ type ProcessAddress struct {
1568
1572
// representation.
1569
1573
func ParseProcessAddress (address string ) (ProcessAddress , error ) {
1570
1574
result := ProcessAddress {}
1571
- components := strings .Split (address , ":" )
1572
1575
1573
- if len (components ) < 2 {
1576
+ ipEnd := strings .Index (address , "]:" ) + 1
1577
+ if ipEnd == 0 {
1578
+ ipEnd = strings .Index (address , ":" )
1579
+ }
1580
+ if ipEnd == - 1 {
1574
1581
return result , fmt .Errorf ("invalid address: %s" , address )
1575
1582
}
1576
1583
1577
- result .IPAddress = components [ 0 ]
1584
+ result .IPAddress = address [: ipEnd ]
1578
1585
1579
- port , err := strconv .Atoi (components [1 ])
1586
+ components := strings .Split (address [ipEnd + 1 :], ":" )
1587
+
1588
+ port , err := strconv .Atoi (components [0 ])
1580
1589
if err != nil {
1581
1590
return result , err
1582
1591
}
1583
1592
result .Port = port
1584
1593
1585
- if len (components ) > 2 {
1586
- result .Flags = make (map [string ]bool , len (components )- 2 )
1587
- for _ , flag := range components [2 :] {
1594
+ if len (components ) > 1 {
1595
+ result .Flags = make (map [string ]bool , len (components )- 1 )
1596
+ for _ , flag := range components [1 :] {
1588
1597
result .Flags [flag ] = true
1589
1598
}
1590
1599
}
@@ -1813,10 +1822,13 @@ type DataCenter struct {
1813
1822
// ContainerOverrides provides options for customizing a container created by
1814
1823
// the operator.
1815
1824
type ContainerOverrides struct {
1816
- // EnableLivenessProbe defines if the sidecar should have a livenessProbe in addition
1817
- // to the readinessProbe. This setting will be enabled per default in the 1.0.0 release.
1825
+ // EnableLivenessProbe defines if the sidecar should have a livenessProbe.
1826
+ // This setting will be ignored on the main container.
1827
+ EnableLivenessProbe * bool `json:"enableLivenessProbe,omitempty"`
1828
+
1829
+ // EnableReadinessProbe defines if the sidecar should have a readinessProbe.
1818
1830
// This setting will be ignored on the main container.
1819
- EnableLivenessProbe bool `json:"enableLivenessProbe ,omitempty"`
1831
+ EnableReadinessProbe * bool `json:"enableReadinessProbe ,omitempty"`
1820
1832
1821
1833
// EnableTLS controls whether we should be listening on a TLS connection.
1822
1834
EnableTLS bool `json:"enableTls,omitempty"`
@@ -1994,13 +2006,13 @@ func (cluster *FoundationDBCluster) GetLockID() string {
1994
2006
// NeedsExplicitListenAddress determines whether we pass a listen address
1995
2007
// parameter to fdbserver.
1996
2008
func (cluster * FoundationDBCluster ) NeedsExplicitListenAddress () bool {
1997
- source := cluster .Spec .Services .PublicIPSource
2009
+ source := cluster .Spec .Routing .PublicIPSource
1998
2010
return source != nil && * source == PublicIPSourceService
1999
2011
}
2000
2012
2001
2013
// GetPublicIPSource returns the set PublicIPSource or the default PublicIPSourcePod
2002
2014
func (cluster * FoundationDBCluster ) GetPublicIPSource () PublicIPSource {
2003
- source := cluster .Spec .Services .PublicIPSource
2015
+ source := cluster .Spec .Routing .PublicIPSource
2004
2016
if source == nil {
2005
2017
return PublicIPSourcePod
2006
2018
}
@@ -2383,6 +2395,7 @@ type LockDenyListEntry struct {
2383
2395
}
2384
2396
2385
2397
// ServiceConfig allows configuring services that sit in front of our pods.
2398
+ // Deprecated: Use RoutingConfig instead.
2386
2399
type ServiceConfig struct {
2387
2400
// Headless determines whether we want to run a headless service for the
2388
2401
// cluster.
@@ -2395,6 +2408,26 @@ type ServiceConfig struct {
2395
2408
PublicIPSource * PublicIPSource `json:"publicIPSource,omitempty"`
2396
2409
}
2397
2410
2411
+ // RoutingConfig allows configuring routing to our pods, and services that sit
2412
+ // in front of them.
2413
+ type RoutingConfig struct {
2414
+ // Headless determines whether we want to run a headless service for the
2415
+ // cluster.
2416
+ HeadlessService * bool `json:"headlessService,omitempty"`
2417
+
2418
+ // PublicIPSource specifies what source a process should use to get its
2419
+ // public IPs.
2420
+ //
2421
+ // This supports the values `pod` and `service`.
2422
+ PublicIPSource * PublicIPSource `json:"publicIPSource,omitempty"`
2423
+
2424
+ // PodIPFamily tells the pod which family of IP addresses to use.
2425
+ // You can use 4 to represent IPv4, and 6 to represent IPv6.
2426
+ // This feature is only supported in FDB 7.0 or later, and requires
2427
+ // dual-stack support in your Kubernetes environment.
2428
+ PodIPFamily * int `json:"podIPFamily,omitempty"`
2429
+ }
2430
+
2398
2431
// RequiredAddressSet provides settings for which addresses we need to listen
2399
2432
// on.
2400
2433
type RequiredAddressSet struct {
0 commit comments