Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
4d36ae1
add parsing of the new single namespace var to cm and env var
philipkotliyakov Aug 25, 2025
6ba02be
fixed parsing
philipkotliyakov Aug 25, 2025
f9298b4
minor parsing fix
philipkotliyakov Aug 25, 2025
8f6ee5a
fixed conditional including of role and role binding
philipkotliyakov Aug 25, 2025
42316ee
added app-proxy context
philipkotliyakov Aug 25, 2025
15cf3b9
fixed something
philipkotliyakov Aug 25, 2025
cc4e909
added argocd-manager service account
philipkotliyakov Aug 25, 2025
2992e7b
feat: multi runtime install
mikhail-klimko Jul 25, 2025
986923e
feat: multi runtime install
mikhail-klimko Jul 25, 2025
c60fadb
feat: multi runtime install
mikhail-klimko Jul 25, 2025
c783538
feat: multi runtime install
mikhail-klimko Jul 30, 2025
8664b57
wip: Wed Jul 30 11:40:41 +03 2025
mikhail-klimko Jul 30, 2025
e111ee5
wip: Wed Jul 30 12:19:46 +03 2025
mikhail-klimko Jul 30, 2025
a3c393f
feat: multi runtime install
shirtabachii Aug 20, 2025
d08a15c
wip
shirtabachii Aug 25, 2025
fa97244
wip
shirtabachii Aug 25, 2025
19a6185
wip
shirtabachii Aug 25, 2025
65b4522
wip
shirtabachii Aug 25, 2025
7328bd8
added argocd-manager SA secret
ATGardner Aug 26, 2025
e72b9bf
removed duplicated include
philipkotliyakov Aug 26, 2025
438b753
wip
shirtabachii Aug 27, 2025
ca43133
wip
shirtabachii Aug 27, 2025
bc57f87
wip
shirtabachii Aug 27, 2025
f6acfe3
wip
shirtabachii Aug 28, 2025
eac9c86
wip
shirtabachii Aug 28, 2025
acf9207
wip
shirtabachii Aug 28, 2025
12bb974
wip
shirtabachii Aug 28, 2025
420bcfc
naming
philipkotliyakov Sep 4, 2025
fd88e26
CI Automatic commit - align Chart version
Sep 4, 2025
511f7e8
removed old value
philipkotliyakov Sep 4, 2025
4c4027d
update to dev images of app-proxy and gitops-operator
ATGardner Sep 4, 2025
786f213
fix: rename RUNTIME_SINGLE_NAMESPACE to IS_NAMESPACED_RUNTIME, update…
ATGardner Sep 4, 2025
9bfb812
update gitops-operator tag to released version
ATGardner Sep 4, 2025
d888cb7
CI Automatic commit - align Chart version
Sep 4, 2025
6f53cf1
updated version
philipkotliyakov Sep 4, 2025
539e4f9
feat(conponent-tests): add release branches to pipeline trigger (#684)
ilia-medvedev-codefresh Aug 26, 2025
0dba813
fixed cherry-pick merge mistake
ATGardner Sep 4, 2025
7fe6794
added missing field in platform-mocks `me` query
ATGardner Sep 7, 2025
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
8 changes: 6 additions & 2 deletions .github/workflows/component-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@ on:
push:
branches:
- main
- 'stable/*'
- 'monthly/*'
paths-ignore:
- "*.md"
- charts/**
pull_request:
branches:
- main
- 'stable/*'
- 'monthly/*'
paths-ignore:
- "*.md"
- charts/**
Expand Down Expand Up @@ -68,7 +72,7 @@ jobs:
helm repo add gitea-charts https://dl.gitea.com/charts/
helm repo add mockserver https://www.mock-server.com


- name: Run KUTTL tests
run: |
cd tests/component-tests && ./../../bin/kuttl test --parallel 1 --start-kind=false --namespace e2e-test --config startup.yaml
cd tests/component-tests && ./../../bin/kuttl test --parallel 1 --start-kind=false --namespace e2e-test --config startup.yaml
3 changes: 2 additions & 1 deletion charts/gitops-runtime/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: 0.1.75
description: A Helm chart for Codefresh gitops runtime
name: gitops-runtime
version: '0.23.3'
version: '0.24.0'
home: https://github.com/codefresh-io/gitops-runtime-helm
icon: https://avatars1.githubusercontent.com/u/11412079?v=3
keywords:
Expand Down Expand Up @@ -37,6 +37,7 @@ dependencies:
- name: sealed-secrets
repository: https://bitnami-labs.github.io/sealed-secrets/
version: 2.17.2
condition: sealed-secrets.enabled
- name: codefresh-tunnel-client
repository: oci://quay.io/codefresh/charts
version: 0.1.21
Expand Down
70 changes: 66 additions & 4 deletions charts/gitops-runtime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,68 @@ See [Use OCI-based registries](https://helm.sh/docs/topics/registries/)
## Codefresh official documentation:
Prior to running the installation please see the official documentation at: https://codefresh.io/docs/docs/installation/gitops/hybrid-gitops-helm-installation/

## Multi Runtime Installation
You can install multiple Codefresh GitOps Runtimes in the same cluster, as long as each Runtime is deployed in its own namespace and manages only the applications in that namespace.
To achieve this, configure your Runtimes to run in namespaced mode by setting `global.runtime.singleNamespace=true`. See the values.yaml example below:
```yaml
global:
runtime:
singleNamespace: true
sealed-secrets:
enabled: false
argo-cd:
createClusterRoles: false
crds:
install: false
configs:
params:
application.namespaces: ''
argo-events:
controller:
rbac:
namespaced: true
argo-workflows:
crds:
install: false
singleNamespace: true
createAggregateRoles: false
controller:
clusterWorkflowTemplates:
enabled: false
server:
clusterWorkflowTemplates:
enabled: false
argo-rollouts:
enabled: false
tunnel-client:
enabled: false
gitops-operator:
crds:
install: false
```

Note that for the first runtime in the cluster, you have to configure it to install the CRDs, with setting these values:
```yaml
global:
runtime:
isConfigurationRuntime: true
argo-cd:
crds:
install: true
argo-workflows:
crds:
install: true
argo-rollouts:
installCRDs: true
gitops-operator:
crds:
install: true
```

> [!WARNING]
> If you want more than one runtime in your cluster, make sure that all of the runtimes in your cluster are configured with `global.runtime.singleNamespace=true`.
> If you already have a runtime installed in the cluster without this setting, multi runtime installation is not supported.

## Argo-workflows artifact and log storage
Codefresh provides a SaaS object storage based solution for Argo workflows logs storage. The chart deploys a configmap named `codefresh-workflows-log-store` with the repository configuration.
If you want to utilize the Codefresh SaaS solution for log storage for all workflows in the runtime please set the following values:
Expand Down Expand Up @@ -415,6 +477,7 @@ gitops-operator:
| event-reporters.workflow.sensor.tolerations | list | `[]` | |
| event-reporters.workflow.serviceAccount.create | bool | `true` | |
| gitops-operator.affinity | object | `{}` | |
| gitops-operator.config | object | `{"commitStatusPollingInterval":"10s","maxConcurrentReleases":100,"promotionWrapperTemplate":"","taskPollingInterval":"10s","workflowMonitorPollingInterval":"10s"}` | GitOps operator configuration |
| 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.promotionWrapperTemplate | string | `""` | An optional template for the promotion wrapper (empty default will use the embedded one) |
Expand All @@ -427,9 +490,7 @@ gitops-operator:
| gitops-operator.crds.keep | bool | `false` | Keep CRDs if gitops runtime release is uninstalled |
| gitops-operator.enabled | bool | `true` | |
| 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 | `"v0.10.2"` | |
| gitops-operator.image | object | `{"registry":"quay.io","repository":"codefresh/codefresh-gitops-operator","tag":"v0.10.2"}` | GitOps operator image |
| gitops-operator.imagePullSecrets | list | `[]` | |
| gitops-operator.nameOverride | string | `""` | |
| gitops-operator.nodeSelector | object | `{}` | |
Expand Down Expand Up @@ -482,7 +543,7 @@ gitops-operator:
| global.httpsProxy | string | `""` | global HTTPS_PROXY for all components |
| 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,"eventBus":{"annotations":{},"jetstream":{"affinity":{},"containerTemplate":{"resources":{"limits":{"cpu":"500m","ephemeral-storage":"2Gi","memory":"4Gi"},"requests":{"cpu":"200m","ephemeral-storage":"2Gi","memory":"1Gi"}}},"maxPayload":"4MB","metadata":{"labels":{"app.kubernetes.io/name":"codefresh-eventbus"}},"nodeSelector":{},"replicas":3,"tolerations":[],"version":"latest"},"name":"","nats":{"native":{"affinity":{},"auth":"token","containerTemplate":{"resources":{"limits":{"cpu":"500m","ephemeral-storage":"2Gi","memory":"4Gi"},"requests":{"cpu":"200m","ephemeral-storage":"2Gi","memory":"1Gi"}}},"maxPayload":"4MB","metadata":{"labels":{"app.kubernetes.io/name":"codefresh-eventbus"}},"nodeSelector":{},"replicas":3,"tolerations":[]}},"pdb":{"enabled":true,"minAvailable":2},"type":"nats"},"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 |
| global.runtime | object | `{"cluster":"https://kubernetes.default.svc","codefreshHosted":false,"eventBus":{"annotations":{},"jetstream":{"affinity":{},"containerTemplate":{"resources":{"limits":{"cpu":"500m","ephemeral-storage":"2Gi","memory":"4Gi"},"requests":{"cpu":"200m","ephemeral-storage":"2Gi","memory":"1Gi"}}},"maxPayload":"4MB","metadata":{"labels":{"app.kubernetes.io/name":"codefresh-eventbus"}},"nodeSelector":{},"replicas":3,"tolerations":[],"version":"latest"},"name":"","nats":{"native":{"affinity":{},"auth":"token","containerTemplate":{"resources":{"limits":{"cpu":"500m","ephemeral-storage":"2Gi","memory":"4Gi"},"requests":{"cpu":"200m","ephemeral-storage":"2Gi","memory":"1Gi"}}},"maxPayload":"4MB","metadata":{"labels":{"app.kubernetes.io/name":"codefresh-eventbus"}},"nodeSelector":{},"replicas":3,"tolerations":[]}},"pdb":{"enabled":true,"minAvailable":2},"type":"nats"},"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,"singleNamespace":false}` | Runtime level settings |
| global.runtime.cluster | string | `"https://kubernetes.default.svc"` | Runtime cluster. Should not be changed. |
| global.runtime.codefreshHosted | bool | `false` | Defines whether this is a Codefresh hosted runtime. Should not be changed. |
| global.runtime.eventBus | object | `{"annotations":{},"jetstream":{"affinity":{},"containerTemplate":{"resources":{"limits":{"cpu":"500m","ephemeral-storage":"2Gi","memory":"4Gi"},"requests":{"cpu":"200m","ephemeral-storage":"2Gi","memory":"1Gi"}}},"maxPayload":"4MB","metadata":{"labels":{"app.kubernetes.io/name":"codefresh-eventbus"}},"nodeSelector":{},"replicas":3,"tolerations":[],"version":"latest"},"name":"","nats":{"native":{"affinity":{},"auth":"token","containerTemplate":{"resources":{"limits":{"cpu":"500m","ephemeral-storage":"2Gi","memory":"4Gi"},"requests":{"cpu":"200m","ephemeral-storage":"2Gi","memory":"1Gi"}}},"maxPayload":"4MB","metadata":{"labels":{"app.kubernetes.io/name":"codefresh-eventbus"}},"nodeSelector":{},"replicas":3,"tolerations":[]}},"pdb":{"enabled":true,"minAvailable":2},"type":"nats"}` | Runtime eventbus |
Expand All @@ -503,6 +564,7 @@ gitops-operator:
| global.runtime.ingressUrl | string | `""` | Explicit url for runtime ingress. Provide this value only if you don't want the chart to create and ingress (global.runtime.ingress.enabled=false) and tunnel-client is not used (tunnel-client.enabled=false) |
| global.runtime.isConfigurationRuntime | bool | `false` | is the runtime set as a "configuration runtime". |
| global.runtime.name | string | `nil` | Runtime name. Must be unique per platform account. |
| global.runtime.singleNamespace | bool | `false` | Runtime single namespace mode. When true, runtime operates in single namespace scope. |
| global.tolerations | list | `[]` | Global tolerations for all components |
| installer | object | `{"affinity":{},"argoCdVersionCheck":{"argoServerLabels":{"app.kubernetes.io/component":"server","app.kubernetes.io/part-of":"argocd"}},"image":{"pullPolicy":"IfNotPresent","repository":"quay.io/codefresh/gitops-runtime-installer","tag":""},"nodeSelector":{},"skipUsageValidation":false,"skipValidation":false,"tolerations":[]}` | Runtime installer used for running hooks and checks on the release |
| installer.skipUsageValidation | bool | `false` | if set to true, pre-install hook will *not* run |
Expand Down
63 changes: 63 additions & 0 deletions charts/gitops-runtime/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,69 @@ See [Use OCI-based registries](https://helm.sh/docs/topics/registries/)
## Codefresh official documentation:
Prior to running the installation please see the official documentation at: https://codefresh.io/docs/docs/installation/gitops/hybrid-gitops-helm-installation/

## Multi Runtime Installation
You can install multiple Codefresh GitOps Runtimes in the same cluster, as long as each Runtime is deployed in its own namespace and manages only the applications in that namespace.
To achieve this, configure your Runtimes to run in namespaced mode by setting `global.runtime.singleNamespace=true`. See the values.yaml example below:
```yaml
global:
runtime:
singleNamespace: true
sealed-secrets:
enabled: false
argo-cd:
createClusterRoles: false
crds:
install: false
configs:
params:
application.namespaces: ''
argo-events:
controller:
rbac:
namespaced: true
argo-workflows:
crds:
install: false
singleNamespace: true
createAggregateRoles: false
controller:
clusterWorkflowTemplates:
enabled: false
server:
clusterWorkflowTemplates:
enabled: false
argo-rollouts:
enabled: false
tunnel-client:
enabled: false
gitops-operator:
crds:
install: false
```

Note that for the first runtime in the cluster, you have to configure it to install the CRDs, with setting these values:
```yaml
global:
runtime:
isConfigurationRuntime: true
argo-cd:
crds:
install: true
argo-workflows:
crds:
install: true
argo-rollouts:
installCRDs: true
gitops-operator:
crds:
install: true
```

> [!WARNING]
> If you want more than one runtime in your cluster, make sure that all of the runtimes in your cluster are configured with `global.runtime.singleNamespace=true`.
> If you already have a runtime installed in the cluster without this setting, multi runtime installation is not supported.


## Argo-workflows artifact and log storage
Codefresh provides a SaaS object storage based solution for Argo workflows logs storage. The chart deploys a configmap named `codefresh-workflows-log-store` with the repository configuration.
If you want to utilize the Codefresh SaaS solution for log storage for all workflows in the runtime please set the following values:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
{{ include "cap-app-proxy.resources.service" . }}
---
{{ include "cap-app-proxy.resources.sa" .}}
{{- end }}
---
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ argoCdUsername: {{ .Values.config.argoCdUsername }}
argoWorkflowsInsecure: {{ .Values.config.argoWorkflowsInsecure | quote }}
argoWorkflowsUrl: {{ default "" .Values.config.argoWorkflowsUrl }}
cors: {{ .Values.global.codefresh.url }}
{{- with .Values.config.clusterChunkSize }}
{{- with .Values.config.clusterChunkSize }}
clusterChunkSize: {{ . | quote }}
{{- end }}
env: {{ .Values.config.env | quote}}
isConfigurationRuntime: {{ .Values.global.runtime.isConfigurationRuntime | quote }}
isExternalArgoCD: {{ .Values.global.runtime.isExternalArgoCD | quote }}
runtimeName: {{ required "global.runtime.name is required" .Values.global.runtime.name | quote}}
isNamespacedRuntime: {{ .Values.global.runtime.singleNamespace | quote }}
skipGitPermissionValidation: {{ .Values.config.skipGitPermissionValidation | quote }}
logLevel: {{ .Values.config.logLevel | quote }}
{{- $enrichmentValues := get .Values "image-enrichment" }}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{- define "argo-cd.namespaced-rbac.all" }}
{{- if (index .Values "global" "runtime").singleNamespace }}
{{- include "argo-cd.namespaced-rbac.serviceaccount" . }}
---
{{- include "argo-cd.namespaced-rbac.secret" . }}
---
{{- include "argo-cd.namespaced-rbac.role" . }}
---
{{- include "argo-cd.namespaced-rbac.rolebinding" . }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- define "argo-cd.namespaced-rbac.role" }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: argocd-namespaced-role
namespace: {{ .Release.Namespace }}
labels:
{{- include "codefresh-gitops-runtime.labels" . | nindent 4 }}
codefresh.io/component: argocd-namespaced-rbac
rules:
- apiGroups:
- '*'
resources:
- '*'
verbs:
- '*'
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{- define "argo-cd.namespaced-rbac.rolebinding" }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: argocd-namespaced-rolebinding
namespace: {{ .Release.Namespace }}
labels:
{{- include "codefresh-gitops-runtime.labels" . | nindent 4 }}
codefresh.io/component: argocd-namespaced-rbac
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: argocd-namespaced-role
subjects:
- kind: ServiceAccount
name: argocd-manager
namespace: {{ .Release.Namespace }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{- define "argo-cd.namespaced-rbac.secret" }}
apiVersion: v1
kind: Secret
metadata:
name: argocd-manager-long-lived-token
annotations:
kubernetes.io/service-account.name: argocd-manager
type: kubernetes.io/service-account-token
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{- define "argo-cd.namespaced-rbac.serviceaccount" }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: argocd-manager
namespace: {{ .Release.Namespace }}
labels:
{{- include "codefresh-gitops-runtime.labels" . | nindent 4 }}
codefresh.io/component: argocd-namespaced-rbac
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ IS_EXTERNAL_ARGOCD:
name: cap-app-proxy-cm
key: isExternalArgoCD
optional: true
IS_NAMESPACED_RUNTIME:
valueFrom:
configMapKeyRef:
name: cap-app-proxy-cm
key: isNamespacedRuntime
optional: true
MANAGED: false
NAMESPACE:
valueFrom:
Expand Down Expand Up @@ -210,6 +216,7 @@ IRW_JIRA_ENRICHMENT_TASK_IMAGE:
name: cap-app-proxy-cm
key: enrichmentJiraEnrichmentImage
optional: true

NODE_EXTRA_CA_CERTS: /app/config/all/all.cer
{{- if gt (int .Values.replicaCount) 1 }}
LEADER_ID:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@
{{/* Workaround to NOT change label selectors from previous runtime release when event-reporter was part of cf-argocd-extras Subchart */}}
{{- $_ := set $context.Values "nameOverride" "cf-argocd-extras" }}

{{/* Remove nonResourceURLs when RBAC is namespaced */}}
{{- $rules := $context.Values.rbac.rules }}
{{- $_ := set $context.Values.rbac "namespaced" (get .Values.global.runtime "singleNamespace") }}
{{- if $context.Values.rbac.namespaced }}
{{- $rules = list }}
{{- range $context.Values.rbac.rules }}
{{- if not .nonResourceURLs }}
{{- $rules = append $rules . }}
{{- end }}
{{- end }}
{{- end }}
{{- $_ := set $context.Values.rbac "rules" $rules }}

{{- $templateName := printf "cf-common-%s.rbac" (index .Subcharts "cf-common").Chart.Version }}
{{- include $templateName $context }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

{{/* Workaround to NOT change label selectors from previous runtime release when sources-server was part of cf-argocd-extras Subchart */}}
{{- $_ := set $context.Values "nameOverride" "cf-argocd-extras" }}
{{- $_ := set $context.Values.rbac "namespaced" (get .Values.global.runtime "singleNamespace") }}

{{- $templateName := printf "cf-common-%s.rbac" (index .Subcharts "cf-common").Chart.Version }}
{{- include $templateName $context }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ global:

replicaCount: 1

# -- Restrict the gitops operator to a single namespace (by the namespace of Helm release)
singleNamespace: false

# -- Codefresh gitops operator crds
crds:
# -- Whether or not to install CRDs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ COMMIT_STATUS_POLLING_INTERVAL: {{ .Values.config.commitStatusPollingInterval }}
WORKFLOW_MONITOR_POLLING_INTERVAL: {{ .Values.config.workflowMonitorPollingInterval }}
MAX_CONCURRENT_RELEASES: {{ .Values.config.maxConcurrentReleases }}
PROMOTION_WRAPPER_TEMPLATE: {{ .Values.config.promotionWrapperTemplate | quote }}
IS_NAMESPACED_RUNTIME: {{ .Values.global.runtime.singleNamespace }}
{{- end }}

{{- define "gitops-operator.resources.environment-variables.defaults" -}}
Expand All @@ -36,7 +37,7 @@ NAMESPACE:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
RUNTIME_VERSION:
RUNTIME_VERSION:
valueFrom:
configMapKeyRef:
name: codefresh-cm
Expand Down
Loading