Skip to content

Commit

Permalink
Merge "Add corporate certs mount to zuul-web deployment"
Browse files Browse the repository at this point in the history
  • Loading branch information
Microzuul CI authored and Gerrit Code Review committed Sep 10, 2024
2 parents e97e929 + eca5c24 commit c4293ec
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
19 changes: 12 additions & 7 deletions controllers/zuul.go
Original file line number Diff line number Diff line change
Expand Up @@ -690,17 +690,22 @@ func (r *SFController) EnsureZuulWeb(cfg *ini.File) bool {
authSections := utils.IniGetSectionNamesByPrefix(cfg, "auth")
sections = append(sections, authSections...)
sections = append(sections, "web")

// Check if Corporate Certificate exists
corporateCM, corporateCMExists := r.CorporateCAConfigMapExists()

annotations := map[string]string{
"zuul-common-config": utils.IniSectionsChecksum(cfg, commonIniConfigSections),
"zuul-component-config": utils.IniSectionsChecksum(cfg, sections),
"zuul-image": getZuulImage("zuul-web"),
"serial": "6",
"zuul-logging": utils.Checksum([]byte(r.getZuulLoggingString("zuul-web"))),
"zuul-connections": utils.IniSectionsChecksum(cfg, utils.IniGetSectionNamesByPrefix(cfg, "connection")),
"zuul-common-config": utils.IniSectionsChecksum(cfg, commonIniConfigSections),
"zuul-component-config": utils.IniSectionsChecksum(cfg, sections),
"zuul-image": getZuulImage("zuul-web"),
"serial": "6",
"zuul-logging": utils.Checksum([]byte(r.getZuulLoggingString("zuul-web"))),
"zuul-connections": utils.IniSectionsChecksum(cfg, utils.IniGetSectionNamesByPrefix(cfg, "connection")),
"corporate-ca-certs-version": getCMVersion(corporateCM, corporateCMExists),
}

zw := base.MkDeployment("zuul-web", r.ns, "", r.cr.Spec.ExtraLabels)
zuulContainer := r.mkZuulContainer("zuul-web", false)
zuulContainer := r.mkZuulContainer("zuul-web", corporateCMExists)
annotations["limits"] = base.UpdateContainerLimit(r.cr.Spec.Zuul.Web.Limits, &zuulContainer)
zw.Spec.Template.Spec.Containers = []apiv1.Container{zuulContainer}
zw.Spec.Template.Spec.Volumes = mkZuulVolumes("zuul-web", r, false)
Expand Down
3 changes: 3 additions & 0 deletions doc/reference/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file.
## [in development]

### Added

- zuul: add corporate certs to zuul-web

### Removed
### Changed
### Fixed
Expand Down

0 comments on commit c4293ec

Please sign in to comment.