Skip to content

Commit

Permalink
Add set stagedIndex in stage RPA for FBCs (#356)
Browse files Browse the repository at this point in the history
  • Loading branch information
creydr authored Oct 16, 2024
1 parent a0f0da1 commit a35bd50
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/konfluxgen/konfluxgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,7 @@ type rpaFBCData struct {
TargetIndex string
PublishingCredentials string
PipelineSA string
StagedIndex bool
}

func GenerateFBCReleasePlanAdmission(applications []string, resourceOutputPath string, appName string, soVersion string) error {
Expand Down Expand Up @@ -749,6 +750,7 @@ func GenerateFBCReleasePlanAdmission(applications []string, resourceOutputPath s
TargetIndex: "",
PublishingCredentials: "staged-index-fbc-publishing-credentials",
PipelineSA: "release-index-image-staging",
StagedIndex: true,
}
outputFilePath = filepath.Join(outputDir, fmt.Sprintf("%s.yaml", rpaName))
if err := executeFBCReleasePlanAdmissionTemplate(fbcData, outputFilePath); err != nil {
Expand Down
3 changes: 3 additions & 0 deletions pkg/konfluxgen/releaseplanadmission-fbc.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ spec:
policy: fbc-standard
data:
fbc:
{{{- if .StagedIndex }}}
stagedIndex: true
{{{- end }}}
fromIndex: "{{{ .FromIndex }}}"
targetIndex: "{{{ .TargetIndex }}}"
publishingCredentials: "{{{ .PublishingCredentials }}}"
Expand Down

0 comments on commit a35bd50

Please sign in to comment.