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
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @lockwobr @mskalka @ayuskauskas
* @lockwobr @mskalka @ayuskauskas @riceriley59
112 changes: 84 additions & 28 deletions docs/release-process.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,111 @@
# Skyhook Release Process

Step-by-step process for releasing Skyhook components (operator, agent, chart).
Step-by-step process for releasing Skyhook components using **release branches**.

## Release Workflow
## Release Branch Strategy

### Operator Release
Skyhook uses **release branches** (`release/v{MAJOR.MINOR}.x`) to manage integrated releases and patches.

**Key Principles:**
- **Operator-centric**: Most releases are driven by operator features and bug fixes
- **Agent follows**: Agent changes typically only require chart patch releases
- **Chart coordinates**: Chart version tracks the overall release and defines compatibility

### Major/Minor Release Workflow

```bash
# 1. Test thoroughly, merge all PRs to main
# 2. Tag and push
# 1. Complete development on main
git checkout main && git pull origin main
git tag operator/v1.2.3
git push origin operator/v1.2.3
# Ensure all features/fixes are merged and tested

# 2. Create release branch
git checkout -b release/v0.9.x
git push origin release/v0.9.x

# 3. Update chart with final versions
# Edit chart/Chart.yaml:
version: v0.9.0 # Chart version
appVersion: v0.9.0 # Recommended operator version

git add chart/Chart.yaml
git commit -m "release: prepare v0.9.0"
git push origin release/v0.9.x

# 4. Tag all components that changed
git tag operator/v0.9.0 # Operator drives the release
git tag agent/v6.4.0 # Only if agent changed (often reuses previous version)
git tag chart/v0.9.0 # Chart always gets tagged
git push origin operator/v0.9.0 chart/v0.9.0 # Push operator + chart (add agent tag if needed)
```

**Automated:** Tests → Multi-platform build → Publish to ghcr.io + nvcr.io → Attestations
**Automated:** Tests → Multi-platform build → Publish to ghcr.io + nvcr.io + NGC

### Agent Release
### Patch Release Workflow

```bash
# 1. Test agent compatibility, merge all PRs to main
# 2. Tag and push
git checkout main && git pull origin main
git tag agent/v1.2.3
git push origin agent/v1.2.3
# 1. Work on release branch
git checkout release/v0.9.x
git pull origin release/v0.9.x

# 2. Apply fixes (backport from main or develop directly)
# ... make changes to operator, agent, or chart
git add .
git commit -m "fix: critical security issue"

# 3. Update chart version if needed
# Edit chart/Chart.yaml:
version: v0.9.1 # Increment patch version
appVersion: v0.9.1 # Update if operator changed

# 4. Tag only what changed
git tag operator/v0.9.1 # If operator changed
git tag agent/v6.4.1 # Only if agent changed (rare)
git tag chart/v0.9.1 # Chart always gets tagged for releases
git push origin operator/v0.9.1 chart/v0.9.1 # Usually just operator + chart
```

### Agent-Only Changes

```bash
# Agent changes typically don't require new release branches
git checkout release/v0.9.x # Work on existing release branch
# ... fix agent issue
git tag agent/v6.4.1 # New agent version
git tag chart/v0.9.1 # Patch chart to reference new agent
git push origin agent/v6.4.1 chart/v0.9.1
```

**Automated:** Tests → Multi-platform build → Publish to ghcr.io + nvcr.io
### Legacy: Individual Component Releases (Deprecated)

### Chart Release
*The following workflows are deprecated in favor of the release branch strategy above.*

<details>
<summary>Click to expand legacy workflows</summary>

#### Operator Release (Legacy)
```bash
# 1. Update Chart.yaml versions
# chart/Chart.yaml
version: v1.2.3 # Chart version
appVersion: v0.8.0 # Recommended operator version
git checkout main && git pull origin main
git tag operator/v1.2.3
git push origin operator/v1.2.3
```

# 2. Create PR and merge
git checkout -b release/chart-v1.2.3
git add chart/Chart.yaml
git commit -m "chart: bump version to v1.2.3"
git push origin release/chart-v1.2.3
# Review and merge PR
#### Agent Release (Legacy)
```bash
git checkout main && git pull origin main
git tag agent/v1.2.3
git push origin agent/v1.2.3
```

# 3. Tag after merge
#### Chart Release (Legacy)
```bash
git checkout -b release/chart-v1.2.3
# Update Chart.yaml, create PR, merge
git checkout main && git pull origin main
git tag chart/v1.2.3
git push origin chart/v1.2.3
```

**Automated:** Package Helm chart → Publish to chart repository (when implemented)
</details>

## Release Checklist

Expand Down
38 changes: 38 additions & 0 deletions docs/versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,41 @@ image:
image: "ghcr.io/nvidia/skyhook/operator:0.7.0"
```

## Release Branching Strategy

Skyhook uses **release branches** to manage patches and maintenance releases:

```bash
release/v0.8.x # Contains operator v0.8.0 + agent v6.3.0 + chart v0.8.x
release/v0.9.x # Contains operator v0.9.0 + (agent v6.3.0*) + chart v0.9.x
```
*Agent versions may not change every release - operator drives the release cycle

### Why Release Branches:
- **Operator-centric releases** - most releases are driven by operator features and bugs
- **Chart defines compatibility** - each branch contains a tested, compatible set of all components
- **Agent follows operator** - agent changes typically only require chart patch releases
- **Simplified patches** - fix bugs in the context of the full integrated system
- **Connected git history** - preserves relationships between operator, agent, and chart changes

### Branch Workflow:
1. **Main development** happens on `main` branch
2. **Release preparation** creates `release/v{MAJOR.MINOR}.x` branch (typically driven by operator changes)
3. **Patch releases** are developed and tagged from release branches
4. **Agent-only changes** usually result in chart patch releases (no new release branch)
5. **Critical fixes** may be backported from `main` to release branches

## Go Module Support

The operator supports Go module imports for external projects:

```bash
# External projects can import the operator
go get github.com/NVIDIA/skyhook/operator@v0.8.0
```

**Module mapping**: Tag `operator/v0.8.0` maps to module `github.com/NVIDIA/skyhook/operator@v0.8.0`

## Quick Reference

```bash
Expand All @@ -56,6 +91,9 @@ helm list -n skyhook

# Override operator version
helm install skyhook ./chart --set controllerManager.manager.image.tag="0.8.0"

# Check release branches
git branch -r | grep release/
```

## Release Process
Expand Down
6 changes: 3 additions & 3 deletions operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ GIT_SHA := $(shell git rev-parse --short HEAD)
GIT_TAG_LAST := $(shell git tag --list 'operator*' --sort=-v:refname | head -n 1 | cut -d/ -f2)

## GO Flags
GO_LDFLAGS := -ldflags "-X github.com/NVIDIA/skyhook/internal/version.GIT_SHA=$(GIT_SHA) \
-X github.com/NVIDIA/skyhook/internal/version.VERSION=$(VERSION)"
GO_LDFLAGS := -ldflags "-X github.com/NVIDIA/skyhook/operator/internal/version.GIT_SHA=$(GIT_SHA) \
-X github.com/NVIDIA/skyhook/operator/internal/version.VERSION=$(VERSION)"
GOFLAGS := -mod=vendor

# DOCKER_CMD defines the container tool to be used for building images.
Expand Down Expand Up @@ -230,7 +230,7 @@ merge-coverage:
echo "mode: set" > $(REPORTING)/cover.out
## skip first line with +2
tail -n +2 $(REPORTING)/temp-cover.out | sed '/mode: set/d' >> $(REPORTING)/cover.out
$(sedrp) 's|^/.*skyhook/operator/(.*)$$|github\.com/NVIDIA/skyhook/\1|g' $(REPORTING)/cover.out
$(sedrp) 's|^/.*skyhook/operator/(.*)$$|github\.com/NVIDIA/skyhook/operator/\1|g' $(REPORTING)/cover.out

.PHONY: lint
lint: golangci-lint license-check ## Run golangci-lint linter & yamllint
Expand Down
2 changes: 1 addition & 1 deletion operator/api/v1alpha1/skyhook_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"sort"
"strings"

"github.com/NVIDIA/skyhook/internal/graph"
"github.com/NVIDIA/skyhook/operator/internal/graph"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
4 changes: 2 additions & 2 deletions operator/api/v1alpha1/skyhook_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"regexp"
"strings"

"github.com/NVIDIA/skyhook/internal/graph"
semver "github.com/NVIDIA/skyhook/internal/version"
"github.com/NVIDIA/skyhook/operator/internal/graph"
semver "github.com/NVIDIA/skyhook/operator/internal/version"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
ctrl "sigs.k8s.io/controller-runtime"
Expand Down
6 changes: 3 additions & 3 deletions operator/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ import (
kzap "sigs.k8s.io/controller-runtime/pkg/log/zap"
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"

"github.com/NVIDIA/skyhook/api/v1alpha1"
"github.com/NVIDIA/skyhook/internal/controller"
"github.com/NVIDIA/skyhook/internal/version"
"github.com/NVIDIA/skyhook/operator/api/v1alpha1"
"github.com/NVIDIA/skyhook/operator/internal/controller"
"github.com/NVIDIA/skyhook/operator/internal/version"
"sigs.k8s.io/controller-runtime/pkg/webhook"
//+kubebuilder:scaffold:imports
)
Expand Down
2 changes: 1 addition & 1 deletion operator/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/NVIDIA/skyhook
module github.com/NVIDIA/skyhook/operator

go 1.24.0

Expand Down
2 changes: 1 addition & 1 deletion operator/internal/controller/annotations.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"encoding/json"
"fmt"

"github.com/NVIDIA/skyhook/api/v1alpha1"
"github.com/NVIDIA/skyhook/operator/api/v1alpha1"
corev1 "k8s.io/api/core/v1"
)

Expand Down
2 changes: 1 addition & 1 deletion operator/internal/controller/cert_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"path/filepath"
"time"

"github.com/NVIDIA/skyhook/api/v1alpha1"
"github.com/NVIDIA/skyhook/operator/api/v1alpha1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
Expand Down
6 changes: 3 additions & 3 deletions operator/internal/controller/cluster_state_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import (
"strings"
"time"

"github.com/NVIDIA/skyhook/api/v1alpha1"
"github.com/NVIDIA/skyhook/internal/version"
"github.com/NVIDIA/skyhook/internal/wrapper"
"github.com/NVIDIA/skyhook/operator/api/v1alpha1"
"github.com/NVIDIA/skyhook/operator/internal/version"
"github.com/NVIDIA/skyhook/operator/internal/wrapper"
"github.com/go-logr/logr"
"sigs.k8s.io/controller-runtime/pkg/client"

Expand Down
6 changes: 3 additions & 3 deletions operator/internal/controller/cluster_state_v2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"github.com/NVIDIA/skyhook/api/v1alpha1"
skyhookNodesMock "github.com/NVIDIA/skyhook/internal/controller/mock"
"github.com/NVIDIA/skyhook/internal/wrapper"
"github.com/NVIDIA/skyhook/operator/api/v1alpha1"
skyhookNodesMock "github.com/NVIDIA/skyhook/operator/internal/controller/mock"
"github.com/NVIDIA/skyhook/operator/internal/wrapper"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
Expand Down
4 changes: 2 additions & 2 deletions operator/internal/controller/event_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ package controller
import (
"context"

"github.com/NVIDIA/skyhook/api/v1alpha1"
"github.com/NVIDIA/skyhook/internal/dal"
"github.com/NVIDIA/skyhook/operator/api/v1alpha1"
"github.com/NVIDIA/skyhook/operator/internal/dal"
"github.com/go-logr/logr"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/event"
Expand Down
10 changes: 5 additions & 5 deletions operator/internal/controller/event_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ import (
. "github.com/onsi/ginkgo/v2"

// . "github.com/onsi/gomega"
"github.com/NVIDIA/skyhook/api/v1alpha1"
"github.com/NVIDIA/skyhook/internal/dal"
dalmock "github.com/NVIDIA/skyhook/internal/dal/mock"
MockClient "github.com/NVIDIA/skyhook/internal/mocks/client"
"github.com/NVIDIA/skyhook/internal/mocks/workqueue"
"github.com/NVIDIA/skyhook/operator/api/v1alpha1"
"github.com/NVIDIA/skyhook/operator/internal/dal"
dalmock "github.com/NVIDIA/skyhook/operator/internal/dal/mock"
MockClient "github.com/NVIDIA/skyhook/operator/internal/mocks/client"
"github.com/NVIDIA/skyhook/operator/internal/mocks/workqueue"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
Expand Down
2 changes: 1 addition & 1 deletion operator/internal/controller/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
package controller

import (
"github.com/NVIDIA/skyhook/api/v1alpha1"
"github.com/NVIDIA/skyhook/operator/api/v1alpha1"
"github.com/prometheus/client_golang/prometheus"
"sigs.k8s.io/controller-runtime/pkg/metrics"
)
Expand Down
4 changes: 2 additions & 2 deletions operator/internal/controller/mock/SkyhookNodes.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions operator/internal/controller/pod_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"errors"
"fmt"

"github.com/NVIDIA/skyhook/api/v1alpha1"
"github.com/NVIDIA/skyhook/internal/wrapper"
"github.com/NVIDIA/skyhook/operator/api/v1alpha1"
"github.com/NVIDIA/skyhook/operator/internal/wrapper"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/types"
Expand Down
8 changes: 4 additions & 4 deletions operator/internal/controller/skyhook_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ import (
"strings"
"time"

"github.com/NVIDIA/skyhook/api/v1alpha1"
"github.com/NVIDIA/skyhook/internal/dal"
"github.com/NVIDIA/skyhook/internal/version"
"github.com/NVIDIA/skyhook/internal/wrapper"
"github.com/NVIDIA/skyhook/operator/api/v1alpha1"
"github.com/NVIDIA/skyhook/operator/internal/dal"
"github.com/NVIDIA/skyhook/operator/internal/version"
"github.com/NVIDIA/skyhook/operator/internal/wrapper"
"github.com/go-logr/logr"

corev1 "k8s.io/api/core/v1"
Expand Down
6 changes: 3 additions & 3 deletions operator/internal/controller/skyhook_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import (
"testing"
"time"

"github.com/NVIDIA/skyhook/api/v1alpha1"
skyhookNodesMock "github.com/NVIDIA/skyhook/internal/controller/mock"
"github.com/NVIDIA/skyhook/internal/wrapper"
"github.com/NVIDIA/skyhook/operator/api/v1alpha1"
skyhookNodesMock "github.com/NVIDIA/skyhook/operator/internal/controller/mock"
"github.com/NVIDIA/skyhook/operator/internal/wrapper"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
corev1 "k8s.io/api/core/v1"
Expand Down
2 changes: 1 addition & 1 deletion operator/internal/controller/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"runtime"
"testing"

"github.com/NVIDIA/skyhook/api/v1alpha1"
"github.com/NVIDIA/skyhook/operator/api/v1alpha1"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/sethvargo/go-envconfig"
Expand Down
Loading