Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{{- define "cap-app-proxy.environment-variables.defaults" -}}
{{- $accountId := .Values.global.codefresh.accountId -}}
{{- $chartVersion := .Chart.Version -}}
{{- $runtimeVersion := .Chart.AppVersion -}}
{{- $runtimeName := .Values.global.runtime.name -}}
{{- $appProxyName := "cf-gitops-app-proxy" -}}
{{- $appProxyVersion := .Values.image.tag | default "latest" -}}
ARGO_CD_URL:
valueFrom:
configMapKeyRef:
Expand Down Expand Up @@ -221,6 +227,10 @@ CACHE_PASSWORD:
secretKeyRef:
name: gitops-runtime-redis
key: auth
CF_SERVICE_NAME: {{ $appProxyName }}
CF_SERVICE_VERSION: {{ $appProxyVersion }}
OTEL_SERVICE_NAME: {{ $appProxyName }}
OTEL_RESOURCE_ATTRIBUTES: {{ printf "service.name=%s,service.version=%s,service.namespace=%s,cf.account.id=%s,cf.gitops.runtime.name=%s,cf.gitops.runtime.version=%s,cf.gitops.runtime.chart.version=%s" $appProxyName $appProxyVersion "cf-gitops-runtime" $accountId $runtimeName $runtimeVersion $chartVersion }}
{{ include "codefresh-gitops-runtime.get-proxy-env-vars" . }}
{{- end -}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ WORKFLOW_MONITOR_POLLING_INTERVAL: {{ .Values.config.workflowMonitorPollingInter
{{- end }}

{{- define "gitops-operator.resources.environment-variables.defaults" -}}
{{- $accountId := .Values.global.codefresh.accountId -}}
{{- $chartVersion := .Chart.Version -}}
{{- $runtimeVersion := .Chart.AppVersion -}}
{{- $runtimeName := .Values.global.runtime.name -}}
{{- $gitopsOperatorVersion := .Values.image.tag | default "latest" -}}
{{- $gitopsOperatorName := "cf-gitops-gitops-operator" -}}
AP_URL: http://cap-app-proxy:3017
ARGO_CD_URL: argo-cd-server:80
ARGO_WF_URL: http://argo-server:2746
Expand All @@ -45,4 +51,8 @@ RUNTIME_VERSION:
configMapKeyRef:
name: codefresh-cm
key: version
CF_SERVICE_NAME: {{ $gitopsOperatorName }}
CF_SERVICE_VERSION: {{ $gitopsOperatorVersion }}
OTEL_SERVICE_NAME: {{ $gitopsOperatorName }}
OTEL_RESOURCE_ATTRIBUTES: {{ printf "service.name=%s,service.version=%s,service.namespace=%s,cf.account.id=%s,cf.gitops.runtime.name=%s,cf.gitops.runtime.version=%s,cf.gitops.runtime.chart.version=%s" $gitopsOperatorName $gitopsOperatorVersion "cf-gitops-runtime" $accountId $runtimeName $runtimeVersion $chartVersion }}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ CODEFRESH_SSL_CERT_PATH: {{ printf "/app/config/codefresh-tls-certs/%s" $secretK
{{- end }}

{{- define "cluster-event-reporter.resources.environment-variables.defaults" -}}
{{- $accountId := .Values.global.codefresh.accountId -}}
{{- $chartVersion := .Chart.Version -}}
{{- $runtimeVersion := .Chart.AppVersion -}}
{{- $runtimeName := .Values.global.runtime.name -}}
{{- $eventReporterVersion := .Values.image.tag | default "latest" -}}
{{- $eventReporterName := "cf-gitops-cluster-event-reporter" -}}
REPORTER_MODE: resource
APP_QUEUE_SIZE:
valueFrom:
Expand Down Expand Up @@ -186,4 +192,8 @@ RESOURCE_THREADINESS:
name: cluster-event-reporter-cmd-params-cm
key: resource.threadiness
SERVICE_NAME: {{ include "cluster-event-reporter.fullname" . }}
CF_SERVICE_NAME: {{ $eventReporterName }}
CF_SERVICE_VERSION: {{ $eventReporterVersion }}
OTEL_SERVICE_NAME: {{ $eventReporterName }}
OTEL_RESOURCE_ATTRIBUTES: {{ printf "service.name=%s,service.version=%s,service.namespace=%s,cf.account.id=%s,cf.gitops.runtime.name=%s,cf.gitops.runtime.version=%s,cf.gitops.runtime.chart.version=%s" $eventReporterName $eventReporterVersion "cf-gitops-runtime" $accountId $runtimeName $runtimeVersion $chartVersion }}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ CODEFRESH_SSL_CERT_PATH: {{ printf "/app/config/codefresh-tls-certs/%s" $secretK
{{- end }}

{{- define "runtime-event-reporter.resources.environment-variables.defaults" -}}
{{- $accountId := .Values.global.codefresh.accountId -}}
{{- $chartVersion := .Chart.Version -}}
{{- $runtimeVersion := .Chart.AppVersion -}}
{{- $runtimeName := .Values.global.runtime.name -}}
{{- $eventReporterVersion := .Values.image.tag | default "latest" -}}
{{- $eventReporterName := "cf-gitops-runtime-event-reporter" -}}
REPORTER_MODE: app
APP_QUEUE_SIZE:
valueFrom:
Expand Down Expand Up @@ -186,4 +192,8 @@ RESOURCE_THREADINESS:
name: runtime-event-reporter-cmd-params-cm
key: resource.threadiness
SERVICE_NAME: {{ include "runtime-event-reporter.fullname" . }}
CF_SERVICE_NAME: {{ $eventReporterName }}
CF_SERVICE_VERSION: {{ $eventReporterVersion }}
OTEL_SERVICE_NAME: {{ $eventReporterName }}
OTEL_RESOURCE_ATTRIBUTES: {{ printf "service.name=%s,service.version=%s,service.namespace=%s,cf.account.id=%s,cf.gitops.runtime.name=%s,cf.gitops.runtime.version=%s,cf.gitops.runtime.chart.version=%s" $eventReporterName $eventReporterVersion "cf-gitops-runtime" $accountId $runtimeName $runtimeVersion $chartVersion }}
{{- end -}}
76 changes: 73 additions & 3 deletions charts/gitops-runtime/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,45 @@ global:
scrapeTimeout: 10s
labels: {}
config: {}

anchors:
common-envs:
# -- Telemetry configuration
- &otel-config
# -- Base endpoint URL for all OpenTelemetry signals.
# Ref: https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/
OTEL_EXPORTER_OTLP_ENDPOINT: 'http://localhost:4317'
# -- Specifies the OTLP transport protocol to be used for all telemetry data.
# Ref: https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/
OTEL_EXPORTER_OTLP_PROTOCOL: 'grpc'
# -- Specifies the compression algorithm to be used for all telemetry data.
# Ref: https://opentelemetry.io/docs/specs/otel/protocol/exporter/
OTEL_EXPORTER_OTLP_COMPRESSION: 'gzip'
# -- OTel Logs exporter to be used.
# Ref: https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/
OTEL_LOGS_EXPORTER: 'none'
# -- OTel traces exporter to be used.
# Ref: https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/
OTEL_TRACES_EXPORTER: 'none'
# -- OTel sampler to be used for traces.
# Ref: https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/
OTEL_TRACES_SAMPLER: 'parentbased_always_on'
# -- OTel metrics exporter to be used. Set to "prometheus" to export metrics in Prometheus format. If set to "prometheus", it's recommended to set METRICS_SCRAPE_TIMEOUT_MS=4×scrape_interval.
# Ref: https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/
OTEL_METRICS_EXPORTER: 'none'
# -- The time interval (in milliseconds) between the start of two export attempts for push metric exporters, such as "otlp".
# Ref: https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/
OTEL_METRIC_EXPORT_INTERVAL: '10000'
# -- Maximum allowed time (in milliseconds) to export data for push metric exporters, such as "otlp".
# Ref: https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/
OTEL_METRIC_EXPORT_TIMEOUT: '5000'
# -- Host used by the Prometheus OTel metrics exporter if OTEL_METRICS_EXPORTER=prometheus
OTEL_EXPORTER_PROMETHEUS_HOST: '0.0.0.0'
# -- Port used by the Prometheus OTel metrics exporter if OTEL_METRICS_EXPORTER=prometheus
OTEL_EXPORTER_PROMETHEUS_PORT: '9464'
# -- Emit the stable HTTP and networking OTel conventions if CF_TELEMETRY_OTEL_ALLOW_HTTP_INSTRUMENTATION=true.
OTEL_SEMCONV_STABILITY_OPT_IN: 'http'

# -------------------------------------------------------------------------------------------------------------------------
# Installer
# -------------------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -540,7 +579,30 @@ app-proxy:
clusterChunkSize: 50
# -- Cors settings for app-proxy. This is the list of allowed domains for platform (comma separated).
cors: "https://g.codefresh.io"
env: {}
env:
<<:
- *otel-config
# -- Level of logging for app-proxy
CF_TELEMETRY_LOGS_LEVEL: 'info'
# -- Level for logging HTTP requests
CF_TELEMETRY_LOGS_LEVEL_HTTP: 'debug'
# -- Enable OpenTelemetry signals (logs, metrics, traces)
CF_TELEMETRY_OTEL_ENABLE: 'false'
# -- Enable OTel HTTP instrumentation.
# Make sure to sanitize `url.full` and `url.query` span attributes on collector before enabling this flag, as it may contain sensitive information.
CF_TELEMETRY_OTEL_ALLOW_HTTP_INSTRUMENTATION: 'false'
# -- Enable Prometheus server
CF_TELEMETRY_PROMETHEUS_ENABLE: 'false'
# -- Enable collecting process metrics
CF_TELEMETRY_PROMETHEUS_ENABLE_PROCESS_METRICS: 'false'
# -- Host for Prometheus metrics server
CF_TELEMETRY_PROMETHEUS_HOST: '0.0.0.0'
# -- Port for Prometheus metrics server
CF_TELEMETRY_PROMETHEUS_PORT: '9100'
# -- Enable Pyroscope profiling. If enabled, the Pyroscope server address must be set in PYROSCOPE_SERVER_ADDRESS.
CF_TELEMETRY_PYROSCOPE_ENABLE: 'false'
# -- Pyroscope server address
PYROSCOPE_SERVER_ADDRESS: ''
serviceAccount:
create: true
annotations: {}
Expand Down Expand Up @@ -638,6 +700,8 @@ gitops-operator:
repository: codefresh/codefresh-gitops-operator
tag: "2784cd5"
env:
<<:
- *otel-config
GITOPS_OPERATOR_VERSION: 0.11.1
serviceAccount:
create: true
Expand Down Expand Up @@ -803,8 +867,14 @@ redis:
name: ""
annotations: {}
event-reporters:
cluster-event-reporter: {}
runtime-event-reporter: {}
cluster-event-reporter:
env:
<<:
- *otel-config
runtime-event-reporter:
env:
<<:
- *otel-config
# -- Redis-HA subchart replaces custom redis deployment when `redis-ha.enabled=true`
# Ref: https://github.com/DandyDeveloper/charts/blob/master/charts/redis-ha/values.yaml
redis-ha:
Expand Down