mirror of
https://github.com/fluxcd/flux2.git
synced 2026-04-10 22:20:05 +00:00
Add --audience-claim for GCR Receivers
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
parent
02734f28ba
commit
c601a212f6
5 changed files with 42 additions and 16 deletions
|
|
@ -90,10 +90,11 @@ type Options struct {
|
|||
GitHubAppBaseURL string
|
||||
|
||||
// Receiver options
|
||||
ReceiverType string
|
||||
Token string
|
||||
Hostname string
|
||||
EmailClaim string
|
||||
ReceiverType string
|
||||
Token string
|
||||
Hostname string
|
||||
EmailClaim string
|
||||
AudienceClaim string
|
||||
}
|
||||
|
||||
type VerificationCrt struct {
|
||||
|
|
|
|||
|
|
@ -306,7 +306,11 @@ func GenerateReceiver(options Options) (*manifestgen.Manifest, error) {
|
|||
return nil, fmt.Errorf("email-claim is required for gcr receiver type")
|
||||
}
|
||||
secret.StringData[EmailSecretKey] = options.EmailClaim
|
||||
secret.StringData[AudienceSecretKey] = webhookURL
|
||||
if options.AudienceClaim != "" {
|
||||
secret.StringData[AudienceSecretKey] = options.AudienceClaim
|
||||
} else {
|
||||
secret.StringData[AudienceSecretKey] = webhookURL
|
||||
}
|
||||
}
|
||||
|
||||
return secretToManifest(secret, options)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue