Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

operator: add orgId property to console cdr #22

Merged
merged 1 commit into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ type EnterpriseLoginRedpandaCloud struct {

// AllowedOrigins indicates if response is allowed from given origin
AllowedOrigins []string `json:"allowedOrigins,omitempty" yaml:"allowedOrigins,omitempty"`

// OrgID refers to the Redpanda Cloud organization id that Console is running in.
// If the OrgID is set, Console will ensure that incoming requests will only pass
// if the provided access token matches this org id in the custom claims.
OrgID string `json:"orgId,omitempty" yaml:"orgId,omitempty"`
}

// IsGoogleLoginEnabled returns true if Google SSO provider is enabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,13 @@ spec:
type: string
enabled:
type: boolean
orgId:
description: OrgID refers to the Redpanda Cloud organization
id that Console is running in. If the OrgID is set, Console
will ensure that incoming requests will only pass if the
provided access token matches this org id in the custom
claims.
type: string
required:
- audience
- domain
Expand Down
1 change: 1 addition & 0 deletions src/go/k8s/pkg/console/configmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ func (cm *ConfigMap) genLogin(
switch {
case provider.RedpandaCloud != nil:
enterpriseLogin.RedpandaCloud = &vectorizedv1alpha1.EnterpriseLoginRedpandaCloud{
OrgID: provider.RedpandaCloud.OrgID,
Enabled: provider.RedpandaCloud.Enabled,
Domain: provider.RedpandaCloud.Domain,
Audience: provider.RedpandaCloud.Audience,
Expand Down