@@ -84,21 +84,21 @@ func GetAccessToken(secretsLister v1.SecretLister) (string, error) {
84
84
// 1. custom ORGANIZATION_ID is awailable as telemetry annotation on console-operator config or in telemetry-config configmap
85
85
// 2. cached ORGANIZATION_ID is available on the operator controller instance
86
86
// else fetch the ORGANIZATION_ID from OCM
87
- func GetOrganizationID (telemetryConfig map [string ]string , cachedOrganizationID , clusterID , accessToken string ) string {
88
- if customOrganizationID , isCustomOrgIDSet := telemetryConfig ["ORGANIZATION_ID" ]; isCustomOrgIDSet {
89
- return customOrganizationID
87
+ func GetOrganizationID (telemetryConfig map [string ]string , cachedOrganizationID , clusterID , accessToken string ) (string , bool ) {
88
+ customOrganizationID , isCustomOrgIDSet := telemetryConfig ["ORGANIZATION_ID" ]
89
+ if isCustomOrgIDSet {
90
+ return customOrganizationID , false
90
91
}
91
92
92
93
if cachedOrganizationID != "" {
93
- return cachedOrganizationID
94
+ return cachedOrganizationID , false
94
95
}
95
96
96
97
fetchedOrganizationID , err := FetchOrganizationID (clusterID , accessToken )
97
- klog .V (4 ).Infoln ("Fetching ORGANIZATION_ID from OCM" )
98
98
if err != nil {
99
99
klog .Errorf ("telemetry config error: %s" , err )
100
100
}
101
- return fetchedOrganizationID
101
+ return fetchedOrganizationID , true
102
102
}
103
103
104
104
// Needed to create our own types for OCM Subscriptions since their types and client are useless
0 commit comments