-
Notifications
You must be signed in to change notification settings - Fork 5
feat: allow scaling telemetry-proxy #153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
53ad796
WIP
25d99e4
WIP - TA works but no metrics [skip ci]
2e91e72
set scraping port
1ce5d89
fix scraper selection
d551537
parameterize scraping interval + TA image
ee669fc
WIP - events scraper
591bbc2
WIP - before namespaces endpoint
8377aba
remote namespace file setup
74ed899
wget cleanup
18304ac
use venv_python_version in CircleCI config
717a60d
Fix watchdog config
4c9c298
fix metrics scraping
99798e5
filter out metrics
d9eadd6
filter out metrics II
f549a94
fix datasource
8512ca0
Merge branch 'main' into RD-15644-scale-telemetry-proxy
harelmo-lumigo 66ee553
Allow overriding TP resources
5d990f0
increase Helm timeout
52eb1e9
fix test log collection
40ed7a2
fix test log collection II
ba28026
fix image settings in tests
27ed748
fix helm upgrade test
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ include "helm.fullname" . }}-target-allocator | ||
namespace: {{ .Release.Namespace }} | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: {{ include "helm.fullname" . }}-target-allocator | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["nodes", "pods", "endpoints", "services"] | ||
verbs: ["get", "list", "watch"] | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: {{ include "helm.fullname" . }}-target-allocator-binding | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ include "helm.fullname" . }}-target-allocator | ||
namespace: {{ .Release.Namespace }} | ||
roleRef: | ||
kind: ClusterRole | ||
name: {{ include "helm.fullname" . }}-target-allocator | ||
apiGroup: rbac.authorization.k8s.io | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ include "helm.fullname" . }}-target-allocator-config | ||
namespace: {{ .Release.Namespace }} | ||
data: | ||
target-allocator-config.yaml: | | ||
allocation_strategy: least-weighted | ||
collector_selector: | ||
strategy: random | ||
config: | ||
global: | ||
scrape_interval: {{ .Values.clusterCollection.metrics.frequency }} | ||
scrape_configs: | ||
- job_name: 'k8s-infra-metrics' | ||
metrics_path: /metrics | ||
scrape_interval: {{ .Values.clusterCollection.metrics.frequency }} | ||
scheme: https | ||
tls_config: | ||
insecure_skip_verify: true | ||
relabel_configs: | ||
- source_labels: [__address__] | ||
regex: (.+) | ||
replacement: ${1}:10250 | ||
target_label: __address__ | ||
kubernetes_sd_configs: | ||
- role: node | ||
authorization: | ||
credentials_file: "/var/run/secrets/kubernetes.io/serviceaccount/token" | ||
- job_name: 'k8s-infra-metrics-cadvisor' | ||
metrics_path: /metrics/cadvisor | ||
scrape_interval: {{ .Values.clusterCollection.metrics.frequency }} | ||
scheme: https | ||
tls_config: | ||
insecure_skip_verify: true | ||
relabel_configs: | ||
- source_labels: [__address__] | ||
regex: (.+) | ||
replacement: ${1}:10250 | ||
target_label: __address__ | ||
kubernetes_sd_configs: | ||
- role: node | ||
authorization: | ||
credentials_file: "/var/run/secrets/kubernetes.io/serviceaccount/token" | ||
- job_name: 'k8s-infra-metrics-resources' | ||
metrics_path: /metrics/resource | ||
scrape_interval: {{ .Values.clusterCollection.metrics.frequency }} | ||
scheme: https | ||
tls_config: | ||
insecure_skip_verify: true | ||
relabel_configs: | ||
- source_labels: [__address__] | ||
regex: (.+) | ||
replacement: ${1}:10250 | ||
target_label: __address__ | ||
kubernetes_sd_configs: | ||
- role: node | ||
authorization: | ||
credentials_file: "/var/run/secrets/kubernetes.io/serviceaccount/token" | ||
- job_name: 'prometheus-node-exporter' | ||
kubernetes_sd_configs: | ||
- role: node | ||
relabel_configs: | ||
- source_labels: [__meta_kubernetes_node_address_InternalIP] | ||
action: replace | ||
target_label: __address__ | ||
# Scrape a custom port | ||
replacement: '$1:{{ .Values.prometheusNodeExporter.service.nodePort }}' | ||
- source_labels: [__meta_kubernetes_node_name] | ||
action: replace | ||
target_label: node | ||
metrics_path: "/metrics" | ||
authorization: | ||
credentials_file: "/var/run/secrets/kubernetes.io/serviceaccount/token" | ||
- job_name: 'kube-state-metrics' | ||
metrics_path: /metrics | ||
scrape_interval: 15s | ||
static_configs: | ||
- targets: ['{{ .Release.Name }}-kube-state-metrics.{{ .Release.Namespace }}.svc.cluster.local:{{ index .Values "kube-state-metrics" "service" "port" }}'] | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "helm.fullname" . }}-target-allocator | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: {{ include "helm.fullname" . }}-target-allocator | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ include "helm.fullname" . }}-target-allocator | ||
spec: | ||
serviceAccountName: {{ include "helm.fullname" . }}-target-allocator | ||
containers: | ||
- name: target-allocator | ||
image: ghcr.io/open-telemetry/opentelemetry-operator/target-allocator:0.124.0 | ||
harelmo-lumigo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
env: | ||
- name: OTELCOL_NAMESPACE | ||
value: "{{ .Release.Namespace }}" | ||
args: | ||
- "--config-file=/conf/target-allocator-config.yaml" | ||
{{- if .Values.debug.enabled }} | ||
- "--zap-log-level=debug" | ||
{{- end }} | ||
ports: | ||
- containerPort: 80 | ||
volumeMounts: | ||
- name: config | ||
mountPath: /conf | ||
volumes: | ||
- name: config | ||
configMap: | ||
name: {{ include "helm.fullname" . }}-target-allocator-config | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "helm.fullname" . }}-target-allocator | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
selector: | ||
app: {{ include "helm.fullname" . }}-target-allocator | ||
ports: | ||
- protocol: TCP | ||
port: 8080 | ||
targetPort: 8080 |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.