Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/helm-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,23 @@ jobs:
RELEASE_NAME: openops
NAMESPACE: openops
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7.0.1

- name: Set up Helm
uses: azure/setup-helm@v4
uses: azure/setup-helm@v5.0.1
with:
version: v3.14.4

- name: Cache Docker images
uses: actions/cache@v4
uses: actions/cache@v6.1.0
with:
path: /var/lib/docker
key: docker-${{ runner.os }}-${{ hashFiles('chart/values.yaml', 'chart/values.ci.yaml') }}
restore-keys: |
docker-${{ runner.os }}-

- name: Create kind cluster
uses: helm/kind-action@v1.9.0
uses: helm/kind-action@v1.15.0
with:
cluster_name: openops-e2e
wait: 180s
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/helm-validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v7.0.1

- name: Set up Helm
uses: azure/setup-helm@v4
uses: azure/setup-helm@v5.0.1
with:
version: v3.14.4

Expand Down
39 changes: 25 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,20 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
# The release identity's federated credentials are scoped to this environment rather than to
# a branch, so a release runs from any branch - and the environment is where an approval gate
# for publishing to the public registry belongs. Without it the OIDC subject does not match.
environment: release
env:
CHART_VERSION: ${{ inputs.draft && format('{0}-draft', inputs.version) || inputs.version }}
APP_VERSION: ${{ inputs.version }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v7.0.1

- name: Set up Helm
uses: azure/setup-helm@v4
uses: azure/setup-helm@v5.0.1
with:
version: v3.14.4

Expand All @@ -54,23 +59,29 @@ jobs:
chart_package=$(printf '%s\n' "$pkg_output" | awk '/Successfully packaged chart and saved it to:/ {print $NF}')
echo "CHART_PACKAGE=$chart_package" >> "$GITHUB_ENV"

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
- name: Azure login
uses: azure/login@7ddb5af1ef8758cf1353cf3b42f940aee27ba21c # v3.0.2
with:
aws-access-key-id: ${{ secrets.ECR_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.ECR_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.ECR_PUBLIC_REGION }}
client-id: ${{ secrets.AZURE_ACR_RELEASE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}

- name: Push chart to public ECR
- name: Push chart to the public ACR
env:
ACR_PUBLIC_NAME: ${{ vars.ACR_PUBLIC_NAME }}
ACR_PUBLIC_LOGIN_SERVER: ${{ vars.ACR_PUBLIC_LOGIN_SERVER }}
run: |
set -euo pipefail
aws ecr-public get-login-password --region ${{ vars.ECR_PUBLIC_REGION }} \
| helm registry login --username AWS --password-stdin public.ecr.aws
helm push "$CHART_PACKAGE" oci://public.ecr.aws/openops/helm
echo "- ✅ Pushed \`oci://public.ecr.aws/openops/helm/openops:${CHART_VERSION}\`" >> $GITHUB_STEP_SUMMARY
# --expose-token rather than plain `az acr login`: that writes Docker's credential
# store, which helm does not read. helm wants its own registry login.
TOKEN=$(az acr login --name "$ACR_PUBLIC_NAME" --expose-token --output tsv --query accessToken)
helm registry login "$ACR_PUBLIC_LOGIN_SERVER" \
--username 00000000-0000-0000-0000-000000000000 --password-stdin <<<"$TOKEN"
helm push "$CHART_PACKAGE" "oci://$ACR_PUBLIC_LOGIN_SERVER/helm"
echo "- ✅ Pushed \`oci://$ACR_PUBLIC_LOGIN_SERVER/helm/openops:${CHART_VERSION}\`" >> $GITHUB_STEP_SUMMARY

- name: Create GitHub release
uses: softprops/action-gh-release@v2
uses: softprops/action-gh-release@v3.0.3
with:
target_commitish: ${{ github.sha }}
tag_name: ${{ env.CHART_VERSION }}
Expand All @@ -91,5 +102,5 @@ jobs:
echo "" >> $GITHUB_STEP_SUMMARY
echo "Install with:" >> $GITHUB_STEP_SUMMARY
echo '```bash' >> $GITHUB_STEP_SUMMARY
echo "helm install openops oci://public.ecr.aws/openops/helm/openops --version $CHART_VERSION" >> $GITHUB_STEP_SUMMARY
echo "helm install openops oci://${{ vars.ACR_PUBLIC_LOGIN_SERVER }}/helm/openops --version $CHART_VERSION" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
10 changes: 5 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,21 @@
- **Validation helpers**: Runtime validation of required secrets (OPS_ENCRYPTION_KEY, OPS_JWT_SECRET, etc.) with helpful error messages at render time.

## Release workflow
- **`.github/workflows/release.yml`**: Packages the Helm chart and pushes it as an OCI artifact to `public.ecr.aws/openops/helm/openops`.
- **`.github/workflows/release.yml`**: Packages the Helm chart and pushes it as an OCI artifact to `openops.azurecr.io/helm/openops`.
- Triggered via `workflow_dispatch` with two inputs:
- `version` (required): The release version (e.g., `0.6.15`). Sets both `Chart.yaml` version/appVersion and `global.version` (image tags).
- `draft` (boolean, default `true`): When true, appends `-draft` to the chart version (e.g., `0.6.15-draft`). Draft versions are overwritable on ECR; final versions are immutable.
- `draft` (boolean, default `true`): When true, appends `-draft` to the chart version (e.g., `0.6.15-draft`). The suffix is a naming convention only - ACR does not enforce tag immutability unless it is configured on the registry, so a final version can be overwritten by a later push of the same version.
- Also triggered cross-repo by `openops-cloud/openops` release workflow.
- Creates a GitHub release (draft or published) with the packaged `.tgz` as an asset.
- **Do not bump versions in `Chart.yaml` or `values.yaml` manually**—the release workflow sets them at build time. The repo defaults are `version: 0.0.1-dev` and `appVersion: 0.0.1-dev`.
- Required secrets: `ECR_ACCESS_KEY_ID`, `ECR_SECRET_ACCESS_KEY`; required vars: `ECR_PUBLIC_REGION`.
- Authenticates with GitHub OIDC. Required secrets: `AZURE_ACR_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_SUBSCRIPTION_ID`; required vars: `ACR_PUBLIC_NAME`, `ACR_PUBLIC_LOGIN_SERVER`.

## Versioning strategy
- All *release* versions are unified: chart version = appVersion = `global.version` (image tags) = OpenOps release version. The in-repo development defaults (`0.0.1-dev`) are normalized by the release workflow.
- Exception: draft releases use `{version}-draft` for the chart version only; `appVersion` and image tags use the clean version.
- The chart is published to `oci://public.ecr.aws/openops/helm/openops`. Users install with:
- The chart is published to `oci://openops.azurecr.io/helm/openops`. Users install with:
```
helm install openops oci://public.ecr.aws/openops/helm/openops --version <VERSION>
helm install openops oci://openops.azurecr.io/helm/openops --version <VERSION>
```

## PR lint rules
Expand Down
35 changes: 10 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ This repository contains the Helm chart that deploys the OpenOps application sta
### Install from OCI registry (recommended)

```bash
helm install openops oci://public.ecr.aws/openops/helm/openops \
helm install openops oci://openops.azurecr.io/helm/openops \
--version <VERSION> \
-n openops --create-namespace \
-f values.overrides.yaml
Expand Down Expand Up @@ -315,38 +315,23 @@ kubectl create secret tls openops-tls \
## Dependencies
The deployments include health checks and readiness probes so dependent services wait until their prerequisites are available.

## Private ECR access from non-AWS clusters
## Pulling from a private registry

When deploying on AKS or other non-AWS Kubernetes clusters that need to pull images from a private ECR registry, enable the ECR credential refresh CronJob:
Release images need no credentials. `openops.azurecr.io` allows anonymous pull, so a default
install authenticates to nothing.

If you mirror the images into a registry of your own, create a pull secret by whatever means
that registry expects and reference it:

```yaml
global:
imagePullSecrets:
- ecr-pull-secret

ecrCredentialRefresh:
enabled: true
registry: "<registry>"
awsRegion: "us-east-2"
awsSecretName: "ecr-credentials" # K8s secret with AWS access keys
imagePullSecretName: "ecr-pull-secret" # Created/refreshed automatically
```
- my-registry-credentials

**Pre-requisite:** Create the AWS credentials secret (one-time):
```bash
kubectl create secret generic ecr-credentials \
-n openops \
--from-literal=AWS_ACCESS_KEY_ID=<YOUR_ECR_ACCESS_KEY_ID> \
--from-literal=AWS_SECRET_ACCESS_KEY=<YOUR_ECR_SECRET_ACCESS_KEY>
image:
repository: my-registry.example.com/openops
```

The IAM user needs only `ecr:GetAuthorizationToken`, `ecr:BatchGetImage`, and `ecr:GetDownloadUrlForLayer` permissions.

**How it works:**
- A Helm post-install/post-upgrade hook creates the pull secret immediately on deploy
- A CronJob refreshes the ECR token every 6 hours (tokens expire after 12h)
- All deployments reference the pull secret via `global.imagePullSecrets`

## Analytics (Superset) configuration override

The analytics component is based on Apache Superset. To override its Python configuration (e.g., for Redis SSL/auth), use `analytics.configOverride`:
Expand Down
2 changes: 1 addition & 1 deletion chart/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Useful commands:
helm test {{ .Release.Name }} -n {{ .Release.Namespace }}

# Upgrade deployment
helm upgrade {{ .Release.Name }} oci://public.ecr.aws/openops/helm/{{ .Chart.Name }} --version {{ .Chart.Version }} -n {{ .Release.Namespace }} -f values.overrides.yaml
helm upgrade {{ .Release.Name }} oci://openops.azurecr.io/helm/{{ .Chart.Name }} --version {{ .Chart.Version }} -n {{ .Release.Namespace }} -f values.overrides.yaml

# Uninstall
helm uninstall {{ .Release.Name }} -n {{ .Release.Namespace }}
184 changes: 0 additions & 184 deletions chart/templates/cronjob-ecr-credential-refresh.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion chart/values.ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Includes test secrets - NOT FOR PRODUCTION

global:
# Use latest published images for CI (repo default 0.0.1-dev does not exist in ECR)
# Use latest published images for CI (repo default 0.0.1-dev is never published)
version: "latest"

# Allow single replica for CI
Expand Down
Loading
Loading