Skip to content

Commit 1ffa197

Browse files
refactor cf-argocd-extras
1 parent 2d5f040 commit 1ffa197

File tree

24 files changed

+106
-189
lines changed

24 files changed

+106
-189
lines changed

charts/gitops-runtime/templates/argo-api-gateway/_env.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,26 @@
22
HTTP_PROXY: {{ .Values.global.httpProxy | squote}}
33
HTTPS_PROXY: {{ .Values.global.httpsProxy | squote }}
44
NO_PROXY: {{ .Values.global.noProxy | squote }}
5+
6+
{{- if and (eq (index .Values "global" "external-argo-cd" "auth" "type") "token") }}
7+
{{- if not (index .Values "global" "external-argo-cd" "auth" "token") }}
8+
ARGO_CD_TOKEN_SECRET_NAME: {{ required ".Values.global.external-argo-cd.auth.type is set to 'token' therefore Values.global.external-argo-cd.auth.tokenSecretKeyRef.name is required" (index .Values "global" "external-argo-cd" "auth" "tokenSecretKeyRef" "name") }}
9+
ARGO_CD_TOKEN_SECRET_KEY: {{ required ".Values.global.external-argo-cd.auth.type is set to 'token' therefore Values.global.external-argo-cd.auth.tokenSecretKeyRef.key is required" (index .Values "global" "external-argo-cd" "auth" "tokenSecretKeyRef" "key" ) }}
10+
{{- else }}
11+
ARGO_CD_TOKEN_SECRET_NAME: "gitops-runtime-argo-cd-token"
12+
ARGO_CD_TOKEN_SECRET_KEY: "token"
13+
{{- end }}
14+
{{- end }}
15+
16+
{{- if and (index .Values "global" "external-argo-cd" "server" "rootpath") }}
17+
ARGOCD_SERVER_ROOTPATH: {{ index .Values "global" "external-argo-cd" "server" "rootpath" }}
18+
{{- end }}
19+
20+
{{- if or .Values.global.codefresh.tls.caCerts.secret.create (and .Values.global.codefresh.tls.caCerts.secretKeyRef.key .Values.global.codefresh.tls.caCerts.secretKeyRef.name) }}
21+
{{- $secretKey := .Values.global.codefresh.tls.caCerts.secret.create | ternary (default "ca-bundle.crt" .Values.global.codefresh.tls.caCerts.secret.key) .Values.global.codefresh.tls.caCerts.secretKeyRef.key }}
22+
CODEFRESH_SSL_CERT_PATH: {{ printf "/app/config/codefresh-tls-certs/%s" $secretKey }}
23+
{{- end }}
24+
525
{{- end }}
626

727
{{- define "argo-api-gateway.resources.environment-variables.defaults" -}}

charts/gitops-runtime/templates/argo-api-gateway/configmap.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{- define "argo-api-gateway.resources.configmap.defaults"}}
2-
argocd.server: argo-cd-server:80
3-
repo.server: argo-cd-repo-server:8081
2+
argocd.server: {{ include "codefresh-gitops-runtime.argocd.server.no-protocol-url" . }}
3+
repo.server: {{ include "codefresh-gitops-runtime.argocd.reposerver.url" . }}
44
{{- end }}
55

66
{{- $defaultConfig := (include "argo-api-gateway.resources.configmap.defaults" . | fromYaml ) }}

charts/gitops-runtime/templates/cf-argocd-extras/event-reporter/configmap.yaml

Lines changed: 0 additions & 1 deletion
This file was deleted.

charts/gitops-runtime/templates/cf-argocd-extras/event-reporter/pdb.yaml

Lines changed: 0 additions & 1 deletion
This file was deleted.

charts/gitops-runtime/templates/cf-argocd-extras/event-reporter/rbac.yaml

Lines changed: 0 additions & 1 deletion
This file was deleted.

charts/gitops-runtime/templates/cf-argocd-extras/event-reporter/service.yaml

Lines changed: 0 additions & 1 deletion
This file was deleted.

charts/gitops-runtime/templates/cf-argocd-extras/event-reporter/serviceMonitor.yaml

Lines changed: 0 additions & 1 deletion
This file was deleted.

charts/gitops-runtime/templates/cf-argocd-extras/event-reporter/statefulset.yaml

Lines changed: 0 additions & 1 deletion
This file was deleted.

charts/gitops-runtime/templates/cf-argocd-extras/sources-server/configmap.yaml

Lines changed: 0 additions & 1 deletion
This file was deleted.

charts/gitops-runtime/templates/cf-argocd-extras/sources-server/deployment.yaml

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)