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
46 changes: 35 additions & 11 deletions charts/gitops-runtime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,27 @@ argo-gateway:
...
```

- `.Values.global.external-argo-cd` was changed to `.Values.global.integrations.argo-cd`

```yaml
# Before:
global:
external-argo-cd:
server:
svc: argocd-server
port: 80
...

# After:
global:
integrations:
argo-cd:
server:
svc: argocd-server
port: 80
...
```

## Values

| Key | Type | Default | Description |
Expand Down Expand Up @@ -430,14 +451,14 @@ argo-gateway:
| app-proxy.image-enrichment.serviceAccount.name | string | `"codefresh-image-enrichment-sa"` | Name of the service account to create or the name of the existing one to use |
| app-proxy.image.pullPolicy | string | `"IfNotPresent"` | |
| app-proxy.image.repository | string | `"quay.io/codefresh/cap-app-proxy"` | |
| app-proxy.image.tag | string | `"1.3806.0"` | |
| app-proxy.image.tag | string | `"1.3820.0"` | |
| app-proxy.imagePullSecrets | list | `[]` | |
| app-proxy.initContainer.command[0] | string | `"./init.sh"` | |
| app-proxy.initContainer.env | object | `{}` | |
| app-proxy.initContainer.extraVolumeMounts | list | `[]` | Extra volume mounts for init container |
| app-proxy.initContainer.image.pullPolicy | string | `"IfNotPresent"` | |
| app-proxy.initContainer.image.repository | string | `"quay.io/codefresh/cap-app-proxy-init"` | |
| app-proxy.initContainer.image.tag | string | `"1.3806.0"` | |
| app-proxy.initContainer.image.tag | string | `"1.3820.0"` | |
| app-proxy.initContainer.resources.limits | object | `{}` | |
| app-proxy.initContainer.resources.requests.cpu | string | `"0.2"` | |
| app-proxy.initContainer.resources.requests.memory | string | `"256Mi"` | |
Expand Down Expand Up @@ -502,9 +523,13 @@ argo-gateway:
| argo-cd.configs.cm."timeout.reconciliation" | string | `"20s"` | |
| argo-cd.configs.params."application.namespaces" | string | `"cf-*"` | |
| argo-cd.configs.params."server.insecure" | bool | `true` | |
| argo-cd.configs.params."server.rootpath" | string | `""` | |
| argo-cd.crds.install | bool | `true` | |
| argo-cd.enabled | bool | `true` | |
| argo-cd.fullnameOverride | string | `"argo-cd"` | |
| argo-cd.fullnameOverride | string | `"argocd"` | |
| argo-cd.repoServer.name | string | `"repo-server"` | |
| argo-cd.repoServer.service.port | int | `8081` | |
| argo-cd.server.name | string | `"server"` | |
| argo-events.configs.jetstream.versions[0].configReloaderImage | string | `"natsio/nats-server-config-reloader:0.19.1"` | |
| argo-events.configs.jetstream.versions[0].metricsExporterImage | string | `"natsio/prometheus-nats-exporter:0.17.3"` | |
| argo-events.configs.jetstream.versions[0].natsImage | string | `"nats:2.11.4"` | |
Expand Down Expand Up @@ -534,6 +559,7 @@ argo-gateway:
| gitops-operator.affinity | object | `{}` | |
| gitops-operator.config.commitStatusPollingInterval | string | `"10s"` | Commit status polling interval |
| gitops-operator.config.maxConcurrentReleases | int | `100` | Maximum number of concurrent releases being processed by the operator (this will not affect the number of releases being processed by the gitops runtime) |
| gitops-operator.config.maxReconcileRetries | int | `10` | Maximum number of reconcile retries on promotion-related resources before failing a promotion task |
| gitops-operator.config.promotionWrapperTemplate | string | `""` | An optional template for the promotion wrapper (empty default will use the embedded one) |
| gitops-operator.config.taskPollingInterval | string | `"10s"` | Task polling interval |
| gitops-operator.config.workflowMonitorPollingInterval | string | `"10s"` | Workflow monitor polling interval |
Expand All @@ -547,7 +573,7 @@ argo-gateway:
| gitops-operator.fullnameOverride | string | `""` | |
| gitops-operator.image.registry | string | `"quay.io"` | defaults |
| gitops-operator.image.repository | string | `"codefresh/codefresh-gitops-operator"` | |
| gitops-operator.image.tag | string | `"a1316ff"` | |
| gitops-operator.image.tag | string | `"6881890"` | |
| gitops-operator.imagePullSecrets | list | `[]` | |
| gitops-operator.nameOverride | string | `""` | |
| gitops-operator.nodeSelector | object | `{}` | |
Expand Down Expand Up @@ -578,26 +604,24 @@ argo-gateway:
| global.codefresh.userToken.secretKeyRef | object | `{}` | User token that references an existing secret containing the token. |
| global.codefresh.userToken.token | string | `""` | User token in plain text. The chart creates and manages the secret for this token. |
| global.event-reporters | object | `{"affinity":{},"config":{},"image":{"registry":"quay.io","repository":"codefresh/cf-argocd-extras","tag":"695977c"},"livenessProbe":{"failureThreshold":3,"initialDelaySeconds":10,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":10},"nodeSelector":{},"pdb":{"enabled":true,"maxUnavailable":"","minAvailable":"50%"},"readinessProbe":{"failureThreshold":3,"initialDelaySeconds":10,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":10},"replicaCount":2,"resources":{"requests":{"cpu":"100m","memory":"128Mi"}},"service":{"ports":{"http":{"port":8088,"targetPort":8088},"metrics":{"port":8087,"targetPort":8087}},"type":"ClusterIP"},"serviceAccount":{"create":true},"serviceMonitor":{"enabled":false,"interval":"30s","labels":{},"scrapeTimeout":"10s"},"tolerations":[]}` | Global settings for event reporters Event reporters are used for reporting runtime and cluster resources to Codefresh platform |
| global.external-argo-cd | object | `{"repoServer":{"port":8081,"svc":"argocd-repo-server"},"server":{"port":80,"rootpath":"","svc":"argocd-server"}}` | Configuration for external ArgoCD Should be used when `argo-cd.enabled` is set to false |
| global.external-argo-cd.repoServer.port | int | `8081` | Port of the ArgoCD repo server |
| global.external-argo-cd.repoServer.svc | string | `"argocd-repo-server"` | Service name of the ArgoCD repo server |
| global.external-argo-cd.server | object | `{"port":80,"rootpath":"","svc":"argocd-server"}` | ArgoCD server settings |
| global.external-argo-cd.server.port | int | `80` | Port of the ArgoCD server |
| global.external-argo-cd.server.rootpath | string | `""` | Set if Argo CD is running behind reverse proxy under subpath different from / e.g. rootpath: '/argocd' |
| global.external-argo-cd.server.svc | string | `"argocd-server"` | Service name of the ArgoCD server |
| global.external-argo-rollouts | object | `{"rollout-reporter":{"enabled":false}}` | Configuration for external Argo Rollouts |
| global.external-argo-rollouts.rollout-reporter | object | `{"enabled":false}` | Rollout reporter settings |
| global.external-argo-rollouts.rollout-reporter.enabled | bool | `false` | Enable or disable rollout reporter Configuration is defined at .Values.event-reporters.rollout |
| global.httpProxy | string | `""` | global HTTP_PROXY for all components |
| global.httpsProxy | string | `""` | global HTTPS_PROXY for all components |
| global.imageRegistry | string | `""` | |
| global.integrations.argo-cd.repoServer.port | int | `8081` | Port of the ArgoCD repo server |
| global.integrations.argo-cd.repoServer.svc | string | `"argocd-repo-server"` | Service name of the ArgoCD repo server |
| global.integrations.argo-cd.server.auth | object | `{"password":"","passwordSecretKeyRef":{"key":"password","name":"argocd-initial-admin-secret"},"token":"","tokenSecretKeyRef":{},"type":"password","username":"admin"}` | How GitOps Runtime should authenticate with ArgoCD server |
| global.integrations.argo-cd.server.auth.password | string | `""` | ArgoCD password in plain text |
| global.integrations.argo-cd.server.auth.passwordSecretKeyRef | object | `{"key":"password","name":"argocd-initial-admin-secret"}` | ArgoCD password referenced by an existing secret |
| global.integrations.argo-cd.server.auth.token | string | `""` | ArgoCD token in plain text |
| global.integrations.argo-cd.server.auth.tokenSecretKeyRef | object | `{}` | ArgoCD token referenced by an existing secret |
| global.integrations.argo-cd.server.auth.type | string | `"password"` | Authentication type. Can be password or token |
| global.integrations.argo-cd.server.auth.username | string | `"admin"` | ArgoCD username in plain text |
| global.integrations.argo-cd.server.port | int | `80` | Port of the ArgoCD server |
| global.integrations.argo-cd.server.rootpath | string | `""` | Set if Argo CD is running behind reverse proxy under subpath different from / e.g. rootpath: '/argocd' |
| global.integrations.argo-cd.server.svc | string | `"argocd-server"` | Service name of the ArgoCD server |
| global.noProxy | string | `""` | global NO_PROXY for all components |
| global.nodeSelector | object | `{}` | Global nodeSelector for all components |
| global.runtime | object | `{"cluster":"https://kubernetes.default.svc","codefreshHosted":false,"gitCredentials":{"password":{"secretKeyRef":{},"value":null},"username":"username"},"ingress":{"annotations":{},"className":"nginx","enabled":false,"hosts":[],"labels":{},"protocol":"https","skipValidation":false,"tls":[]},"ingressUrl":"","isConfigurationRuntime":false,"name":null}` | Runtime level settings |
Expand Down
21 changes: 21 additions & 0 deletions charts/gitops-runtime/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -399,4 +399,25 @@ argo-gateway:
...
```

- `.Values.global.external-argo-cd` was changed to `.Values.global.integrations.argo-cd`

```yaml
# Before:
global:
external-argo-cd:
server:
svc: argocd-server
port: 80
...

# After:
global:
integrations:
argo-cd:
server:
svc: argocd-server
port: 80
...
```

{{ template "chart.valuesSection" . }}
102 changes: 37 additions & 65 deletions charts/gitops-runtime/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -77,28 +77,18 @@ Create the name of the service account to use
Determine argocd server service name. Must be called with chart root context
*/}}
{{- define "codefresh-gitops-runtime.argocd.server.servicename" -}}
{{/* For now use template from ArgoCD chart until better approach */}}
{{- template "argo-cd.server.fullname" (dict "Values" (get .Values "argo-cd") "Release" .Release ) }}
{{- end }}

{{/*
Determine argocd redis service name. Must be called with chart root context
*/}}
{{- define "codefresh-gitops-runtime.argocd.redis.servicename" -}}
{{/* For now use template from ArgoCD chart until better approach */}}
{{- template "argo-cd.redis.fullname" (dict "Values" (get .Values "argo-cd") "Release" .Release ) }}
{{- printf "%s-%s" (index .Values "argo-cd" "fullnameOverride") (index .Values "argo-cd" "server" "name") }}
{{- end }}

{{/*
Determine argocd repo server service name. Must be called with chart root context
*/}}
{{- define "codefresh-gitops-runtime.argocd.reposerver.servicename" -}}
{{/* For now use template from ArgoCD chart until better approach */}}
{{- if (index .Subcharts "argo-cd") }}
{{- template "argo-cd.repoServer.fullname" (dict "Values" (get .Values "argo-cd") "Release" .Release ) }}
{{- printf "%s-%s" (index .Values "argo-cd" "fullnameOverride") (index .Values "argo-cd" "repoServer" "name") }}
{{- else }}
{{- $repoServer := index .Values "global" "external-argo-cd" "repoServer" }}
{{- $svc := required "ArgoCD is not enabled and .Values.global.external-argo-cd.repoServer.svc is not set" $repoServer.svc }}
{{- $repoServer := index .Values "global" "integrations" "argo-cd" "repoServer" }}
{{- $svc := required ".Values.global.integrations.argo-cd.repoServer.svc is not set" $repoServer.svc }}
{{- printf "%s" $svc }}
{{- end }}
{{- end }}
Expand All @@ -107,12 +97,11 @@ Determine argocd repo server service name. Must be called with chart root contex
Determine argocd argocd repo server port
*/}}
{{- define "codefresh-gitops-runtime.argocd.reposerver.serviceport" -}}
{{/* For now use template from ArgoCD chart until better approach */}}
{{- if (index .Subcharts "argo-cd") }}
{{- index .Values "argo-cd" "repoServer" "service" "port" }}
{{- else }}
{{- $repoServer := index .Values "global" "external-argo-cd" "repoServer" }}
{{- $port := required "ArgoCD is not enabled and .Values.global.external-argo-cd.repoServer.svc is not set" $repoServer.port }}
{{- $repoServer := index .Values "global" "integrations" "argo-cd" "repoServer" }}
{{- $port := required ".Values.global.integrations.argo-cd.repoServer.svc is not set" $repoServer.port }}
{{- printf "%v" $port }}
{{- end }}
{{- end }}
Expand All @@ -122,30 +111,18 @@ Determine argocd argocd repo server port
Determine argocd repoServer url
*/}}
{{- define "codefresh-gitops-runtime.argocd.reposerver.url" -}}
{{- $argoCDValues := (get .Values "argo-cd") }}
{{- if (index .Values "argo-cd" "enabled") }}
{{- $serviceName := include "codefresh-gitops-runtime.argocd.reposerver.servicename" . }}
{{- $port := include "codefresh-gitops-runtime.argocd.reposerver.serviceport" . }}
{{- printf "%s:%s" $serviceName $port }}
{{- else if (index .Values "global" "external-argo-cd" "repoServer") }}
{{- $repoServer := (index .Values "global" "external-argo-cd" "repoServer") }}
{{- $svc := required "ArgoCD is not enabled and .Values.global.external-argo-cd.repoServer.svc is not set" $repoServer.svc }}
{{- $port := required "ArgoCD is not enabled and .Values.global.external-argo-cd.repoServer.port is not set" $repoServer.port }}
{{- printf "%s:%v" $svc $port }}
{{- else }}
{{- fail "ArgoCD is not enabled and .Values.global.external-argo-cd.repoServer is not set" }}
{{- end }}
{{- if (index .Values "argo-cd" "enabled") }}
{{- $serviceName := include "codefresh-gitops-runtime.argocd.reposerver.servicename" . }}
{{- $port := include "codefresh-gitops-runtime.argocd.reposerver.serviceport" . }}
{{- printf "%s:%s" $serviceName $port }}
{{- else }}
{{- $repoServer := (index .Values "global" "integrations" "argo-cd" "repoServer") }}
{{- $svc := required ".Values.global.integrations.argo-cd.repoServer.svc is not set" $repoServer.svc }}
{{- $port := required ".Values.global.integrations.argo-cd.repoServer.port is not set" $repoServer.port }}
{{- printf "%s:%v" $svc $port }}
{{- end }}
{{- end}}


{{/*
Determine argocd servicename. Must be called with chart root context
*/}}
{{- define "codefresh-gitops-runtime.argocd.appcontroller.serviceAccountName" -}}
{{/* For now use template from ArgoCD chart until better approach */}}
{{- template "argo-cd.controllerServiceAccountName" (dict "Values" (get .Values "argo-cd") "Release" .Release ) }}
{{- end }}

{{/*
Determine rollouts name
*/}}
Expand All @@ -158,7 +135,6 @@ Determine rollouts name
{{- end }}
{{- end }}


{{/*
Determine argocd server service port. Must be called with chart root context
*/}}
Expand All @@ -174,7 +150,7 @@ Determine argocd server service port. Must be called with chart root context
{{- end }}
{{- end }}
{{- end }}
{{- print $port }}
{{- printf "%v" $port }}
{{- end}}

{{/*
Expand All @@ -183,7 +159,7 @@ Determine argocd redis service port. Must be called with chart root context
{{- define "codefresh-gitops-runtime.argocd.redis.serviceport" -}}
{{- $argoCDValues := (get .Values "argo-cd") }}
{{- $port := $argoCDValues.redis.servicePort }}
{{- print $port }}
{{- printf "%v" $port }}
{{- end}}

{{/*
Expand All @@ -198,41 +174,37 @@ Determine argocd server url. Must be called with chart root context
{{- end }}
{{- $url := include "codefresh-gitops-runtime.argocd.server.no-protocol-url" . }}
{{- printf "%s://%s" $protocol $url }}
{{- else if (index .Values "global" "external-argo-cd" "server") }}
{{- $argoCDSrv := (index .Values "global" "external-argo-cd" "server") }}
{{- else }}
{{- $argoCDSrv := (index .Values "global" "integrations" "argo-cd" "server") }}
{{- $protocol := "http" }}
{{- $svc := required "ArgoCD is not enabled and .Values.global.external-argo-cd.server.svc is not set" $argoCDSrv.svc }}
{{- $port := (required "ArgoCD is not enabled and .Values.global.external-argo-cd.server.port is not port" $argoCDSrv.port) | toString }}
{{- $rootpath := (index .Values "global" "external-argo-cd" "server" "rootpath") }}
{{- $svc := required ".Values.global.integrations.argo-cd.server.svc is not set" $argoCDSrv.svc }}
{{- $port := (required ".Values.global.integrations.argo-cd.server.port is not set" $argoCDSrv.port) | toString }}
{{- $rootpath := (index .Values "global" "integrations" "argo-cd" "server" "rootpath") }}
{{- if (eq $port "80") }}
{{- printf "%s://%s%s" $protocol $svc $rootpath }}
{{- else }}
{{- printf "%s://%s:%s%s" $protocol $svc $port $rootpath }}
{{- printf "%s://%s:%v%s" $protocol $svc $port $rootpath }}
{{- end }}
{{- else }}
{{- fail "ArgoCD is not enabled and .Values.global.external-argo-cd.server is not set" }}
{{- end }}
{{- end}}

{{/*
Determine argocd server url witout the protocol. Must be called with chart root context
*/}}
{{- define "codefresh-gitops-runtime.argocd.server.no-protocol-url" -}}
{{- $argoCDValues := (get .Values "argo-cd") }}
{{- if (index .Values "argo-cd" "enabled") }}
{{- $serverName := include "codefresh-gitops-runtime.argocd.server.servicename" . }}
{{- $port := include "codefresh-gitops-runtime.argocd.server.serviceport" . }}
{{- $path := (get $argoCDValues.configs.params "server.rootpath") }}
{{- printf "%s:%s%s" $serverName $port $path }}
{{- else if (index .Values "global" "external-argo-cd" "server") }}
{{- $argoCDSrv := (index .Values "global" "external-argo-cd" "server") }}
{{- $svc := required "ArgoCD is not enabled and .Values.global.external-argo-cd.server.svc is not set" $argoCDSrv.svc }}
{{- $port := required "ArgoCD is not enabled and .Values.global.external-argo-cd.server.port is not set" $argoCDSrv.port }}
{{- $rootpath := (index .Values "global" "external-argo-cd" "server" "rootpath") }}
{{- printf "%s:%v%s" $svc $port $rootpath }}
{{- else }}
{{- fail "ArgoCD is not enabled and .Values.global.external-argo-cd.server is not set" }}
{{- end }}
{{- $argoCDValues := (get .Values "argo-cd") }}
{{- if (index .Values "argo-cd" "enabled") }}
{{- $serverName := include "codefresh-gitops-runtime.argocd.server.servicename" . }}
{{- $port := include "codefresh-gitops-runtime.argocd.server.serviceport" . }}
{{- $path := (get $argoCDValues.configs.params "server.rootpath") }}
{{- printf "%s:%s%s" $serverName $port $path }}
{{- else }}
{{- $argoCDSrv := (index .Values "global" "integrations" "argo-cd" "server") }}
{{- $svc := required ".Values.global.integrations.argo-cd.server.svc is not set" $argoCDSrv.svc }}
{{- $port := required ".Values.global.integrations.argo-cd.server.port is not set" $argoCDSrv.port }}
{{- $rootpath := (index .Values "global" "integrations" "argo-cd" "server" "rootpath") }}
{{- printf "%s:%v%s" $svc $port $rootpath }}
{{- end }}
{{- end}}

{{- define "codefresh-gitops-runtime.argocd-auth" -}}
Expand Down
2 changes: 1 addition & 1 deletion charts/gitops-runtime/templates/argo-gateway/_env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ARGO_CD_TOKEN_SECRET_KEY: "token"
{{- end }}
{{- end }}

ARGOCD_SERVER_ROOTPATH: {{ dig "server" "rootpath" "/" (index .Values "global" "external-argo-cd") | quote }}
ARGOCD_SERVER_ROOTPATH: {{ dig "server" "rootpath" "/" (index .Values "global" "integrations" "argo-cd") | quote }}

{{- if or .Values.global.codefresh.tls.caCerts.secret.create (and .Values.global.codefresh.tls.caCerts.secretKeyRef.key .Values.global.codefresh.tls.caCerts.secretKeyRef.name) }}
{{- $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 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ARGO_CD_TOKEN_SECRET_KEY: "token"
{{- end }}
{{- end }}

ARGOCD_SERVER_ROOTPATH: {{ dig "server" "rootpath" "/" (index .Values "global" "external-argo-cd") | quote }}
ARGOCD_SERVER_ROOTPATH: {{ dig "server" "rootpath" "/" (index .Values "global" "integrations" "argo-cd") | quote }}

{{- if or .Values.global.codefresh.tls.caCerts.secret.create (and .Values.global.codefresh.tls.caCerts.secretKeyRef.key .Values.global.codefresh.tls.caCerts.secretKeyRef.name) }}
{{- $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 }}
Expand Down
Loading