Kuadrant / Kuadrant/dns-operator

CoreDNS plugin go module requires version tagging

Open
#714 2 comments 0 reactions 0 assignees View on GitHub
coredns plugin
Dominant language
Go
Stars
12
Forks
23
Avg merge
1d 4h
Merged PRs (30d)
14

Description

## Problem

The `coredns/plugin` directory contains a separate Go module, but it has never been tagged according to [Go module conventions](https://go.dev/ref/mod#vcs-version), nested modules must be tagged with their subdirectory path as prefix:

```
Module location: coredns/plugin/go.mod
Module path: github.com/kuadrant/dns-operator/coredns/plugin
Expected tag: coredns/plugin/v0.x.x ← Currently missing!
```
This leads to:

- ❌ CoreDNS fork forced to use commit hashes instead of versions
- ❌ Plugin releases not tracked in git tags
- ❌ Unclear which plugin version corresponds to operator release
- ❌ Breaking changes not properly versioned

## Solution

Add CoreDNS plugin tagging to the release process.

### Release Process Update

**After tagging controller** (`v0.x.x`), add these steps:

```bash
# 1. Update plugin go.mod to reference tagged controller
cd coredns/plugin
go mod edit -dropreplace=github.com/kuadrant/dns-operator
go get github.com/kuadrant/dns-operator@v0.15.0
go mod tidy
cd ../..
git add coredns/plugin/go.* && git commit -m "Update plugin to controller v0.15.0"

# 2. Tag plugin module
git tag coredns/plugin/v0.15.0
git push upstream coredns/plugin/v0.15.0

# 3. Restore replace directive for development
cd coredns/plugin
go mod edit -replace=github.com/kuadrant/dns-operator@v0.15.0=../..
cd ../..
git add coredns/plugin/go.mod && git commit -m "Restore plugin replace directive"
```

### Version Synchronization

Keep versions aligned:
- Controller: `v0.15.0`
- Plugin: `coredns/plugin/v0.15.0`

## Files Requiring Updates

### 1. `docs/RELEASE.md`
- [ ] Add plugin tagging steps to "New Major.Minor version" section
- [ ] Add plugin tagging steps to "New Patch version" section
- [ ] Document version synchronization strategy

### 2. `.github/workflows/build-images-for-tag-release.yaml`
- [ ] Add verification that `coredns/plugin/vX.Y.Z` tag exists
- [ ] Add verification that plugin go.mod references correct controller version
- [ ] Add verification that plugin go.mod has no replace directives

Contributor guide

Open the contributing guide

Research direction

Start with the "New Major.Minor version" and "New Patch version" sections in docs/RELEASE.md, then inspect .github/workflows/build-images-for-tag-release.yaml and the plugin go.mod. Update the release instructions and add checks for the synchronized plugin tag, controller version reference, and absence of replace directives; done means both release paths and the workflow cover these requirements.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, go
Domain
ci-cd, documentation, release
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.