fix(ci,deps): migrate to .gitea/workflows, update domain to forgejo.riotpiao.com/rock, fix k8s argocd config
ci / test (push) Canceled after 0s
ci / test (push) Canceled after 0s
This commit is contained in:
@@ -3,6 +3,7 @@ name: ci
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
tags: ["v*"]
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
@@ -15,8 +16,9 @@ jobs:
|
|||||||
container:
|
container:
|
||||||
image: golang:1.25
|
image: golang:1.25
|
||||||
env:
|
env:
|
||||||
GOPRIVATE: forgejo.riotpiao.homelab.com
|
GOPRIVATE: forgejo.riotpiao.com
|
||||||
GOFLAGS: -mod=readonly
|
GOFLAGS: -mod=readonly
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
steps:
|
steps:
|
||||||
- name: install node (required by JS-based actions)
|
- name: install node (required by JS-based actions)
|
||||||
run: apt-get update && apt-get install -y --no-install-recommends nodejs ca-certificates git
|
run: apt-get update && apt-get install -y --no-install-recommends nodejs ca-certificates git
|
||||||
@@ -25,9 +27,7 @@ jobs:
|
|||||||
|
|
||||||
- name: configure git auth for private module fetch
|
- name: configure git auth for private module fetch
|
||||||
run: |
|
run: |
|
||||||
git config --global url."https://oauth2:${FORGEJO_PAT}@forgejo.riotpiao.homelab.com".insteadOf "https://forgejo.riotpiao.homelab.com"
|
git config --global url."https://oauth2:${GITHUB_TOKEN}@forgejo.riotpiao.com".insteadOf "https://forgejo.riotpiao.com"
|
||||||
env:
|
|
||||||
FORGEJO_PAT: ${{ secrets.FORGEJO_PAT }}
|
|
||||||
|
|
||||||
- name: cache go modules + build cache
|
- name: cache go modules + build cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
name: build-push
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
tags: ["v*"]
|
|
||||||
|
|
||||||
env:
|
|
||||||
REGISTRY: ghcr.io
|
|
||||||
IMAGE_NAME: ${{ github.repository_owner }}/kmsvc-management-service
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-push:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- uses: docker/setup-qemu-action@v3
|
|
||||||
|
|
||||||
- uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ${{ env.REGISTRY }}
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- id: meta
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
||||||
tags: |
|
|
||||||
type=raw,value=latest,enable={{is_default_branch}}
|
|
||||||
type=semver,pattern={{version}}
|
|
||||||
type=sha
|
|
||||||
|
|
||||||
- uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
platforms: linux/amd64,linux/arm64
|
|
||||||
push: true
|
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
|
||||||
cache-from: type=gha
|
|
||||||
cache-to: type=gha,mode=max
|
|
||||||
@@ -20,10 +20,10 @@ import (
|
|||||||
"sigs.k8s.io/controller-runtime/pkg/log/zap"
|
"sigs.k8s.io/controller-runtime/pkg/log/zap"
|
||||||
"sigs.k8s.io/controller-runtime/pkg/reconcile"
|
"sigs.k8s.io/controller-runtime/pkg/reconcile"
|
||||||
|
|
||||||
kmsvcv1 "github.com/rockliang/kafka-management-service/apis/kmsvc/v1"
|
kmsvcv1 "forgejo.riotpiao.com/rock/kmsvc-manage/apis/kmsvc/v1"
|
||||||
"github.com/rockliang/kafka-management-service/internal/kafka"
|
"forgejo.riotpiao.com/rock/kmsvc-manage/internal/kafka"
|
||||||
"github.com/rockliang/kafka-management-service/internal/operator"
|
"forgejo.riotpiao.com/rock/kmsvc-manage/internal/operator"
|
||||||
kmsvctemporal "github.com/rockliang/kafka-management-service/internal/temporal"
|
kmsvctemporal "forgejo.riotpiao.com/rock/kmsvc-manage/internal/temporal"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
+7
-7
@@ -16,17 +16,17 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
kafkamgmtv1 "github.com/Riotpiaole/kmsvc-proto/gen/kafkamgmt/v1"
|
kafkamgmtv1 "forgejo.riotpiao.com/rock/kmsvc-proto/gen/kafkamgmt/v1"
|
||||||
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||||
goredis "github.com/redis/go-redis/v9"
|
goredis "github.com/redis/go-redis/v9"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
|
|
||||||
"github.com/rockliang/kafka-management-service/internal/api/handlers"
|
"forgejo.riotpiao.com/rock/kmsvc-manage/internal/api/handlers"
|
||||||
"github.com/rockliang/kafka-management-service/internal/config"
|
"forgejo.riotpiao.com/rock/kmsvc-manage/internal/config"
|
||||||
"github.com/rockliang/kafka-management-service/internal/core/queue"
|
"forgejo.riotpiao.com/rock/kmsvc-manage/internal/core/queue"
|
||||||
"github.com/rockliang/kafka-management-service/internal/core/reaper"
|
"forgejo.riotpiao.com/rock/kmsvc-manage/internal/core/reaper"
|
||||||
"github.com/rockliang/kafka-management-service/internal/kafka"
|
"forgejo.riotpiao.com/rock/kmsvc-manage/internal/kafka"
|
||||||
kmsvcredis "github.com/rockliang/kafka-management-service/internal/redis"
|
kmsvcredis "forgejo.riotpiao.com/rock/kmsvc-manage/internal/redis"
|
||||||
)
|
)
|
||||||
|
|
||||||
// queueDiscoveryInterval is how often the server rescans Redis for newly
|
// queueDiscoveryInterval is how often the server rescans Redis for newly
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
module github.com/rockliang/kafka-management-service
|
module forgejo.riotpiao.com/rock/kmsvc-manage
|
||||||
|
|
||||||
go 1.26.0
|
go 1.26.0
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/Riotpiaole/kmsvc-proto v1.3.0
|
forgejo.riotpiao.com/rock/kmsvc-proto v1.4.0
|
||||||
github.com/alicebob/miniredis/v2 v2.38.0
|
github.com/alicebob/miniredis/v2 v2.38.0
|
||||||
github.com/google/uuid v1.6.0
|
github.com/google/uuid v1.6.0
|
||||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0
|
github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
forgejo.riotpiao.com/rock/kmsvc-proto v1.4.0 h1:4id+KXQhHndnlX6TC0XCYzq0MWhQWWJi09zQq4KPdR8=
|
||||||
|
forgejo.riotpiao.com/rock/kmsvc-proto v1.4.0/go.mod h1:Tvldxxalok/gCZPaUhPNLxJleRmaF0UIlLCa/MSrHg0=
|
||||||
github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0=
|
github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0=
|
||||||
github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
|
github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
|
||||||
github.com/Riotpiaole/kmsvc-proto v1.3.0 h1:W+Nlbk5Rj9FmEctk9fPgDhR82xhkx9yRAw3EAnJ+UxY=
|
|
||||||
github.com/Riotpiaole/kmsvc-proto v1.3.0/go.mod h1:20/7jwP4wRxbNGq+qeFeZfTQs7Vtxaoqok6t+3Sc0U8=
|
|
||||||
github.com/alicebob/miniredis/v2 v2.38.0 h1:nZAzCR+Lj+Vxk4ZXzm2NuKq2O33RXj1XxJ2e2uP9jiw=
|
github.com/alicebob/miniredis/v2 v2.38.0 h1:nZAzCR+Lj+Vxk4ZXzm2NuKq2O33RXj1XxJ2e2uP9jiw=
|
||||||
github.com/alicebob/miniredis/v2 v2.38.0/go.mod h1:TcL7YfarKPGDAthEtl5NBeHZfeUQj6OXMm/+iu5cLMM=
|
github.com/alicebob/miniredis/v2 v2.38.0/go.mod h1:TcL7YfarKPGDAthEtl5NBeHZfeUQj6OXMm/+iu5cLMM=
|
||||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/rockliang/kafka-management-service/internal/core/queue"
|
"forgejo.riotpiao.com/rock/kmsvc-manage/internal/core/queue"
|
||||||
"github.com/rockliang/kafka-management-service/internal/kafka"
|
"forgejo.riotpiao.com/rock/kmsvc-manage/internal/kafka"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ConsumerRegistry lazily creates and caches one Kafka consumer per queue,
|
// ConsumerRegistry lazily creates and caches one Kafka consumer per queue,
|
||||||
|
|||||||
@@ -11,13 +11,13 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
kafkamgmtv1 "github.com/Riotpiaole/kmsvc-proto/gen/kafkamgmt/v1"
|
kafkamgmtv1 "forgejo.riotpiao.com/rock/kmsvc-proto/gen/kafkamgmt/v1"
|
||||||
goredis "github.com/redis/go-redis/v9"
|
goredis "github.com/redis/go-redis/v9"
|
||||||
"google.golang.org/grpc/codes"
|
"google.golang.org/grpc/codes"
|
||||||
"google.golang.org/grpc/status"
|
"google.golang.org/grpc/status"
|
||||||
"google.golang.org/protobuf/types/known/timestamppb"
|
"google.golang.org/protobuf/types/known/timestamppb"
|
||||||
|
|
||||||
"github.com/rockliang/kafka-management-service/internal/core/queue"
|
"forgejo.riotpiao.com/rock/kmsvc-manage/internal/core/queue"
|
||||||
)
|
)
|
||||||
|
|
||||||
// QueueService implements kafkamgmtv1.QueueServiceServer.
|
// QueueService implements kafkamgmtv1.QueueServiceServer.
|
||||||
|
|||||||
@@ -5,14 +5,14 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
kafkamgmtv1 "github.com/Riotpiaole/kmsvc-proto/gen/kafkamgmt/v1"
|
kafkamgmtv1 "forgejo.riotpiao.com/rock/kmsvc-proto/gen/kafkamgmt/v1"
|
||||||
"github.com/alicebob/miniredis/v2"
|
"github.com/alicebob/miniredis/v2"
|
||||||
goredis "github.com/redis/go-redis/v9"
|
goredis "github.com/redis/go-redis/v9"
|
||||||
"github.com/twmb/franz-go/pkg/kfake"
|
"github.com/twmb/franz-go/pkg/kfake"
|
||||||
|
|
||||||
"github.com/rockliang/kafka-management-service/internal/core/queue"
|
"forgejo.riotpiao.com/rock/kmsvc-manage/internal/core/queue"
|
||||||
"github.com/rockliang/kafka-management-service/internal/kafka"
|
"forgejo.riotpiao.com/rock/kmsvc-manage/internal/kafka"
|
||||||
kmsvcredis "github.com/rockliang/kafka-management-service/internal/redis"
|
kmsvcredis "forgejo.riotpiao.com/rock/kmsvc-manage/internal/redis"
|
||||||
)
|
)
|
||||||
|
|
||||||
// newTestKafka starts an in-memory, wire-protocol-compatible fake Kafka
|
// newTestKafka starts an in-memory, wire-protocol-compatible fake Kafka
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
|
|
||||||
goredis "github.com/redis/go-redis/v9"
|
goredis "github.com/redis/go-redis/v9"
|
||||||
|
|
||||||
kmsvcredis "github.com/rockliang/kafka-management-service/internal/redis"
|
kmsvcredis "forgejo.riotpiao.com/rock/kmsvc-manage/internal/redis"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ChangeVisibilityService struct {
|
type ChangeVisibilityService struct {
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
|
|
||||||
goredis "github.com/redis/go-redis/v9"
|
goredis "github.com/redis/go-redis/v9"
|
||||||
|
|
||||||
"github.com/rockliang/kafka-management-service/internal/kafka"
|
"forgejo.riotpiao.com/rock/kmsvc-manage/internal/kafka"
|
||||||
kmsvcredis "github.com/rockliang/kafka-management-service/internal/redis"
|
kmsvcredis "forgejo.riotpiao.com/rock/kmsvc-manage/internal/redis"
|
||||||
)
|
)
|
||||||
|
|
||||||
// OffsetCommitter is the subset of kafka.Admin DeleteMessage needs to
|
// OffsetCommitter is the subset of kafka.Admin DeleteMessage needs to
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
|
|
||||||
goredis "github.com/redis/go-redis/v9"
|
goredis "github.com/redis/go-redis/v9"
|
||||||
|
|
||||||
kmsvcredis "github.com/rockliang/kafka-management-service/internal/redis"
|
kmsvcredis "forgejo.riotpiao.com/rock/kmsvc-manage/internal/redis"
|
||||||
)
|
)
|
||||||
|
|
||||||
// acquireFIFOSlot claims the per-group exclusivity gate (design.md §3) so
|
// acquireFIFOSlot claims the per-group exclusivity gate (design.md §3) so
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
goredis "github.com/redis/go-redis/v9"
|
goredis "github.com/redis/go-redis/v9"
|
||||||
"github.com/twmb/franz-go/pkg/kfake"
|
"github.com/twmb/franz-go/pkg/kfake"
|
||||||
|
|
||||||
"github.com/rockliang/kafka-management-service/internal/kafka"
|
"forgejo.riotpiao.com/rock/kmsvc-manage/internal/kafka"
|
||||||
kmsvcredis "github.com/rockliang/kafka-management-service/internal/redis"
|
kmsvcredis "forgejo.riotpiao.com/rock/kmsvc-manage/internal/redis"
|
||||||
)
|
)
|
||||||
|
|
||||||
// newTestKafka starts an in-memory, wire-protocol-compatible fake Kafka
|
// newTestKafka starts an in-memory, wire-protocol-compatible fake Kafka
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
goredis "github.com/redis/go-redis/v9"
|
goredis "github.com/redis/go-redis/v9"
|
||||||
|
|
||||||
"github.com/rockliang/kafka-management-service/internal/kafka"
|
"forgejo.riotpiao.com/rock/kmsvc-manage/internal/kafka"
|
||||||
kmsvcredis "github.com/rockliang/kafka-management-service/internal/redis"
|
kmsvcredis "forgejo.riotpiao.com/rock/kmsvc-manage/internal/redis"
|
||||||
)
|
)
|
||||||
|
|
||||||
const defaultPollInterval = 200 * time.Millisecond // design.md §2b
|
const defaultPollInterval = 200 * time.Millisecond // design.md §2b
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import (
|
|||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
goredis "github.com/redis/go-redis/v9"
|
goredis "github.com/redis/go-redis/v9"
|
||||||
|
|
||||||
"github.com/rockliang/kafka-management-service/internal/kafka"
|
"forgejo.riotpiao.com/rock/kmsvc-manage/internal/kafka"
|
||||||
kmsvcredis "github.com/rockliang/kafka-management-service/internal/redis"
|
kmsvcredis "forgejo.riotpiao.com/rock/kmsvc-manage/internal/redis"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MaxMessageBodyBytes is the SQS-compatible size cap enforced at
|
// MaxMessageBodyBytes is the SQS-compatible size cap enforced at
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
|
|
||||||
goredis "github.com/redis/go-redis/v9"
|
goredis "github.com/redis/go-redis/v9"
|
||||||
|
|
||||||
"github.com/rockliang/kafka-management-service/internal/kafka"
|
"forgejo.riotpiao.com/rock/kmsvc-manage/internal/kafka"
|
||||||
kmsvcredis "github.com/rockliang/kafka-management-service/internal/redis"
|
kmsvcredis "forgejo.riotpiao.com/rock/kmsvc-manage/internal/redis"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ShardRouter resolves a routing key to a shard by reading the cached shard
|
// ShardRouter resolves a routing key to a shard by reading the cached shard
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import (
|
|||||||
|
|
||||||
goredis "github.com/redis/go-redis/v9"
|
goredis "github.com/redis/go-redis/v9"
|
||||||
|
|
||||||
"github.com/rockliang/kafka-management-service/internal/core/queue"
|
"forgejo.riotpiao.com/rock/kmsvc-manage/internal/core/queue"
|
||||||
kmsvcredis "github.com/rockliang/kafka-management-service/internal/redis"
|
kmsvcredis "forgejo.riotpiao.com/rock/kmsvc-manage/internal/redis"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ import (
|
|||||||
goredis "github.com/redis/go-redis/v9"
|
goredis "github.com/redis/go-redis/v9"
|
||||||
"github.com/twmb/franz-go/pkg/kfake"
|
"github.com/twmb/franz-go/pkg/kfake"
|
||||||
|
|
||||||
"github.com/rockliang/kafka-management-service/internal/core/queue"
|
"forgejo.riotpiao.com/rock/kmsvc-manage/internal/core/queue"
|
||||||
"github.com/rockliang/kafka-management-service/internal/kafka"
|
"forgejo.riotpiao.com/rock/kmsvc-manage/internal/kafka"
|
||||||
kmsvcredis "github.com/rockliang/kafka-management-service/internal/redis"
|
kmsvcredis "forgejo.riotpiao.com/rock/kmsvc-manage/internal/redis"
|
||||||
)
|
)
|
||||||
|
|
||||||
// newTestKafka mirrors internal/core/queue's test setup: an in-memory,
|
// newTestKafka mirrors internal/core/queue's test setup: an in-memory,
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package operator
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/rockliang/kafka-management-service/internal/kafka"
|
"forgejo.riotpiao.com/rock/kmsvc-manage/internal/kafka"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TopicAdmin is the subset of internal/kafka.Admin the reconciler needs,
|
// TopicAdmin is the subset of internal/kafka.Admin the reconciler needs,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/rockliang/kafka-management-service/internal/kafka"
|
"forgejo.riotpiao.com/rock/kmsvc-manage/internal/kafka"
|
||||||
)
|
)
|
||||||
|
|
||||||
// fakeAdmin is an in-memory TopicAdmin for reconciler tests — avoids needing
|
// fakeAdmin is an in-memory TopicAdmin for reconciler tests — avoids needing
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ import (
|
|||||||
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
|
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
|
||||||
ctrllog "sigs.k8s.io/controller-runtime/pkg/log"
|
ctrllog "sigs.k8s.io/controller-runtime/pkg/log"
|
||||||
|
|
||||||
kmsvcv1 "github.com/rockliang/kafka-management-service/apis/kmsvc/v1"
|
kmsvcv1 "forgejo.riotpiao.com/rock/kmsvc-manage/apis/kmsvc/v1"
|
||||||
"github.com/rockliang/kafka-management-service/internal/kafka"
|
"forgejo.riotpiao.com/rock/kmsvc-manage/internal/kafka"
|
||||||
kmsvcredis "github.com/rockliang/kafka-management-service/internal/redis"
|
kmsvcredis "forgejo.riotpiao.com/rock/kmsvc-manage/internal/redis"
|
||||||
)
|
)
|
||||||
|
|
||||||
const finalizerName = "kmsvc.io/queue-operator"
|
const finalizerName = "kmsvc.io/queue-operator"
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ import (
|
|||||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||||
"sigs.k8s.io/controller-runtime/pkg/client/fake"
|
"sigs.k8s.io/controller-runtime/pkg/client/fake"
|
||||||
|
|
||||||
kmsvcv1 "github.com/rockliang/kafka-management-service/apis/kmsvc/v1"
|
kmsvcv1 "forgejo.riotpiao.com/rock/kmsvc-manage/apis/kmsvc/v1"
|
||||||
"github.com/rockliang/kafka-management-service/internal/kafka"
|
"forgejo.riotpiao.com/rock/kmsvc-manage/internal/kafka"
|
||||||
kmsvcredis "github.com/rockliang/kafka-management-service/internal/redis"
|
kmsvcredis "forgejo.riotpiao.com/rock/kmsvc-manage/internal/redis"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newTestScheme(t *testing.T) *runtime.Scheme {
|
func newTestScheme(t *testing.T) *runtime.Scheme {
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
kmsvcv1 "github.com/rockliang/kafka-management-service/apis/kmsvc/v1"
|
kmsvcv1 "forgejo.riotpiao.com/rock/kmsvc-manage/apis/kmsvc/v1"
|
||||||
"github.com/rockliang/kafka-management-service/internal/kafka"
|
"forgejo.riotpiao.com/rock/kmsvc-manage/internal/kafka"
|
||||||
)
|
)
|
||||||
|
|
||||||
func secondsToDuration(s int32) time.Duration {
|
func secondsToDuration(s int32) time.Duration {
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
|
||||||
kmsvcv1 "github.com/rockliang/kafka-management-service/apis/kmsvc/v1"
|
kmsvcv1 "forgejo.riotpiao.com/rock/kmsvc-manage/apis/kmsvc/v1"
|
||||||
"github.com/rockliang/kafka-management-service/internal/kafka"
|
"forgejo.riotpiao.com/rock/kmsvc-manage/internal/kafka"
|
||||||
)
|
)
|
||||||
|
|
||||||
// reconcileSplits samples each Active shard's throughput and splits any shard
|
// reconcileSplits samples each Active shard's throughput and splits any shard
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import (
|
|||||||
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
|
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
|
||||||
ctrllog "sigs.k8s.io/controller-runtime/pkg/log"
|
ctrllog "sigs.k8s.io/controller-runtime/pkg/log"
|
||||||
|
|
||||||
kmsvcv1 "github.com/rockliang/kafka-management-service/apis/kmsvc/v1"
|
kmsvcv1 "forgejo.riotpiao.com/rock/kmsvc-manage/apis/kmsvc/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
const temporalWorkerFinalizerName = "kmsvc.io/temporal-worker"
|
const temporalWorkerFinalizerName = "kmsvc.io/temporal-worker"
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import (
|
|||||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||||
"sigs.k8s.io/controller-runtime/pkg/client/fake"
|
"sigs.k8s.io/controller-runtime/pkg/client/fake"
|
||||||
|
|
||||||
kmsvcv1 "github.com/rockliang/kafka-management-service/apis/kmsvc/v1"
|
kmsvcv1 "forgejo.riotpiao.com/rock/kmsvc-manage/apis/kmsvc/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newTemporalWorkerTestScheme(t *testing.T) *runtime.Scheme {
|
func newTemporalWorkerTestScheme(t *testing.T) *runtime.Scheme {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
"github.com/alicebob/miniredis/v2"
|
"github.com/alicebob/miniredis/v2"
|
||||||
goredis "github.com/redis/go-redis/v9"
|
goredis "github.com/redis/go-redis/v9"
|
||||||
|
|
||||||
"github.com/rockliang/kafka-management-service/internal/kafka"
|
"forgejo.riotpiao.com/rock/kmsvc-manage/internal/kafka"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newTestClient(t *testing.T) *goredis.Client {
|
func newTestClient(t *testing.T) *goredis.Client {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
|
|
||||||
"github.com/redis/go-redis/v9"
|
"github.com/redis/go-redis/v9"
|
||||||
|
|
||||||
"github.com/rockliang/kafka-management-service/internal/kafka"
|
"forgejo.riotpiao.com/rock/kmsvc-manage/internal/kafka"
|
||||||
)
|
)
|
||||||
|
|
||||||
// PutShardMap writes the active shard set for a queue (design.md §4's
|
// PutShardMap writes the active shard set for a queue (design.md §4's
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ apiVersion: argoproj.io/v1alpha1
|
|||||||
kind: AppProject
|
kind: AppProject
|
||||||
metadata:
|
metadata:
|
||||||
name: kmsvc
|
name: kmsvc
|
||||||
namespace: cicd
|
namespace: argocd
|
||||||
spec:
|
spec:
|
||||||
description: Kafka Management Service (design.md) -- Strimzi/Kafka, Redis, queue-operator, message-plane server
|
description: Kafka Management Service (design.md) -- Strimzi/Kafka, Redis, queue-operator, message-plane server
|
||||||
sourceRepos:
|
sourceRepos:
|
||||||
- https://forgejo.riotpiao.homelab.com/rock/kafaka-management-service.git
|
- https://forgejo.riotpiao.com/rock/kmsvc-manage.git
|
||||||
- https://strimzi.io/charts/
|
- https://strimzi.io/charts/
|
||||||
- https://charts.bitnami.com/bitnami
|
- https://charts.bitnami.com/bitnami
|
||||||
destinations:
|
destinations:
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ apiVersion: argoproj.io/v1alpha1
|
|||||||
kind: Application
|
kind: Application
|
||||||
metadata:
|
metadata:
|
||||||
name: kmsvc-root
|
name: kmsvc-root
|
||||||
namespace: cicd
|
namespace: argocd
|
||||||
spec:
|
spec:
|
||||||
project: kmsvc
|
project: kmsvc
|
||||||
source:
|
source:
|
||||||
repoURL: https://forgejo.riotpiao.homelab.com/rock/kafaka-management-service.git
|
repoURL: https://forgejo.riotpiao.com/rock/kmsvc-manage.git
|
||||||
targetRevision: main
|
targetRevision: main
|
||||||
path: k8s/argocd/apps
|
path: k8s/argocd/apps
|
||||||
directory:
|
directory:
|
||||||
|
|||||||
Reference in New Issue
Block a user