Skip to content

Commit

Permalink
Deploy o11y stack with 2 otpe instances
Browse files Browse the repository at this point in the history
  • Loading branch information
gheorghestrimtu committed Nov 11, 2021
1 parent 7919429 commit 1c2a974
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 12 deletions.
5 changes: 5 additions & 0 deletions environment/charts/kafka/overrideValues.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,8 @@ provisioning:
requests:
cpu: 0.3
memory: 256Mi
topics:
- name: ocr-telemetry-v0
partitions: 2
- name: ocr-telemetry-v0-json
partitions: 2
25 changes: 23 additions & 2 deletions environment/environment_templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -506,10 +506,26 @@ func NewChainlinkClusterForObservabilityTesting(nodeCount int) K8sEnvSpecInit {
manifests: []K8sEnvResource{NewKafkaHelmChart()},
}

schemaRegistryDependencyGroup := &K8sManifestGroup{
id: "SchemaRegistryGroup",
manifests: []K8sEnvResource{NewSchemaRegistryManifest()},
}

kafkaRestDependencyGroup := &K8sManifestGroup{
id: "KafkaRestGroup",
manifests: []K8sEnvResource{NewKafkaRestManifest()},
}

dependencyGroup := getBasicDependencyGroup()
addPostgresDbsToDependencyGroup(dependencyGroup, nodeCount)
dependencyGroup.manifests = append(dependencyGroup.manifests, NewExplorerManifest(nodeCount))
dependencyGroups := []*K8sManifestGroup{mockserverDependencyGroup, kafkaDependecyGroup, dependencyGroup}
dependencyGroups := []*K8sManifestGroup{
mockserverDependencyGroup,
kafkaDependecyGroup,
schemaRegistryDependencyGroup,
kafkaRestDependencyGroup,
dependencyGroup,
}

return addNetworkManifestToDependencyGroup(chainlinkGroup, dependencyGroups)
}
Expand Down Expand Up @@ -740,7 +756,12 @@ func OtpeGroup() K8sEnvSpecInit {
var specs K8sEnvSpecs
otpeDependencyGroup := &K8sManifestGroup{
id: "OTPEDependencyGroup",
manifests: []K8sEnvResource{NewOTPEManifest()},
manifests: []K8sEnvResource{},
}
for i := 0; i < 2; i++ {
otpeManifest := NewOTPEManifest()
otpeManifest.id = fmt.Sprintf("%s_%d", otpeManifest.id, i+1)
otpeDependencyGroup.manifests = append(otpeDependencyGroup.manifests, otpeManifest)
}
specs = append(specs, otpeDependencyGroup)
return specs
Expand Down
12 changes: 4 additions & 8 deletions environment/templates/otpe-deployment.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
metadata:
name: otpe
generateName: otpe-
spec:
replicas: 1
selector:
matchLabels:
app: otpe
template:
objectmeta:
labels:
app: otpe
metadata:
annotations:
prometheus.io/scrape: 'true'
spec:
containers:
- name: otpe
Expand Down
2 changes: 1 addition & 1 deletion environment/templates/otpe-service.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
metadata:
name: otpe
generateName: otpe-
spec:
ports:
- name: "metrics"
Expand Down
2 changes: 1 addition & 1 deletion environment/templates/prometheus/prometheus-config-map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ data:
- targets: ['localhost:9090']
- job_name: 'otpe'
static_configs:
- targets: ['{{ .Values.OTPEDependencyGroup.otpe.clusterURL }}']
- targets: ['{{ .Values.OTPEDependencyGroup.otpe_1.clusterURL }}','{{ .Values.OTPEDependencyGroup.otpe_2.clusterURL }}']
ocr.rules.yml: |
{{ .Values.PrometheusDependencyGroup.prometheus.ocrRulesYml }}

0 comments on commit 1c2a974

Please sign in to comment.