Skip to content

Commit

Permalink
Merge branch 'main' into cluster-resources-from-bd
Browse files Browse the repository at this point in the history
  • Loading branch information
aruiz14 authored Dec 12, 2024
2 parents f295c3f + 91b1329 commit 68b195a
Show file tree
Hide file tree
Showing 20 changed files with 183 additions and 65 deletions.
5 changes: 5 additions & 0 deletions .github/scripts/wait-for-loadbalancer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

set -euxo pipefail

# wait for Rancher to create the ingress before waiting for the loadbalancer
while ! kubectl get ingress -n cattle-system rancher; do
sleep 1
done

# wait for loadBalancer IPs
{ grep -q -m 1 -e ".*"; kill $!; } < <(kubectl get ingress -n cattle-system rancher -o 'go-template={{range .status.loadBalancer.ingress}}{{.ip}}{{"\n"}}{{end}}' -w)
# wait for certificate
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e-rancher-upgrade-fleet-to-head-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ jobs:
FLEET_E2E_NS_DOWNSTREAM: fleet-default
run: |
kubectl config use-context k3d-upstream
export CI_REGISTERED_CLUSTER=$(kubectl get clusters.fleet.cattle.io -n $FLEET_E2E_NS_DOWNSTREAM -o jsonpath='{..name}')
ginkgo --github-output e2e/multi-cluster
-
name: Dump Failed Downstream Environment
Expand Down
8 changes: 8 additions & 0 deletions charts/fleet-agent/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
{{- if $.Values.agent.reconciler.workers.bundledeployment }}
- name: BUNDLEDEPLOYMENT_RECONCILER_WORKERS
value: {{ quote $.Values.agent.reconciler.workers.bundledeployment }}
{{- end }}
{{- if $.Values.agent.reconciler.workers.drift }}
- name: DRIFT_RECONCILER_WORKERS
value: {{ quote $.Values.agent.reconciler.workers.drift }}
{{- end }}
image: '{{ template "system_default_registry" . }}{{.Values.image.repository}}:{{.Values.image.tag}}'
name: fleet-agent
command:
Expand Down
8 changes: 8 additions & 0 deletions charts/fleet-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,11 @@ global:
debug: false
debugLevel: 0
disableSecurityContext: false

## Fleet agent configuration
agent:
reconciler:
# The number of workers that are allowed for each type of reconciler
workers:
bundledeployment: "50"
drift: "50"
24 changes: 12 additions & 12 deletions charts/fleet/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,18 @@ spec:
- name: BUNDLEDEPLOYMENT_RECONCILER_WORKERS
value: {{ quote $.Values.controller.reconciler.workers.bundledeployment }}
{{- end }}
{{- if $.Values.controller.reconciler.workers.cluster }}
- name: CLUSTER_RECONCILER_WORKERS
value: {{ quote $.Values.controller.reconciler.workers.cluster }}
{{- end }}
{{- if $.Values.controller.reconciler.workers.clustergroup }}
- name: CLUSTERGROUP_RECONCILER_WORKERS
value: {{ quote $.Values.controller.reconciler.workers.clustergroup }}
{{- end }}
{{- if $.Values.controller.reconciler.workers.imagescan }}
- name: IMAGESCAN_RECONCILER_WORKERS
value: {{ quote $.Values.controller.reconciler.workers.imagescan }}
{{- end }}
{{- if $.Values.extraEnv }}
{{ toYaml $.Values.extraEnv | indent 8}}
{{- end }}
Expand Down Expand Up @@ -128,18 +140,6 @@ spec:
- name: CATTLE_ELECTION_RENEW_DEADLINE
value: {{$.Values.leaderElection.renewDeadline}}
{{- end }}
{{- if $.Values.controller.reconciler.workers.gitrepo }}
- name: GITREPO_RECONCILER_WORKERS
value: {{ quote $.Values.controller.reconciler.workers.gitrepo }}
{{- end }}
{{- if $.Values.controller.reconciler.workers.bundle }}
- name: BUNDLE_RECONCILER_WORKERS
value: {{ quote $.Values.controller.reconciler.workers.bundle }}
{{- end }}
{{- if $.Values.controller.reconciler.workers.bundledeployment }}
- name: BUNDLEDEPLOYMENT_RECONCILER_WORKERS
value: {{ quote $.Values.controller.reconciler.workers.bundledeployment }}
{{- end }}
image: '{{ template "system_default_registry" $ }}{{ $.Values.image.repository }}:{{ $.Values.image.tag }}'
name: fleet-cleanup
imagePullPolicy: "{{ $.Values.image.imagePullPolicy }}"
Expand Down
2 changes: 1 addition & 1 deletion charts/fleet/templates/job_cleanup_gitrepojobs.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.migrations.gitrepoJobsCleanup }}
{{- if and .Values.migrations.gitrepoJobsCleanup .Values.gitops.enabled }}
---
apiVersion: batch/v1
kind: CronJob
Expand Down
3 changes: 3 additions & 0 deletions charts/fleet/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ controller:
gitrepo: "50"
bundle: "50"
bundledeployment: "50"
cluster: "50"
clustergroup: "50"
imagescan: "50"

# Extra environment variables passed to the fleet pods.
# extraEnv:
Expand Down
29 changes: 14 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/chartmuseum/helm-push v0.10.4
github.com/cheggaaa/pb v1.0.29
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
github.com/docker/docker v27.3.1+incompatible
github.com/docker/docker v27.4.0+incompatible
github.com/evanphx/json-patch v5.9.0+incompatible
github.com/go-git/go-billy/v5 v5.6.0
github.com/go-git/go-git/v5 v5.12.1-0.20240629213349-b00c68ab7140
Expand All @@ -29,16 +29,16 @@ require (
github.com/hashicorp/go-getter v1.7.6
github.com/jpillora/backoff v1.0.0
github.com/onsi/ginkgo/v2 v2.22.0
github.com/onsi/gomega v1.35.1
github.com/onsi/gomega v1.36.1
github.com/opencontainers/go-digest v1.0.0
github.com/opencontainers/image-spec v1.1.0
github.com/otiai10/copy v1.14.0
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.20.5
github.com/prometheus/client_model v0.6.1
github.com/prometheus/common v0.60.1
github.com/prometheus/common v0.61.0
github.com/rancher/fleet/pkg/apis v0.11.0
github.com/rancher/lasso v0.0.0-20241115003608-cbc3210bd004
github.com/rancher/lasso v0.0.0-20241202185148-04649f379358
github.com/rancher/wrangler/v3 v3.1.0
github.com/reugn/go-quartz v0.13.0
github.com/sirupsen/logrus v1.9.3
Expand All @@ -47,8 +47,8 @@ require (
github.com/testcontainers/testcontainers-go v0.34.0
go.uber.org/mock v0.5.0
go.uber.org/zap v1.27.0
golang.org/x/crypto v0.29.0
golang.org/x/sync v0.9.0
golang.org/x/crypto v0.30.0
golang.org/x/sync v0.10.0
gopkg.in/go-playground/webhooks.v5 v5.17.0
gopkg.in/yaml.v2 v2.4.0
gotest.tools v2.2.0+incompatible
Expand All @@ -62,10 +62,10 @@ require (
k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38
k8s.io/kubectl v0.31.1
k8s.io/kubernetes v1.31.0
k8s.io/utils v0.0.0-20240902221715-702e33fdd3c3
k8s.io/utils v0.0.0-20241210054802-24370beab758
oras.land/oras-go/v2 v2.5.0
sigs.k8s.io/cli-utils v0.37.2
sigs.k8s.io/controller-runtime v0.19.2
sigs.k8s.io/controller-runtime v0.19.3
sigs.k8s.io/controller-tools v0.16.5
sigs.k8s.io/kustomize/api v0.17.2
sigs.k8s.io/kustomize/kyaml v0.17.1
Expand Down Expand Up @@ -116,7 +116,6 @@ require (
github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/go-errors/errors v1.4.2 // indirect
Expand Down Expand Up @@ -225,11 +224,11 @@ require (
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
golang.org/x/mod v0.21.0 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/oauth2 v0.23.0 // indirect
golang.org/x/sys v0.27.0 // indirect
golang.org/x/term v0.26.0 // indirect
golang.org/x/text v0.20.0 // indirect
golang.org/x/net v0.32.0 // indirect
golang.org/x/oauth2 v0.24.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/term v0.27.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/time v0.6.0 // indirect
golang.org/x/tools v0.26.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
Expand All @@ -239,7 +238,7 @@ require (
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect
google.golang.org/grpc v1.65.0 // indirect
google.golang.org/protobuf v1.35.1 // indirect
google.golang.org/protobuf v1.35.2 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
Expand Down
Loading

0 comments on commit 68b195a

Please sign in to comment.