Skip to content

Commit

Permalink
[CP-25270] Merge release/1.0.0 into develop (#157)
Browse files Browse the repository at this point in the history
* CP-22731: add insights-controller chart (#97)

* CP-22731: include cz-insights-controller as subchart

* increase replicacount for tag server

* CP-22731: add beta testing

* update release process for insights controller

* update release workflow

* make most resources off by default

* update readme

* use global for secret names

* incorporate changes from 0.0.30-beta

* add beta release doc

* use local chart for testing

---------

Co-authored-by: josephbarnett <[email protected]>

* CP-22730: use correct pattern list in config

* CP-22730: update doc check location to match normal release path (#100)

* Update Chart.yaml to version 1.0.0-beta

* use latest insights-controller

* CP-23435: remove duplicate service account name in insights-controller chart (#103)

* CP-23426: use insights-controller service account for init job (#104)

* CP-23465: increase default replica count for insights controller (#106)

* CP-23423: add release doc for 1.0.1-beta release (#107)

* [CP-23425] add default remote write retries (#108)

* CP-23425: set default max retries

* update init job to work with long running scrapes

* increase wait time for scrape endpoint

* default batch size added

* increase wait time for init job

* adjust remote write threshold, add default resource values

* Release 1.0.2-beta (#109)

* CP-23051: Change default kube-state-metrics behavior to use Cloudzero subchart (#91)

* override KSM name

* enable ksm by default

* CP-23388: Define Static KubeStateMetrics Target Endpoint (#99)

* add 1.0.2 release doc file

---------

Co-authored-by: bdrennz <[email protected]>

* move release doc to correct location

* Update Chart.yaml to version 1.0.2-beta

* CP-22730: package both charts in beta release (#110)

* CP-22730: fix artficat name (#111)

* CP-22730: fix doc path for github release publish (#112)

* CP-23740 (Feature/1.0.3 beta release): Validate KSM Metrics at Install (#116)

* remove unused metric

* add kubemetrics

* bump chart version for beta

* use dev tag for validator

* fix endpoint var name

* allow github to bump version

* simplify metric logic

* update tag

* use dev tag for chart

* [CP-23429] merge insights-controller into main chart (#117)

* insights-controller added to agent chart

* [CP-23428] add helm chart for creating cert (#118)

* CP-23428: add certificate helm chart

* update with documentation comments

* Update charts/cloudzero-agent/README.md

Co-authored-by: Becki Lee <[email protected]>

* Update charts/cloudzero-agent/README.md

remove duplicate entry

Co-authored-by: Becki Lee <[email protected]>

* Update charts/cloudzero-agent/README.md

add period to end of sentence in readme

Co-authored-by: Becki Lee <[email protected]>

* PR suggestion for readme

* update config example

---------

Co-authored-by: Becki Lee <[email protected]>

* CP 24028 add insights controller scape config (#120)

CP-24028: add scrape target for insights container
CP-22734: Bump insights image release version
Enhance README for helm repo management
Add release note for next beta version
Update release process for customer version numbers in betas

* Update Chart.yaml to version 1.0.0-beta-4

* CP 23892 add healthcheck (#121)

* CP-23892, CP-24009, CP-23959: release note
* add healthcheck support
* bump value of insights controller

* Update Chart.yaml to version 1.0.0-beta-5

* fix beta deploy script

* CP-24118: affinity settings, release notes (#122)

* CP-24118: add pod best effort affinity rule for distributing pod instances accross nodes
* allow override of KSM in configuration
* add next release notes
* bump version of controller and validator
* fix table in release note

* CP-23452 Add recommended installation skills to README (#124)

* CP-24008: forward insights controller app metrics (#125)

* CP-24389: deprecate unused chart (#126)

* CP-20221: Labels and Annotations (#127)

* bump final version of insights controller
* Adding release notes for 1.0.0 release
* Adding cert troubleshooting guide

---------

Co-authored-by: Becki Lee <[email protected]>

* publish material for beta-6 (#128)

* update readme, add extra svc names to cloudzero-cert, add cloudzero-cert chart publish (#129)

* [CP-24464] default to create self-signed cert upon chart install (#130)

* default to create self-signed cert upon chart install

* Update charts/cloudzero-agent/docs/releases/1.0.0-beta-7.md

Co-authored-by: Becki Lee <[email protected]>

* Update charts/cloudzero-agent/docs/releases/1.0.0-beta-7.md

Co-authored-by: Becki Lee <[email protected]>

* Update charts/cloudzero-agent/docs/releases/1.0.0-beta-7.md

Co-authored-by: Becki Lee <[email protected]>

* Update charts/cloudzero-agent/README.md

Co-authored-by: Becki Lee <[email protected]>

* Update charts/cloudzero-agent/README.md

Co-authored-by: Becki Lee <[email protected]>

* Update charts/cloudzero-agent/README.md

Co-authored-by: JB <[email protected]>

* Update charts/cloudzero-agent/README.md

Co-authored-by: JB <[email protected]>

---------

Co-authored-by: Becki Lee <[email protected]>
Co-authored-by: JB <[email protected]>

* enable new metric for insights controller failures (#132)

* CP-24424: change init scrape job to use new -backfill option (#131)

Previously, the scrape job would use curl to hit a /scrape HTTP
endpoint on the webhook server. This was problematic on larger clusters
where the operation takes a long time since the HTTP context was
getting cancelled before the operation completed.

This patch switches to using a new -backfill option on the controller
binary, which causes the binary to run the backfiller (née scraper) and
exit instead of acting as an HTTPd.

* remove certificate chart from beta workflow (#133)

* Update Chart.yaml to version 1.0.0-beta-7

* add back missing packaging (#134)

* add upgrade command to beta-7 release notes (#135)

* CP-24743: allow all resources to use imagePullSecrets (#136)

* CP-24743: add imagePullSecrets to cert job

* Update Chart.yaml to version 1.0.0-beta-8

* CP-24792: allow more configurable settings, increase default remote write timeout (#137)

* CP-24792: allow more configurable settings, increase default remote write timeout

* CP-24792: add KSM image info for easy identification of images to mirror for private image registries (#139)

* CP-24792: add KSM image info for easy identification of images to mirror to private repos

* add template command for finding images

---------

Co-authored-by: Becki Lee <[email protected]>

* CP-24833: template KSM service address using the release name (#140)

* Update Chart.yaml to version 1.0.0-beta-9

* CP-24886: ensure KSM service and KSM target always match (#143)

* CP-24886: ensure ksm svc and target match

* Update NOTES.txt

---------

Co-authored-by: Thomas Evans <[email protected]>

* Update Chart.yaml to version 1.0.0-beta-10

* Add server.agentMode boolean configuration option

This just provides a convenient way to toggle agent mode on/off for
debugging, which is valuable since agent mode disables a *lot* of
Prometheus functionality which can be very useful for debugging, such
as the /graph endpoint.

* Add metric_relabel_configs to insights controller scrape job.

This should just restrict the metrics to those we're interested in,
as defined in values.yaml.

* CP-23129: add Prometheus scrape job to scrape metrics from itself

I also switched from a hardcoded value it to using
`prometheusConfig.scrapeJobs.kubeStateMetrics.scrapeInterval` for the
KSM job scrape_interval. This seems to pretty clearly be the intent
of the configuration option, but it was not being used. Notably, this
increases the interval from 1m to 2m.

* [CP-24912] use image tag and chart name in init job name (#144)

* always use insightsController image reference in init scrape job name

* CP-24655: use backfill instead of scrape for init job that gathers existing state (#145)

* CP-25115: add release notes for 1.0.0-rc1 release (#147)

* CP-24655: add release nodes for RC1

* fix main chart release in rel branch (#151)

* CP-25165: allow user to choose release branch in main chart release (#152)

* CP-25165: checkout given branch (#153)

* CP-25165: checkout given branch in correct order (#154)

* CP-25165: checkout the input branch, not main (#155)

* Basic install success message. (#149)

* Update charts/cloudzero-agent/Chart.yaml

Co-authored-by: JB <[email protected]>

* CP-25270: prepare release/1.0.0 for merging (#158)

* update docs, remove cert-manager references from test, add missing quote

---------

Co-authored-by: josephbarnett <[email protected]>
Co-authored-by: Automated CZ Release <[email protected]>
Co-authored-by: bdrennz <[email protected]>
Co-authored-by: Becki Lee <[email protected]>
Co-authored-by: JB <[email protected]>
Co-authored-by: evan-cz <[email protected]>
Co-authored-by: Thomas Evans <[email protected]>
  • Loading branch information
8 people authored Jan 28, 2025
1 parent 795a0cc commit 80cb347
Show file tree
Hide file tree
Showing 44 changed files with 2,407 additions and 285 deletions.
43 changes: 22 additions & 21 deletions .github/workflows/build-and-publish-beta-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ on:
workflow_dispatch:
inputs:
version:
description: 'Version to use for the release (beta suffix will be automatically appended (e.g. "0.0.1" + "-beta"))'
required: false
default: ''
description: 'Version to use for the release. Must contain "beta" (e.g. "0.0.1-beta").'
required: true
branch:
description: 'Branch to use for the release'
required: true
Expand Down Expand Up @@ -42,21 +41,24 @@ jobs:
- name: Install Helm
uses: azure/setup-helm@v3

- name: Build Dependencies
- name: Build Cloudzero Agent Dependencies
run: helm dependency update charts/cloudzero-agent/

# Step 3: Determine Version
- name: Get Github Tag Version
id: version
uses: flatherskevin/semver-action@v1
with:
incrementLevel: patch
source: tags
- name: Package Cloudzero Agent Chart
run: helm package charts/cloudzero-agent/ --destination .deploy

- name: Determine Chart Version
# Step 3: Validate and Set Version
- name: Validate Input Version
run: |
NEW_VERSION=${{ github.event.inputs.version || steps.version.outputs.nextVersion }}
echo "NEW_VERSION=$NEW_VERSION-beta" >> $GITHUB_ENV
if [[ -z "${{ github.event.inputs.version }}" ]]; then
echo "Version input is required."
exit 1
fi
if [[ "${{ github.event.inputs.version }}" != *"beta"* ]]; then
echo "Version must contain 'beta'. Provided version: ${{ github.event.inputs.version }}"
exit 1
fi
echo "NEW_VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
- name: Update Chart Version
run: |
Expand All @@ -65,14 +67,15 @@ jobs:
- name: Validate Release Notes are Present
run: |
if [ ! -f "docs/releases/${{ env.NEW_VERSION }}.md" ]; then
if [ ! -f "charts/cloudzero-agent/docs/releases/${{ env.NEW_VERSION }}.md" ]; then
echo "Release notes for ${{ env.NEW_VERSION }} are missing. Please create a release notes file at docs/releases/${{ env.NEW_VERSION }}.md"
exit 1
fi
# Step 4: Package and Commit Chart
- name: Package Chart
run: helm package charts/cloudzero-agent/ --destination .deploy
run: |
helm package charts/cloudzero-agent/ --destination .deploy
- name: Commit updated Chart.yaml
run: |
Expand All @@ -84,7 +87,7 @@ jobs:
continue-on-error: true

# Step 7: Handle Artifacts and Update Pages
- name: Upload Chart as Artifact
- name: Upload Cloudzero Agent Chart as Artifact
uses: actions/upload-artifact@v4
with:
name: agent-chart
Expand All @@ -105,7 +108,6 @@ jobs:

- name: Save Index in GH Pages
run: |
# copy the new chart and index.yaml
git add beta
git commit -m "Updating ${{ env.NEW_VERSION }} Index"
git push origin gh-pages
Expand All @@ -117,13 +119,12 @@ jobs:
rm -fr .deploy charts/cloudzero-agent/charts
git reset --hard
# now checkout docs from main
git checkout main -- charts/cloudzero-agent/docs charts/cloudzero-agent/README.md README.md
git checkout ${{ github.event.inputs.branch }} -- charts/cloudzero-agent/docs charts/cloudzero-agent/README.md README.md
git add README.md charts/cloudzero-agent/docs charts/cloudzero-agent/README.md
git commit -m "Update docs for ${{ env.NEW_VERSION }}"
git push origin gh-pages
continue-on-error: true


# Step 5: Create GitHub Release
- name: Create Release
uses: softprops/action-gh-release@v2
Expand All @@ -133,4 +134,4 @@ jobs:
files: .deploy/cloudzero-agent-${{ env.NEW_VERSION }}.tgz
make_latest: false
target_commitish: ${{ env.COMMIT_HASH }}
body_path: ${{ github.workspace }}/docs/releases/${{ env.NEW_VERSION }}.md
body_path: ${{ github.workspace }}/charts/cloudzero-agent/docs/releases/${{ env.NEW_VERSION }}.md
3 changes: 1 addition & 2 deletions .github/workflows/build-and-publish-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,5 +136,4 @@ jobs:
files: cloudzero-agent-${{ env.NEW_VERSION }}.tgz
make_latest: true
target_commitish: ${{ env.COMMIT_HASH }}
body_path: ${{ github.workspace }}/charts/cloudzero-agent/docs/releases/${{ env.NEW_VERSION }}.md

body_path: ${{ github.workspace }}/charts/cloudzero-agent/docs/releases/${{ env.NEW_VERSION }}.md
9 changes: 7 additions & 2 deletions .github/workflows/test-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
env:
# Agent Chart settings (prom repo is to work around issue with chart-testing tool)
PROM_CHART_REPO: https://prometheus-community.github.io/helm-charts
CZ_CHART_REPO: https://cloudzero.github.io/cloudzero-charts
CZ_CHART_BETA_REPO: https://cloudzero.github.io/cloudzero-charts/beta
CLUSTER_NAME: cz-node-agent-ci
CLOUD_ACCOUNT_ID: '00000000'
CZ_API_TOKEN: 'fake-api-token'
Expand Down Expand Up @@ -107,11 +109,13 @@ jobs:
NAMESPACE: monitoring
# Agent Chart settings (prom repo is to work around issue with chart-testing tool)
PROM_CHART_REPO: https://prometheus-community.github.io/helm-charts
CZ_CHART_REPO: https://cloudzero.github.io/cloudzero-charts
CZ_CHART_BETA_REPO: https://cloudzero.github.io/cloudzero-charts/beta
CLUSTER_NAME: cz-node-agent-ci
CLOUD_ACCOUNT_ID: '00000000'
CZ_API_TOKEN: ${{ secrets.CZ_API_TOKEN || 'fake-api-token' }}
REGION: 'us-east-1'
run: |
run: |
kubectl create namespace $NAMESPACE
kubectl create secret -n $NAMESPACE generic api-token --from-literal=value=$CZ_API_TOKEN
cd charts/cloudzero-agent
Expand All @@ -121,7 +125,8 @@ jobs:
--namespace $NAMESPACE \
--helm-extra-set-args "\
--set=existingSecretName=api-token \
--set=host=dev-api.cloudzero.com \
--set=clusterName=$CLUSTER_NAME \
--set=cloudAccountId=$CLOUD_ACCOUNT_ID \
--set=region=$REGION \
--set=kube-state-metrics.enabled=true"
"
20 changes: 3 additions & 17 deletions charts/cloudzero-agent/BETA-INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,7 @@ There are two ways to install a beta version of the chart:
This method installs the latest beta version available.

```sh
helm install <RELEASE_NAME> cloudzero-beta/cloudzero-agent \
--devel \
--set existingSecretName=<NAME_OF_SECRET> \
--set clusterName=<CLUSTER_NAME> \
--set-string cloudAccountId=<CLOUD_ACCOUNT_ID> \
--set region=<REGION> \
--set kube-state-metrics.enabled=<true|false> \
--create-namespace
helm install <RELEASE_NAME> cloudzero-beta/cloudzero-agent -n <NAMESPACE> --create-namespace -f configuration.example.yaml --devel
```

- The `--devel` flag allows Helm to consider beta versions when resolving the chart version.
Expand All @@ -57,17 +50,10 @@ helm install <RELEASE_NAME> cloudzero-beta/cloudzero-agent \
If you want to install a specific beta version, specify it using the `--version` flag:

```sh
helm install <RELEASE_NAME> cloudzero-beta/cloudzero-agent \
--version <CHART_VERSION> \
--set existingSecretName=<NAME_OF_SECRET> \
--set clusterName=<CLUSTER_NAME> \
--set-string cloudAccountId=<CLOUD_ACCOUNT_ID> \
--set region=<REGION> \
--set kube-state-metrics.enabled=<true|false> \
--create-namespace
helm install <RELEASE_NAME> cloudzero-beta/cloudzero-agent -n <NAMESPACE> --create-namespace -f configuration.example.yaml --version <CHART_VERSION>
```

- Replace `<CHART_VERSION>` with the specific beta version (e.g., `0.0.29-beta`).
- Replace `<CHART_VERSION>` with the specific beta version (e.g., `1.0.0-beta`).
- This method does not require the `--devel` flag since you are explicitly specifying the version.

## Listing All Available Versions
Expand Down
5 changes: 3 additions & 2 deletions charts/cloudzero-agent/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ dependencies:
- name: kube-state-metrics
repository: https://prometheus-community.github.io/helm-charts
version: 5.15.3
digest: sha256:46007169320c037bcfd18a07acf3ad859c455ef2d01f5bf281bfeadbdf4502e6
generated: "2024-11-19T14:07:51.973517-05:00"
digest: sha256:eb6b05c226ee0bd8f052108e96efad345fad4deb7f0ec8e60d3de07db965aba0
generated: "2025-01-03T14:08:10.43341-05:00"

5 changes: 3 additions & 2 deletions charts/cloudzero-agent/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: cloudzero-agent
description: A chart for using Prometheus in agent mode to send cluster metrics to the CloudZero platform.
type: application
version: 0.0.0-dev
version: 1.0.0-dev
maintainers:
- name: CloudZero
email: [email protected]
Expand All @@ -11,4 +11,5 @@ dependencies:
- name: kube-state-metrics
version: "5.15.*"
repository: https://prometheus-community.github.io/helm-charts
condition: kube-state-metrics.enabled
condition: kubeStateMetrics.enabled
alias: kubeStateMetrics
Loading

0 comments on commit 80cb347

Please sign in to comment.