From fbb309f1ad59f090d4bfc7fe07535621bc8bfc0e Mon Sep 17 00:00:00 2001 From: Mario Manno Date: Thu, 18 Jul 2024 15:16:15 +0200 Subject: [PATCH] Add chart-testing to ci workflow This adds some example values, especially the helm values affecting blocks, like `debug` often create problems. --- .github/workflows/ci.yml | 9 ++++ charts/fleet-agent/ci/default-values.yaml | 2 + charts/fleet-agent/values.yaml | 4 +- charts/fleet/ci/debug-values.yaml | 64 +++++++++++++++++++++++ charts/fleet/ci/default-values.yaml | 0 charts/fleet/ci/nobootstrap-values.yaml | 64 +++++++++++++++++++++++ charts/fleet/ci/nodebug-values.yaml | 64 +++++++++++++++++++++++ charts/fleet/ci/nogitops-values.yaml | 64 +++++++++++++++++++++++ charts/fleet/values.yaml | 12 ++--- 9 files changed, 275 insertions(+), 8 deletions(-) create mode 100644 charts/fleet-agent/ci/default-values.yaml create mode 100644 charts/fleet/ci/debug-values.yaml create mode 100644 charts/fleet/ci/default-values.yaml create mode 100644 charts/fleet/ci/nobootstrap-values.yaml create mode 100644 charts/fleet/ci/nodebug-values.yaml create mode 100644 charts/fleet/ci/nogitops-values.yaml 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/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/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/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