Skip to content

Commit

Permalink
upgrade argo-events
Browse files Browse the repository at this point in the history
  • Loading branch information
kim-codefresh committed Jul 28, 2024
2 parents db0f57b + f9a1b4c commit 0cb0475
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 43 deletions.
22 changes: 22 additions & 0 deletions .github/configs/codefresh-k8s.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Codefresh specific objects that are required for chart insllation to pass
apiVersion: v1
data:
base-url: https://g.codefresh.io
runtime: |
apiVersion: codefresh.io/v1alpha1
kind: Runtime
metadata:
name: test
spec:
test: test
kind: ConfigMap
metadata:
name: codefresh-cm
---
apiVersion: v1
kind: Secret
metadata:
name: codefresh-token
type: Opaque
stringData:
token: "612312312356677888855.612312312356677888855"
2 changes: 1 addition & 1 deletion .github/configs/ct-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Don't add the 'debug' attribute, otherwise the workflow won't work anymore
# Only Used for the CT Install Stage
remote: origin
target-branch: main
namespace: events
chart-dirs:
- charts
chart-repos:
Expand Down
1 change: 0 additions & 1 deletion .github/configs/ct-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Don't add the 'debug' attribute, otherwise the workflow won't work anymore
# Only Used for the CT Lint Stage
remote: origin
target-branch: main
chart-dirs:
- charts
chart-repos:
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ jobs:
id: list-changed
run: |
## If executed with debug this won't work anymore.
changed=$(ct --config ./.github/configs/ct-lint.yaml list-changed)
changed=$(ct --config ./.github/configs/ct-lint.yaml --target-branch ${{ github.base_ref }} list-changed)
charts=$(echo "$changed" | tr '\n' ' ' | xargs)
if [[ -n "$changed" ]]; then
echo "changed=true" >> $GITHUB_OUTPUT
echo "changed_charts=$charts" >> $GITHUB_OUTPUT
fi
- name: Run chart-testing (lint)
run: ct lint --debug --config ./.github/configs/ct-lint.yaml --lint-conf ./.github/configs/lintconf.yaml
run: ct lint --debug --config ./.github/configs/ct-lint.yaml --target-branch ${{ github.base_ref }} --lint-conf ./.github/configs/lintconf.yaml

- name: Run docs-testing (helm-docs)
id: helm-docs
Expand All @@ -68,13 +68,12 @@ jobs:
else
echo -e '\033[0;32mDocumentation up to date\033[0m ✔'
fi
- name: Create kind cluster
uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0
if: steps.list-changed.outputs.changed == 'true'
with:
config: .github/configs/kind-config.yaml

- name: Deploy latest ArgoCD CRDs when testing ArgoCD extensions
if: |
contains(steps.list-changed.outputs.changed_charts, 'argocd-image-updater') ||
Expand All @@ -90,13 +89,17 @@ jobs:
## Metrics API not available in kind cluster
rm charts/argo-cd/ci/ha-autoscaling-values.yaml
- name: Deploy codefresh specific API Objects
run: |
kubectl create ns ${{ github.base_ref }}
kubectl -n ${{ github.base_ref }} apply -f .github/configs/codefresh-k8s.yaml
- name: Create an external redis for ArgoCD externalRedis feature
if: contains(steps.list-changed.outputs.changed_charts, 'argo-cd')
run: |
kubectl create namespace redis
helm repo add bitnami https://charts.bitnami.com/bitnami
helm install redis bitnami/redis --wait --namespace redis --set auth.password=argocd --set architecture=standalone
- name: Run chart-testing (install)
run: ct install --config ./.github/configs/ct-install.yaml
if: steps.list-changed.outputs.changed == 'true'
run: ct install --config ./.github/configs/ct-install.yaml --target-branch ${{ github.base_ref }} --namespace ${{ github.base_ref }}
if: steps.list-changed.outputs.changed == 'true'
18 changes: 12 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ name: Chart Publish
on:
push:
branches:
- main
paths:
- "charts/**"
- argo-events

permissions:
contents: read
Expand All @@ -31,7 +29,6 @@ jobs:
- name: Add dependency chart repos
run: |
helm repo add dandydeveloper https://dandydeveloper.github.io/charts/
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
Expand All @@ -41,6 +38,12 @@ jobs:
- name: Fetch current Chart Index
run: |
git checkout origin/gh-pages index.yaml
- name: Package chart
run: |
rm -rf .cr-release-packages
mkdir .cr-release-packages
helm package charts/argo-events -u -d .cr-release-packages/
# The GitHub repository secret `PGP_PRIVATE_KEY` contains the private key
# in ASCII-armored format. To export a (new) key, run this command:
Expand All @@ -59,9 +62,12 @@ jobs:
PGP_PASSPHRASE: "${{ secrets.PGP_PASSPHRASE }}"

- name: Run chart-releaser
uses: helm/chart-releaser-action@a917fd15b20e8b64b94d9158ad54cd6345335584 # v1.6.0
# todo: change later to v1.6.0 (also in agro-rollouts chart)
# issue: https://github.com/helm/chart-releaser-action/issues/171
uses: helm/chart-releaser-action@be16258da8010256c6e82849661221415f031968 # v1.5.0
with:
config: "./.github/configs/cr.yaml"
skip_packaging: true
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

Expand All @@ -80,4 +86,4 @@ jobs:
break
fi
helm push "${pkg}" oci://ghcr.io/${{ github.repository }}
done
done
4 changes: 2 additions & 2 deletions charts/argo-events/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
appVersion: v1.9.2
appVersion: v1.9.2-cap-CR-24607
description: A Helm chart for Argo Events, the event-driven workflow automation framework
name: argo-events
version: 2.4.7
version: 2.4.7-cap-CR-24607
home: https://github.com/argoproj/argo-helm
icon: https://avatars.githubusercontent.com/u/30269780?s=200&v=4
keywords:
Expand Down
22 changes: 13 additions & 9 deletions charts/argo-events/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ Some users would prefer to install the CRDs _outside_ of the chart. You can disa

You can install the CRDs manually from `templates/crds` folder.

### 2.4.*

At github events source githubUploadURL is required when githubBaseURL is set

### 2.0.*

Custom resource definitions were moved to `templates` folder so they can be managed by Helm.
Expand All @@ -58,13 +62,13 @@ done

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| configs.jetstream.settings.maxFileStore | int | `-1` | Maximum size of the file storage (e.g. 20G) |
| configs.jetstream.settings.maxMemoryStore | int | `-1` | Maximum size of the memory storage (e.g. 1G) |
| configs.jetstream.streamConfig.duplicates | string | `"300s"` | Not documented at the moment |
| configs.jetstream.streamConfig.maxAge | string | `"72h"` | Maximum age of existing messages, i.e. “72h”, “4h35m” |
| configs.jetstream.streamConfig.maxBytes | string | `"1GB"` | |
| configs.jetstream.streamConfig.maxMsgs | int | `1000000` | Maximum number of messages before expiring oldest message |
| configs.jetstream.streamConfig.replicas | int | `3` | Number of replicas, defaults to 3 and requires minimal 3 |
| configs.jetstream.settings.max_file_store | string | `"1TB"` | |
| configs.jetstream.settings.max_memory_store | int | `-1` | |
| configs.jetstream.streamConfig.duplicates | string | `"300s"` | |
| configs.jetstream.streamConfig.maxAge | string | `"168h"` | |
| configs.jetstream.streamConfig.maxBytes | int | `-1` | |
| configs.jetstream.streamConfig.maxMsgs | int | `50000` | |
| configs.jetstream.streamConfig.replicas | int | `3` | |
| configs.jetstream.versions[0].configReloaderImage | string | `"natsio/nats-server-config-reloader:0.14.0"` | |
| configs.jetstream.versions[0].metricsExporterImage | string | `"natsio/prometheus-nats-exporter:0.14.0"` | |
| configs.jetstream.versions[0].natsImage | string | `"nats:2.10.10"` | |
Expand Down Expand Up @@ -120,7 +124,7 @@ done
| global.additionalLabels | object | `{}` | Additional labels to add to all resources |
| global.hostAliases | list | `[]` | Mapping between IP and hostnames that will be injected as entries in the pod's hosts files |
| global.image.imagePullPolicy | string | `"IfNotPresent"` | If defined, a imagePullPolicy applied to all Argo Events deployments |
| global.image.repository | string | `"quay.io/argoproj/argo-events"` | If defined, a repository applied to all Argo Events deployments |
| global.image.repository | string | `"quay.io/codefresh/argo-events"` | If defined, a repository applied to all Argo Events deployments |
| global.image.tag | string | `""` | Overrides the global Argo Events image tag whose default is the chart appVersion |
| global.imagePullSecrets | list | `[]` | If defined, uses a Secret to pull an image from a private Docker registry or repository |
| global.podAnnotations | object | `{}` | Annotations for the all deployed pods |
Expand Down Expand Up @@ -193,7 +197,7 @@ done
|-----|------|---------|-------------|
| webhook.affinity | object | `{}` | Assign custom [affinity] rules to the deployment |
| webhook.containerSecurityContext | object | `{}` | Event controller container-level security context |
| webhook.enabled | bool | `false` | Enable admission webhook. Applies only for cluster-wide installation |
| webhook.enabled | bool | `true` | Enable admission webhook. Applies only for cluster-wide installation |
| webhook.env | list | `[]` (See [values.yaml]) | Environment variables to pass to event controller |
| webhook.envFrom | list | `[]` (See [values.yaml]) | envFrom to pass to event controller |
| webhook.image.imagePullPolicy | string | `""` (defaults to global.image.imagePullPolicy) | Image pull policy for the event controller |
Expand Down
4 changes: 4 additions & 0 deletions charts/argo-events/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ Some users would prefer to install the CRDs _outside_ of the chart. You can disa

You can install the CRDs manually from `templates/crds` folder.

### 2.4.*

At github events source githubUploadURL is required when githubBaseURL is set

### 2.0.*

Custom resource definitions were moved to `templates` folder so they can be managed by Helm.
Expand Down
24 changes: 7 additions & 17 deletions charts/argo-events/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ crds:
global:
image:
# -- If defined, a repository applied to all Argo Events deployments
repository: quay.io/argoproj/argo-events
repository: quay.io/codefresh/argo-events
# -- Overrides the global Argo Events image tag whose default is the chart appVersion
tag: ""
# -- If defined, a imagePullPolicy applied to all Argo Events deployments
Expand Down Expand Up @@ -76,25 +76,15 @@ configs:

## JetStream event bus
jetstream:
# Default JetStream settings, could be overridden by EventBus JetStream spec
# Ref: https://docs.nats.io/running-a-nats-service/configuration#jetstream
settings:
# -- Maximum size of the memory storage (e.g. 1G)
maxMemoryStore: -1
# -- Maximum size of the file storage (e.g. 20G)
maxFileStore: -1
max_memory_store: -1
max_file_store: 1TB
streamConfig:
# -- Maximum number of messages before expiring oldest message
maxMsgs: 1000000
# -- Maximum age of existing messages, i.e. “72h”, “4h35m”
maxAge: 72h
# Total size of messages before expiring oldest message, 0 means unlimited.
maxBytes: 1GB
# -- Number of replicas, defaults to 3 and requires minimal 3
maxMsgs: 50000
maxAge: 168h
maxBytes: -1
replicas: 3
# -- Not documented at the moment
duplicates: 300s
# Supported versions of JetStream eventbus
versions:
- version: latest
natsImage: nats:2.10.10
Expand Down Expand Up @@ -343,7 +333,7 @@ controller:
## Argo Events admission webhook
webhook:
# -- Enable admission webhook. Applies only for cluster-wide installation
enabled: false
enabled: true

# -- Argo Events admission webhook name string
name: events-webhook
Expand Down

0 comments on commit 0cb0475

Please sign in to comment.