Skip to content

Commit 826e30e

Browse files
Microzuul CIGerrit Code Review
authored andcommitted
Merge "Mount existing nodepool-ca volume in zuul-capacity container"
2 parents 658d9c7 + 5930b92 commit 826e30e

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

controllers/capacity.go

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ import (
88
apiv1 "k8s.io/api/core/v1"
99
)
1010

11-
func MkZuulCapacityContainer(openshiftUser bool) apiv1.Container {
11+
func MkZuulCapacityContainer(
12+
openshiftUser bool,
13+
corporateCMExists bool,
14+
) apiv1.Container {
1215
container := base.MkContainer("zuul-capacity", base.ZuulCapacityImage(), openshiftUser)
1316
container.Args = []string{"--port", "9100"}
1417
container.Env = []apiv1.EnvVar{
@@ -36,5 +39,16 @@ func MkZuulCapacityContainer(openshiftUser bool) apiv1.Container {
3639
ReadOnly: true,
3740
},
3841
}
42+
43+
// Mount existing nodepool-ca volume for CA certs
44+
if corporateCMExists {
45+
container.VolumeMounts = append(
46+
container.VolumeMounts,
47+
apiv1.VolumeMount{
48+
Name: "nodepool-ca",
49+
MountPath: TrustedCAExtractedMountPath,
50+
})
51+
}
52+
3953
return container
4054
}

controllers/nodepool.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -788,9 +788,8 @@ func (r *SFController) DeployNodepoolLauncher(statsdExporterVolume apiv1.Volume,
788788
if hasProviderSecret(initialVolumeMounts) {
789789
// Append zuul-capacity sidecar
790790
nl.Spec.Template.Spec.Containers = append(nl.Spec.Template.Spec.Containers,
791-
MkZuulCapacityContainer(r.isOpenShift),
791+
MkZuulCapacityContainer(r.isOpenShift, corporateCMExists),
792792
)
793-
794793
// Setup zuul-capacity service
795794
zcSrv := base.MkService("zuul-capacity", r.ns, "nodepool-launcher", []int32{9100}, "zuul-capacity", r.cr.Spec.ExtraLabels)
796795
r.GetOrCreate(&zcSrv)

doc/reference/CHANGELOG.md

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

2626
- Ensure the trailing '/' when accessing https://<domain>/logjuicer. The web app was failing without the trailing slash.
2727
- zuul: when the user provides a connection named opendev.org, the operator no longer adds its own git connection and use the one provided by the user for accessing zuul-jobs.
28+
- zuul-capacity: the corporate CA certificate is now part of the CA trust chain if provided.
2829

2930
## [v0.0.57] - 2025-04-24
3031

0 commit comments

Comments
 (0)