Remove sources-api-go Dependency for On-Prem Deployments#46
Closed
ELK4N4 wants to merge 7 commits intoinsights-onprem:mainfrom
Closed
Remove sources-api-go Dependency for On-Prem Deployments#46ELK4N4 wants to merge 7 commits intoinsights-onprem:mainfrom
ELK4N4 wants to merge 7 commits intoinsights-onprem:mainfrom
Conversation
masayag
reviewed
Jan 7, 2026
masayag
reviewed
Jan 13, 2026
masayag
reviewed
Jan 13, 2026
masayag
approved these changes
Jan 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR removes the dependency on
sources-api-gofor on-prem deployments by eliminating the application type lookup and configuring the housekeeper to work directly with Koku's Kafka events.Motivation
As part of the migration to make Koku the single source of truth for sources:
ros-ocp-backendpreviously made a REST call tosources-api-goat startup to get the cost-management application type IDChanges
Modified Files
internal/config/config.goONPREMconfiguration flaginternal/services/housekeeper/sourcesCleaner.goKey Changes
1. New ONPREM Configuration Flag
Added
ONPREMenvironment variable to the config:2. Simplified Sources Cleaner
When
ONPREM=true:sources-api-goto fetch application type ID0) for cost-managementApplication_type_id == 0Application Type ID
For on-prem deployments, the application type ID is hardcoded to
0(constantOnPremCostAppID). This is consistent with Koku, which publishes Kafka events withApplication_type_id: 0. The housekeeper still filters events by application type ID, but uses the hardcoded value0instead of fetching it from sources-api-go.Before (cloud mode):
After (on-prem mode):
Configuration
Set the following environment variable to enable on-prem mode:
Testing
Related PRs