Skip to content

Commit

Permalink
change from isCapi to GetTenant
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinBisson committed Nov 27, 2024
1 parent 21fbf4b commit 7e0ffc0
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
4 changes: 0 additions & 4 deletions pkg/logged-cluster/vintagemc/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ type Object struct {
Options loggedcluster.Options
}

func (o Object) IsCAPI() bool {
return false
}

func (o Object) HasLoggingEnabled() bool {
return o.Options.EnableLoggingFlag
}
Expand Down
4 changes: 0 additions & 4 deletions pkg/logged-cluster/vintagewc/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ func (o Object) HasLoggingEnabled() bool {
return loggingEnabled
}

func (o Object) IsCAPI() bool {
return false
}

func (o Object) GetLoggingAgent() string {
return o.Options.LoggingAgent
}
Expand Down
7 changes: 1 addition & 6 deletions pkg/resource/proxy-auth/proxy-auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,12 @@ func GenerateProxyAuthSecret(lc loggedcluster.Interface, credentialsSecret *v1.S
return v1.Secret{}, errors.WithStack(err)
}

tenant := writeUser
if lc.IsCAPI() {
tenant = common.DefaultWriteTenant
}

authCfg.Users = append(authCfg.Users, config.User{
Username: writeUser,
Password: writePassword,
// we set the default tenant even though it may be given by the sender
// depending of grafana-multi-teant-proxy config
OrgID: tenant,
OrgID: writeUser,
})

// Add write user to allowed tenants for read user
Expand Down

0 comments on commit 7e0ffc0

Please sign in to comment.