Skip to content

Commit a9587a7

Browse files
Feat(CR-27391): add new option to app-proxy (#403)
* add new option to app-proxy
1 parent 1577848 commit a9587a7

File tree

5 files changed

+18
-2
lines changed

5 files changed

+18
-2
lines changed

charts/gitops-runtime/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ sealed-secrets:
9090
| app-proxy.config.env | string | `"production"` | |
9191
| app-proxy.config.logLevel | string | `"info"` | Log Level |
9292
| app-proxy.config.skipGitPermissionValidation | string | `"false"` | Skit git permissions validation |
93+
| app-proxy.config.clusterChunkSize | int | `0` | Number of clusters per request. App-proxy will split and refresh the cluster list with chunks with size `clusterChunkSize`. When the default value is used the cluster list will be refreshed with one chunk (no split; not recommended when cluster list is too large). |
9394
| app-proxy.env | object | `{}` | |
9495
| app-proxy.extraVolumeMounts | list | `[]` | Extra volume mounts for main container |
9596
| app-proxy.extraVolumes | list | `[]` | extra volumes |

charts/gitops-runtime/templates/_components/cap-app-proxy/_config.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ argoCdUsername: {{ .Values.config.argoCdUsername }}
44
argoWorkflowsInsecure: {{ .Values.config.argoWorkflowsInsecure | quote }}
55
argoWorkflowsUrl: {{ default "" .Values.config.argoWorkflowsUrl }}
66
cors: {{ .Values.global.codefresh.url }}
7+
{{- with .Values.config.clusterChunkSize }}
8+
clusterChunkSize: {{ . | quote }}
9+
{{- end }}
710
env: {{ .Values.config.env | quote}}
811
isConfigurationRuntime: {{ .Values.global.runtime.isConfigurationRuntime | quote }}
912
runtimeName: {{ required "global.runtime.name is required" .Values.global.runtime.name | quote}}
@@ -26,7 +29,7 @@ enrichmentJiraEnrichmentImage: {{ printf "%s/%s:%s" $enrichmentValues.config.ima
2629

2730
{{- define "cap-app-proxy.resources.configmap" }}
2831
{{- $documentedConfigs := (include "cap-app-proxy.resources.configmap-documented-configs" . | fromYaml ) }}
29-
{{- $overrides := .Values.config }}
32+
{{- $overrides := omit .Values.config "clusterChunkSize" }}
3033
{{- $mergedConfig := mergeOverwrite $documentedConfigs $overrides }}
3134
apiVersion: v1
3235
kind: ConfigMap

charts/gitops-runtime/templates/_components/cap-app-proxy/environment-variables/_main-container.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ CF_HOST:
3636
key: base-url
3737
optional: true
3838
CLUSTER: https://kubernetes.default.svc
39+
CLUSTER_CHUNK_SIZE:
40+
valueFrom:
41+
configMapKeyRef:
42+
name: cap-app-proxy-cm
43+
key: clusterChunkSize
44+
optional: true
3945
CORS:
4046
valueFrom:
4147
configMapKeyRef:

charts/gitops-runtime/values.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,11 @@ app-proxy:
481481
skipGitPermissionValidation: "false"
482482
# -- Log Level
483483
logLevel: "info"
484+
# -- define cluster list size per request to report the cluster state to platform, e.g.
485+
# if you have 90 clusters and set clusterChunkSize: 40, it means cron job will report cluster state to platform in 3 iterations (40,40,10)
486+
# - reduce this value if you have a lot of clusters and the cron job is failing with payload too large error
487+
# - use 0 to sync all clusters at once
488+
clusterChunkSize: 50
484489

485490
env: {}
486491

installer-image/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
FROM debian:bullseye-slim
1+
#bookworm-slim
2+
FROM debian:12.9-slim
23

34
ARG CF_CLI_VERSION=v0.1.70
45
ARG TARGETARCH

0 commit comments

Comments
 (0)