diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a1f3372d1..31f87b08e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,15 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + + - + name: Set up chart-testing + uses: helm/chart-testing-action@v2.3.1 + with: + version: v3.3.0 + - + name: Run chart-testing (lint) + run: ct lint --all --validate-maintainers=false charts/ - uses: actions/setup-go@v5 with: diff --git a/charts/fleet-agent/.helmignore b/charts/fleet-agent/.helmignore new file mode 100644 index 0000000000..4503a3e64d --- /dev/null +++ b/charts/fleet-agent/.helmignore @@ -0,0 +1,2 @@ +.helmignore +ci/ diff --git a/charts/fleet-agent/ci/default-values.yaml b/charts/fleet-agent/ci/default-values.yaml new file mode 100644 index 0000000000..c25be3aaf0 --- /dev/null +++ b/charts/fleet-agent/ci/default-values.yaml @@ -0,0 +1,2 @@ +apiServerURL: "https://localhost" +apiServerCA: "abc" diff --git a/charts/fleet-agent/values.yaml b/charts/fleet-agent/values.yaml index 47cb0be226..cca576418d 100644 --- a/charts/fleet-agent/values.yaml +++ b/charts/fleet-agent/values.yaml @@ -19,8 +19,8 @@ agentTLSMode: "system-store" token: "" # Labels to add to the cluster upon registration only. They are not added after the fact. -#labels: -# foo: bar +# labels: +# foo: bar # The client ID of the cluster to associate with clientID: "" diff --git a/charts/fleet/.helmignore b/charts/fleet/.helmignore new file mode 100644 index 0000000000..4503a3e64d --- /dev/null +++ b/charts/fleet/.helmignore @@ -0,0 +1,2 @@ +.helmignore +ci/ diff --git a/charts/fleet/ci/debug-values.yaml b/charts/fleet/ci/debug-values.yaml new file mode 100644 index 0000000000..f495e1f62f --- /dev/null +++ b/charts/fleet/ci/debug-values.yaml @@ -0,0 +1,64 @@ +bootstrap: + enabled: true + +global: + cattle: + systemDefaultRegistry: "ghcr.io" + +nodeSelector: + kubernetes.io/os: os2 + +tolerations: + - key: node.cloudprovider.kubernetes.io/uninitialized + operator: "Equal" + value: "true" + effect: NoSchedule + +priorityClassName: "prio1" + +gitops: + enabled: true + +metrics: + enabled: true + +debug: true +debugLevel: 4 +propagateDebugSettingsToAgents: true + +cpuPprof: + period: "60s" + volumeConfiguration: + hostPath: + path: /tmp/pprof + type: DirectoryOrCreate + +migrations: + clusterRegistrationCleanup: true + +leaderElection: + leaseDuration: 30s + retryPeriod: 10s + renewDeadline: 25s + +controller: + reconciler: + workers: + gitrepo: "1" + bundle: "1" + bundledeployment: "1" + +extraEnv: + - name: EXPERIMENTAL_OCI_STORAGE + value: "true" + +shards: + - id: shard0 + nodeSelector: + kubernetes.io/hostname: k3d-upstream-server-0 + - id: shard1 + nodeSelector: + kubernetes.io/hostname: k3d-upstream-server-1 + - id: shard2 + nodeSelector: + kubernetes.io/hostname: k3d-upstream-server-2 diff --git a/charts/fleet/ci/default-values.yaml b/charts/fleet/ci/default-values.yaml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/charts/fleet/ci/nobootstrap-values.yaml b/charts/fleet/ci/nobootstrap-values.yaml new file mode 100644 index 0000000000..e4fbff5cd3 --- /dev/null +++ b/charts/fleet/ci/nobootstrap-values.yaml @@ -0,0 +1,64 @@ +bootstrap: + enabled: false + +global: + cattle: + systemDefaultRegistry: "ghcr.io" + +nodeSelector: + kubernetes.io/os: mac + +tolerations: + - key: node.cloudprovider.kubernetes.io/uninitialized + operator: "Equal" + value: "true" + effect: NoSchedule + +priorityClassName: "prio1" + +gitops: + enabled: true + +metrics: + enabled: true + +debug: false +debugLevel: 4 +propagateDebugSettingsToAgents: true + +cpuPprof: + period: "60s" + volumeConfiguration: + hostPath: + path: /tmp/pprof + type: DirectoryOrCreate + +migrations: + clusterRegistrationCleanup: true + +leaderElection: + leaseDuration: 30s + retryPeriod: 10s + renewDeadline: 25s + +controller: + reconciler: + workers: + gitrepo: "1" + bundle: "1" + bundledeployment: "1" + +extraEnv: + - name: EXPERIMENTAL_OCI_STORAGE + value: "true" + +shards: + - id: shard0 + nodeSelector: + kubernetes.io/hostname: k3d-upstream-server-0 + - id: shard1 + nodeSelector: + kubernetes.io/hostname: k3d-upstream-server-1 + - id: shard2 + nodeSelector: + kubernetes.io/hostname: k3d-upstream-server-2 diff --git a/charts/fleet/ci/nodebug-values.yaml b/charts/fleet/ci/nodebug-values.yaml new file mode 100644 index 0000000000..b4e898036a --- /dev/null +++ b/charts/fleet/ci/nodebug-values.yaml @@ -0,0 +1,64 @@ +bootstrap: + enabled: true + +global: + cattle: + systemDefaultRegistry: "ghcr.io" + +nodeSelector: + kubernetes.io/os: plan9 + +tolerations: + - key: node.cloudprovider.kubernetes.io/uninitialized + operator: "Equal" + value: "true" + effect: NoSchedule + +priorityClassName: "prio1" + +gitops: + enabled: true + +metrics: + enabled: true + +debug: false +debugLevel: 4 +propagateDebugSettingsToAgents: true + +cpuPprof: + period: "60s" + volumeConfiguration: + hostPath: + path: /tmp/pprof + type: DirectoryOrCreate + +migrations: + clusterRegistrationCleanup: true + +leaderElection: + leaseDuration: 30s + retryPeriod: 10s + renewDeadline: 25s + +controller: + reconciler: + workers: + gitrepo: "1" + bundle: "1" + bundledeployment: "1" + +extraEnv: + - name: EXPERIMENTAL_OCI_STORAGE + value: "true" + +shards: + - id: shard0 + nodeSelector: + kubernetes.io/hostname: k3d-upstream-server-0 + - id: shard1 + nodeSelector: + kubernetes.io/hostname: k3d-upstream-server-1 + - id: shard2 + nodeSelector: + kubernetes.io/hostname: k3d-upstream-server-2 diff --git a/charts/fleet/ci/nogitops-values.yaml b/charts/fleet/ci/nogitops-values.yaml new file mode 100644 index 0000000000..d76af71f65 --- /dev/null +++ b/charts/fleet/ci/nogitops-values.yaml @@ -0,0 +1,64 @@ +bootstrap: + enabled: true + +global: + cattle: + systemDefaultRegistry: "ghcr.io" + +nodeSelector: + kubernetes.io/os: winxp + +tolerations: + - key: node.cloudprovider.kubernetes.io/uninitialized + operator: "Equal" + value: "true" + effect: NoSchedule + +priorityClassName: "prio1" + +gitops: + enabled: false + +metrics: + enabled: true + +debug: false +debugLevel: 4 +propagateDebugSettingsToAgents: true + +cpuPprof: + period: "60s" + volumeConfiguration: + hostPath: + path: /tmp/pprof + type: DirectoryOrCreate + +migrations: + clusterRegistrationCleanup: true + +leaderElection: + leaseDuration: 30s + retryPeriod: 10s + renewDeadline: 25s + +controller: + reconciler: + workers: + gitrepo: "1" + bundle: "1" + bundledeployment: "1" + +extraEnv: + - name: EXPERIMENTAL_OCI_STORAGE + value: "true" + +shards: + - id: shard0 + nodeSelector: + kubernetes.io/hostname: k3d-upstream-server-0 + - id: shard1 + nodeSelector: + kubernetes.io/hostname: k3d-upstream-server-1 + - id: shard2 + nodeSelector: + kubernetes.io/hostname: k3d-upstream-server-2 diff --git a/charts/fleet/templates/deployment_gitjob.yaml b/charts/fleet/templates/deployment_gitjob.yaml index 73f2fe798e..66c37e409b 100644 --- a/charts/fleet/templates/deployment_gitjob.yaml +++ b/charts/fleet/templates/deployment_gitjob.yaml @@ -83,6 +83,9 @@ spec: - name: GITREPO_RECONCILER_WORKERS value: {{ quote $.Values.controller.reconciler.workers.gitrepo }} {{- end }} +{{- if $.Values.extraEnv }} +{{ toYaml $.Values.extraEnv | indent 12}} +{{- end }} {{- if $.Values.debug }} - name: CATTLE_DEV_MODE value: "true" @@ -95,9 +98,6 @@ spec: drop: - ALL {{- end }} -{{- if $.Values.extraEnv }} -{{ toYaml $.Values.extraEnv | indent 12}} -{{- end }} nodeSelector: {{ include "linux-node-selector" $shard.id | nindent 8 }} {{- if $.Values.nodeSelector }} {{ toYaml $.Values.nodeSelector | indent 8 }} diff --git a/charts/fleet/values.yaml b/charts/fleet/values.yaml index 8ce206f4ce..c867f20cf6 100644 --- a/charts/fleet/values.yaml +++ b/charts/fleet/values.yaml @@ -78,12 +78,12 @@ propagateDebugSettingsToAgents: true ## Optional CPU pprof configuration. Profiles are collected continuously and saved every period ## Any valid volume configuration can be provided, the example below uses hostPath -#cpuPprof: -# period: "60s" -# volumeConfiguration: -# hostPath: -# path: /tmp/pprof -# type: DirectoryOrCreate +# cpuPprof: +# period: "60s" +# volumeConfiguration: +# hostPath: +# path: /tmp/pprof +# type: DirectoryOrCreate migrations: clusterRegistrationCleanup: true