Skip to content

Commit 3f8e16a

Browse files
Move the executor zone to the standalone definition
This change fixes the zone configuration to remote executor because it does not make sense to have it defined for executor running in the main control plane. Change-Id: I7d65d7843315a8970314a77494dc2b599e38539b
1 parent effa09e commit 3f8e16a

6 files changed

Lines changed: 12 additions & 12 deletions

File tree

api/v1/softwarefactory_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,8 @@ type StandaloneZuulExecutorSpec struct {
272272
ControlPlanePublicGSHostname string `json:"controlPlanePublicGSHostname"`
273273
// This is the public host or IP address reachable from zuul-web
274274
PublicHostName string `json:"publicHostname"`
275+
// The (optional) nodepool [executor-zone](https://zuul-ci.org/docs/zuul/latest/configuration.html#attr-executor.zone) setting
276+
Zone string `json:"zone,omitempty"`
275277
}
276278

277279
// Spec for the pool of executor microservices
@@ -305,8 +307,6 @@ type ZuulExecutorSpec struct {
305307
// +kubebuilder:default:=60
306308
// +kubebuilder:validation:Minimum:=0
307309
AnsibleSetupTimeout int `json:"ansibleSetupTimeout,omitempty"`
308-
// The (optional) nodepool [executor-zone](https://zuul-ci.org/docs/zuul/latest/configuration.html#attr-executor.zone) setting
309-
Zone string `json:"zone,omitempty"`
310310
// +kubebuilder:default:=7200
311311
// +kubebuilder:validation:Minimum:=1
312312
TerminationGracePeriodSeconds int64 `json:"TerminationGracePeriodSeconds,omitempty"`

config/crd/bases/sf.softwarefactory-project.io_softwarefactories.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,10 @@ spec:
652652
description: This is the public host or IP address reachable
653653
from zuul-web
654654
type: string
655+
zone:
656+
description: The (optional) nodepool [executor-zone](https://zuul-ci.org/docs/zuul/latest/configuration.html#attr-executor.zone)
657+
setting
658+
type: string
655659
required:
656660
- controlPlanePublicGSHostname
657661
- controlPlanePublicZKHostname
@@ -677,10 +681,6 @@ spec:
677681
required:
678682
- size
679683
type: object
680-
zone:
681-
description: The (optional) nodepool [executor-zone](https://zuul-ci.org/docs/zuul/latest/configuration.html#attr-executor.zone)
682-
setting
683-
type: string
684684
type: object
685685
gerritconns:
686686
description: The list of Gerrit-based connections to add to Zuul's

controllers/zuul.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,8 +1016,8 @@ func (r *SFController) EnsureZuulConfigSecret(remoteExecutor bool) *ini.File {
10161016
ansibleSetupTimeout := int(r.cr.Spec.Zuul.Executor.AnsibleSetupTimeout)
10171017
cfgINI.Section("executor").NewKey("ansible_setup_timeout", strconv.Itoa(ansibleSetupTimeout))
10181018
}
1019-
if r.cr.Spec.Zuul.Executor.Zone != "" {
1020-
cfgINI.Section("executor").NewKey("zone", r.cr.Spec.Zuul.Executor.Zone)
1019+
if r.cr.Spec.Zuul.Executor.Standalone != nil && r.cr.Spec.Zuul.Executor.Standalone.Zone != "" {
1020+
cfgINI.Section("executor").NewKey("zone", r.cr.Spec.Zuul.Executor.Standalone.Zone)
10211021
}
10221022

10231023
// Enable prometheus metrics

docs/reference/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ All notable changes to this project will be documented in this file.
66

77
### Added
88

9-
- Zuul.Executor.Zone setting to configure the nodepool executor-zone.
9+
- Zuul.Executor.Standalone.Zone setting to configure the nodepool executor-zone.
1010

1111
### Changed
1212
### Deprecated

docs/reference/api/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,7 @@ _Appears in:_
495495
| `controlPlanePublicZKHostnames` _string_ | This is the public hostnames or IPs where control plane's Zookeepers can be reached | -|
496496
| `controlPlanePublicGSHostname` _string_ | This is the public hostname or IP where control plane's GitServer can be reached | -|
497497
| `publicHostname` _string_ | This is the public host or IP address reachable from zuul-web | -|
498+
| `zone` _string_ | The (optional) nodepool [executor-zone](https://zuul-ci.org/docs/zuul/latest/configuration.html#attr-executor.zone) setting | -|
498499

499500

500501
#### StorageDefaultSpec
@@ -569,7 +570,6 @@ _Appears in:_
569570
| `limits` _[LimitsSpec](#limitsspec)_ | Memory/CPU Limit | {map[cpu:500m memory:2Gi]}|
570571
| `diskLimitPerJob` _integer_ | the [disk_limit_per_job](https://zuul-ci.org/docs/zuul/latest/configuration.html#attr-executor.disk_limit_per_job) | {250}|
571572
| `ansibleSetupTimeout` _integer_ | the [ansible setup playbook timeout](https://zuul-ci.org/docs/zuul/latest/configuration.html#attr-executor.ansible_setup_timeout) | {60}|
572-
| `zone` _string_ | The (optional) nodepool [executor-zone](https://zuul-ci.org/docs/zuul/latest/configuration.html#attr-executor.zone) setting | -|
573573
| `TerminationGracePeriodSeconds` _integer_ | | {7200}|
574574

575575

schemas/ZuulExecutor.dhall

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
, controlPlanePublicZKHostname : Text
1212
, publicHostname : Text
1313
, controlPlanePublicZKHostnames : Optional (List Text)
14+
, zone : Optional Text
1415
}
1516
, storage : Optional (./Storage.dhall).Type
16-
, zone : Optional Text
1717
}
1818
, default =
1919
{ TerminationGracePeriodSeconds = None Natural
@@ -28,8 +28,8 @@
2828
, controlPlanePublicZKHostname : Text
2929
, publicHostname : Text
3030
, controlPlanePublicZKHostnames : Optional (List Text)
31+
, zone : Optional Text
3132
}
3233
, storage = None (./Storage.dhall).Type
33-
, zone = None Text
3434
}
3535
}

0 commit comments

Comments
 (0)