Skip to content

Commit c13fe5d

Browse files
masayagclaude
andcommitted
Add non-Clowder configuration support for on-prem deployments
- Add MinIO/S3 storage defaults (MinioEndpoint, MinioAccessKey, MinioSecretKey) to non-Clowder config path, enabling environment variable configuration via INGRESS_MINIO* variables - Disable AWS CloudWatch defaults for on-prem (empty LogGroup, AwsRegion, AwsAccessKeyId, AwsSecretAccessKey) - Fix local-dev-start.yml for compatibility with newer versions: - Pin Kafka/Zookeeper images to 7.5.0 (last Zookeeper-compatible) - Update MinIO client commands (mc alias/anonymous vs deprecated config/policy) - Add restart:always to Kafka for startup reliability - Add .vscode to .gitignore Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Moti Asayag <masayag@redhat.com> Signed-off-by: Moti Asayag <masayag@redhat.com>
1 parent 9661ab6 commit c13fe5d

4 files changed

Lines changed: 20 additions & 7 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.DS_Store
22
insights-ingress-go
33
.idea
4+
.vscode
45
coverage.txt
56
.scannerwork
67
.sonar/sonar-scanner.properties

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,14 @@ cloud.redhat.com, the customer should engage with support.
119119

120120
Golang >= 1.21
121121

122+
**macOS additional dependencies (for running with `-tags dynamic`):**
123+
124+
```bash
125+
brew install pkg-config librdkafka
126+
```
127+
128+
These are required for building with the `dynamic` tag, which links against the system librdkafka library for Kafka support.
129+
122130
#### Launching the Service
123131

124132
Compile the source code into a go binary:

development/local-dev-start.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ services:
1010
- ZOOKEEPER_SERVER_ID=1
1111
kafka:
1212
image: confluentinc/cp-kafka
13+
restart: always
1314
ports:
1415
- "29092:29092"
1516
depends_on:
@@ -54,7 +55,7 @@ services:
5455
/bin/sh -c "
5556
export MC_HOST_myminio=http://${MINIO_ACCESS_KEY}:${MINIO_SECRET_KEY}@minio:9000;
5657
/usr/bin/mc mb --ignore-existing myminio/insights-upload-perma;
57-
/usr/bin/mc policy set public myminio/insights-upload-perma;
58+
/usr/bin/mc anonymous set public myminio/insights-upload-perma;
5859
"
5960
ingress:
6061
#image: quay.io/cloudservices/insights-ingress:latest

internal/config/config.go

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,15 +203,18 @@ func Get() *IngressConfig {
203203
// Ports
204204
options.SetDefault("WebPort", 3000)
205205
options.SetDefault("MetricsPort", 8080)
206-
// Storage
206+
// Storage (MinIO/S3-compatible)
207207
options.SetDefault("StageBucket", "available")
208+
options.SetDefault("MinioEndpoint", "")
209+
options.SetDefault("MinioAccessKey", "")
210+
options.SetDefault("MinioSecretKey", "")
208211
options.SetDefault("StorageRegion", "")
209-
// Cloudwatch
210-
options.SetDefault("LogGroup", "platform-dev")
211-
options.SetDefault("AwsRegion", "us-east-1")
212212
options.SetDefault("UseSSL", false)
213-
options.SetDefault("AwsAccessKeyId", os.Getenv("CW_AWS_ACCESS_KEY_ID"))
214-
options.SetDefault("AwsSecretAccessKey", os.Getenv("CW_AWS_SECRET_ACCESS_KEY"))
213+
// Cloudwatch (disabled by default for on-prem)
214+
options.SetDefault("LogGroup", "")
215+
options.SetDefault("AwsRegion", "")
216+
options.SetDefault("AwsAccessKeyId", "")
217+
options.SetDefault("AwsSecretAccessKey", "")
215218
}
216219

217220
IngressCfg := &IngressConfig{

0 commit comments

Comments
 (0)