-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy path_env.yaml
More file actions
59 lines (58 loc) · 2.6 KB
/
_env.yaml
File metadata and controls
59 lines (58 loc) · 2.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{{/*
Some environment variables are determined by values provided in other components,
to keep the separation of components as pseudo library charts, they are defined here to be merged when components are generated.
*/}}
{{- define "gitops-operator.resources.environment-variables.calculated" }}
{{- include "codefresh-gitops-runtime.argocd-token-auth" . }}
{{/* if custom certificates are provided */}}
{{- if .Values.global.codefresh.tls.caCerts.secretKeyRef }}
CF_CA_CERT: {{ printf "/app/config/codefresh-tls/%s" .Values.global.codefresh.tls.caCerts.secretKeyRef.key }}
{{- end }}
CF_URL: {{ .Values.global.codefresh.url }}
COMMIT_STATUS_POLLING_INTERVAL: {{ .Values.config.commitStatusPollingInterval }}
GITOPS_OPERATOR_VERSION: {{ .Values.image.tag }}
{{- if (gt (int .Values.replicaCount) 1 ) }}
LEADER_ELECT: true
{{- else }}
LEADER_ELECT: false
{{- end }}
MAX_CONCURRENT_RELEASES: {{ .Values.config.maxConcurrentReleases }}
MAX_RECONCILE_RETRIES: {{ .Values.config.maxReconcileRetries }}
PROMOTION_WRAPPER_TEMPLATE: {{ .Values.config.promotionWrapperTemplate | quote }}
RUNTIME: {{ .Values.global.runtime.name }}
TASK_POLLING_INTERVAL: {{ .Values.config.taskPollingInterval }}
WORKFLOW_MONITOR_POLLING_INTERVAL: {{ .Values.config.workflowMonitorPollingInterval }}
IS_NAMESPACED_RUNTIME: {{ .Values.global.runtime.singleNamespace }}
{{- 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 := "gitops-operator" -}}
AP_URL: http://cap-app-proxy:3017
ARGO_CD_URL: argo-cd-server:80
ARGO_WF_URL: http://argo-server:2746
CF_TOKEN:
valueFrom:
secretKeyRef:
name: codefresh-token
key: token
HEALTH_PROBE_BIND_ADDRESS: :8081
METRICS_BIND_ADDRESS: :8080
METRICS_SECURE: false
NAMESPACE:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
RUNTIME_VERSION:
valueFrom:
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 -}}