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 .tekton/rosa-hyperfleet-api-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
- name: hermetic
value: "true"
- name: prefetch-input
value: '[{"type": "gomod", "path": "hyperfleet-db"}, {"type": "gomod", "path": "hyperfleet-operator/api"}, {"type": "gomod", "path": "platform-api"}]'
value: '[{"type": "gomod", "path": "hyperfleet-db"}, {"type": "gomod", "path": "api"}, {"type": "gomod", "path": "platform-api"}]'
- name: build-source-image
value: "true"
pipelineSpec:
Expand Down
2 changes: 1 addition & 1 deletion .tekton/rosa-hyperfleet-api-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
- name: hermetic
value: "true"
- name: prefetch-input
value: '[{"type": "gomod", "path": "hyperfleet-db"}, {"type": "gomod", "path": "hyperfleet-operator/api"}, {"type": "gomod", "path": "platform-api"}]'
value: '[{"type": "gomod", "path": "hyperfleet-db"}, {"type": "gomod", "path": "api"}, {"type": "gomod", "path": "platform-api"}]'
- name: build-source-image
value: "true"
pipelineSpec:
Expand Down
4 changes: 2 additions & 2 deletions .tekton/rosa-hyperfleet-operator-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch == "main" && ( "hyperfleet-operator/***".pathChanged() || "hyperfleet-db/***".pathChanged() || ".tekton/rosa-hyperfleet-operator-pull-request.yaml".pathChanged() || "hyperfleet-operator/Containerfile".pathChanged() )
pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch == "main" && ( "api/***".pathChanged() || "hyperfleet-operator/***".pathChanged() || "hyperfleet-db/***".pathChanged() || ".tekton/rosa-hyperfleet-operator-pull-request.yaml".pathChanged() || "hyperfleet-operator/Containerfile".pathChanged() )
labels:
appstudio.openshift.io/application: rosa-hyperfleet
appstudio.openshift.io/component: rosa-hyperfleet-operator
Expand All @@ -35,7 +35,7 @@ spec:
- name: hermetic
value: "true"
- name: prefetch-input
value: '[{"type": "gomod", "path": "hyperfleet-db"}, {"type": "gomod", "path": "hyperfleet-operator/api"}, {"type": "gomod", "path": "hyperfleet-operator"}]'
value: '[{"type": "gomod", "path": "hyperfleet-db"}, {"type": "gomod", "path": "api"}, {"type": "gomod", "path": "hyperfleet-operator"}]'
Comment thread
cdoan1 marked this conversation as resolved.
- name: build-source-image
value: "true"
pipelineSpec:
Expand Down
4 changes: 2 additions & 2 deletions .tekton/rosa-hyperfleet-operator-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch == "main" && ( "force_konflux_release".pathChanged() || "hyperfleet-operator/***".pathChanged() || "hyperfleet-db/***".pathChanged() || ".tekton/rosa-hyperfleet-operator-push.yaml".pathChanged() || "hyperfleet-operator/Containerfile".pathChanged() )
pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch == "main" && ( "force_konflux_release".pathChanged() || "api/***".pathChanged() || "hyperfleet-operator/***".pathChanged() || "hyperfleet-db/***".pathChanged() || ".tekton/rosa-hyperfleet-operator-push.yaml".pathChanged() || "hyperfleet-operator/Containerfile".pathChanged() )
labels:
appstudio.openshift.io/application: rosa-hyperfleet
appstudio.openshift.io/component: rosa-hyperfleet-operator
Expand All @@ -32,7 +32,7 @@ spec:
- name: hermetic
value: "true"
- name: prefetch-input
value: '[{"type": "gomod", "path": "hyperfleet-db"}, {"type": "gomod", "path": "hyperfleet-operator/api"}, {"type": "gomod", "path": "hyperfleet-operator"}]'
value: '[{"type": "gomod", "path": "hyperfleet-db"}, {"type": "gomod", "path": "api"}, {"type": "gomod", "path": "hyperfleet-operator"}]'
- name: build-source-image
value: "true"
pipelineSpec:
Expand Down
6 changes: 3 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ make generate # Generate deepcopy

```
hyperfleet-db/go.mod ← standalone
hyperfleet-operator/api/go.mod ← standalone (CRD types sub-module)
hyperfleet-operator/go.mod ← requires: fleetdb, hyperfleet-operator/api
platform-api/go.mod ← requires: fleetdb, hyperfleet-operator/api
api/go.mod ← standalone (CRD types sub-module)
hyperfleet-operator/go.mod ← requires: fleetdb, api
platform-api/go.mod ← requires: fleetdb, api
```

Cross-module refs use permanent `replace` directives to sibling dirs.
Expand Down
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@ GINKGO := $(abspath $(TOOLS_BIN_DIR)/ginkgo)

# ── SDK generation ───────────────────────────────────────────────────────
SDK_MODULE ?= github.com/openshift-online/rosa-hyperfleet-api
SDK_API_PKG ?= $(SDK_MODULE)/hyperfleet-operator/api
SDK_API_PKG ?= $(SDK_MODULE)/api
SDK_INPUT ?= v1alpha1
SDK_CLIENTSET ?= generated
SDK_OUTPUT_DIR ?= $(abspath clientset)
SDK_OUTPUT_PKG ?= $(SDK_MODULE)/clientset
WIRE_INPUT_DIR ?= $(abspath hyperfleet-operator/api/v1alpha1)
WIRE_INPUT_DIR ?= $(abspath api/v1alpha1)
WIRE_OUTPUT_DIR ?= $(abspath clientset/transport)
WIRE_OUTPUT_PKG ?= transport
WRAPPERS_OUTPUT_DIR ?= $(abspath clientset/wrappers)
WRAPPERS_OUTPUT_PKG ?= wrappers
TYPED_PKG_IMPORT ?= $(SDK_MODULE)/clientset/generated/typed/v1alpha1/internalversion
API_PKG_IMPORT ?= $(SDK_MODULE)/hyperfleet-operator/api/v1alpha1
API_PKG_IMPORT ?= $(SDK_MODULE)/api/v1alpha1
SDK_HEADER_FILE ?= $(abspath hack/clientset/license-boilerplate.go.txt)

$(GOLANGCI_LINT): $(TOOLS_DIR)/go.mod
Expand Down Expand Up @@ -258,15 +258,15 @@ lint: $(GOLANGCI_LINT)

verify:
cd hyperfleet-db && go mod tidy
cd hyperfleet-operator/api && go mod tidy
cd api && go mod tidy
cd hyperfleet-operator && go mod tidy
cd platform-api && go mod tidy
cd test && go mod tidy
cd hack/tools && go mod tidy
cd hack/api-codegen && go mod tidy
git diff --exit-code \
hyperfleet-db/go.mod hyperfleet-db/go.sum \
hyperfleet-operator/api/go.mod hyperfleet-operator/api/go.sum \
api/go.mod api/go.sum \
hyperfleet-operator/go.mod hyperfleet-operator/go.sum \
platform-api/go.mod platform-api/go.sum \
test/go.mod test/go.sum \
Expand All @@ -275,7 +275,7 @@ verify:

deps:
cd hyperfleet-db && go mod download && go mod tidy
cd hyperfleet-operator/api && go mod download && go mod tidy
cd api && go mod download && go mod tidy
cd hyperfleet-operator && go mod download && go mod tidy
cd platform-api && go mod download && go mod tidy
cd test && go mod download && go mod tidy
Expand All @@ -284,13 +284,13 @@ deps:
# ── Code Generation ──────────────────────────────────────────────────────

manifests: $(CONTROLLER_GEN)
cd hyperfleet-operator && $(CONTROLLER_GEN) crd paths="./api/..." output:crd:dir=config/crd/bases
cd hyperfleet-operator && $(CONTROLLER_GEN) crd paths="../api/..." output:crd:dir=config/crd/bases
Comment thread
coderabbitai[bot] marked this conversation as resolved.

generate: $(CONTROLLER_GEN)
cd hyperfleet-operator && $(CONTROLLER_GEN) object paths="./api/..."
$(CONTROLLER_GEN) object paths="./api/..."

generate-clientset: $(CLIENT_GEN) $(WIRE_GEN)
cd hyperfleet-operator/api && $(CLIENT_GEN) \
cd api && $(CLIENT_GEN) \
--input-base "$(SDK_API_PKG)" \
--input "$(SDK_INPUT)" \
--clientset-name "$(SDK_CLIENTSET)" \
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ make help # full target list

```
hyperfleet-db/go.mod ← standalone
hyperfleet-operator/api/go.mod ← standalone (CRD types)
hyperfleet-operator/go.mod ← requires: hyperfleet-db, hyperfleet-operator/api
platform-api/go.mod ← requires: hyperfleet-db, hyperfleet-operator/api
api/go.mod ← standalone (CRD types)
hyperfleet-operator/go.mod ← requires: hyperfleet-db, api
platform-api/go.mod ← requires: hyperfleet-db, api
```

## Docs
Expand Down
2 changes: 1 addition & 1 deletion hyperfleet-operator/api/go.mod → api/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/openshift-online/rosa-hyperfleet-api/hyperfleet-operator/api
module github.com/openshift-online/rosa-hyperfleet-api/api
Comment thread
cdoan1 marked this conversation as resolved.

go 1.26.3

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.
package install

import (
v1alpha1 "github.com/openshift-online/rosa-hyperfleet-api/hyperfleet-operator/api/v1alpha1"
v1alpha1 "github.com/openshift-online/rosa-hyperfleet-api/api/v1alpha1"
"k8s.io/apimachinery/pkg/runtime"
)

Expand Down
10 changes: 5 additions & 5 deletions clientset/docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ It is built in two parts:

### Prerequisites: markers in the CRD types

`client-gen` generates a typed client for every type annotated with `// +genclient` in the operator API package (`hyperfleet-operator/api/v1alpha1`). Two types have this marker:
`client-gen` generates a typed client for every type annotated with `// +genclient` in the operator API package (`api/v1alpha1`). Two types have this marker:
Comment thread
coderabbitai[bot] marked this conversation as resolved.

```go
// +genclient
Expand All @@ -46,7 +46,7 @@ make verify-clientset # fail if generated output differs from committed file
SDK_CLIENTSET ?= generated
SDK_OUTPUT_DIR ?= $(abspath clientset)
SDK_OUTPUT_PKG ?= $(SDK_MODULE)/clientset
WIRE_INPUT_DIR ?= $(abspath hyperfleet-operator/api/v1alpha1)
WIRE_INPUT_DIR ?= $(abspath api/v1alpha1)
WIRE_OUTPUT_DIR ?= $(abspath clientset/transport)
WRAPPERS_OUTPUT_DIR ?= $(abspath clientset/wrappers)
```
Expand Down Expand Up @@ -78,14 +78,14 @@ clientset/wrappers/

### install package (hand-written, required by generated code)

The generated `scheme/register.go` imports `hyperfleet-operator/api/v1alpha1/install`, which does not exist in the operator module by default. It must be created manually:
The generated `scheme/register.go` imports `api/v1alpha1/install`, which does not exist in the api module by default. It must be created manually:

```go
// hyperfleet-operator/api/v1alpha1/install/install.go
// api/v1alpha1/install/install.go
package install

import (
v1alpha1 "github.com/openshift-online/rosa-hyperfleet-api/hyperfleet-operator/api/v1alpha1"
v1alpha1 "github.com/openshift-online/rosa-hyperfleet-api/api/v1alpha1"
"k8s.io/apimachinery/pkg/runtime"
)

Expand Down
2 changes: 1 addition & 1 deletion clientset/generated/fake/register.go

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

2 changes: 1 addition & 1 deletion clientset/generated/scheme/register.go

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

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

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

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

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

4 changes: 2 additions & 2 deletions clientset/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.26.3
require (
github.com/aws/aws-sdk-go-v2 v1.43.2
github.com/aws/aws-sdk-go-v2/credentials v1.19.30
github.com/openshift-online/rosa-hyperfleet-api/hyperfleet-operator/api v0.0.0
github.com/openshift-online/rosa-hyperfleet-api/api v0.0.0
k8s.io/apimachinery v0.36.0
k8s.io/client-go v0.36.0
)
Expand Down Expand Up @@ -52,4 +52,4 @@ require (
sigs.k8s.io/yaml v1.6.0 // indirect
)

replace github.com/openshift-online/rosa-hyperfleet-api/hyperfleet-operator/api => ../hyperfleet-operator/api
replace github.com/openshift-online/rosa-hyperfleet-api/api => ../api
3 changes: 2 additions & 1 deletion clientset/wrappers/wire_wrappers_generated.go

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

2 changes: 1 addition & 1 deletion clientset/wrappers/wrappers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"testing"
"time"

v1alpha1 "github.com/openshift-online/rosa-hyperfleet-api/hyperfleet-operator/api/v1alpha1"
v1alpha1 "github.com/openshift-online/rosa-hyperfleet-api/api/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/watch"
Expand Down
3 changes: 2 additions & 1 deletion hyperfleet-operator/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ USER 1001
WORKDIR /workspace

COPY hyperfleet-db/go.mod hyperfleet-db/go.sum ./hyperfleet-db/
COPY hyperfleet-operator/api/go.mod hyperfleet-operator/api/go.sum ./hyperfleet-operator/api/
COPY api/go.mod api/go.sum ./api/
COPY hyperfleet-operator/go.mod hyperfleet-operator/go.sum ./hyperfleet-operator/
RUN cd hyperfleet-operator && go mod download

COPY api/ ./api/
COPY hyperfleet-db/ ./hyperfleet-db/
COPY hyperfleet-operator/ ./hyperfleet-operator/

Expand Down
6 changes: 3 additions & 3 deletions hyperfleet-operator/PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ resources:
controller: true
domain: hyperfleet.io
kind: Cluster
path: github.com/openshift-online/rosa-hyperfleet-api/hyperfleet-operator/api/v1alpha1
path: github.com/openshift-online/rosa-hyperfleet-api/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
namespaced: true
controller: true
domain: hyperfleet.io
kind: NodePool
path: github.com/openshift-online/rosa-hyperfleet-api/hyperfleet-operator/api/v1alpha1
path: github.com/openshift-online/rosa-hyperfleet-api/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
namespaced: true
controller: true
domain: hyperfleet.io
kind: Placement
path: github.com/openshift-online/rosa-hyperfleet-api/hyperfleet-operator/api/v1alpha1
path: github.com/openshift-online/rosa-hyperfleet-api/api/v1alpha1
version: v1alpha1
version: "3"
2 changes: 1 addition & 1 deletion hyperfleet-operator/cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/healthz"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

v1alpha1 "github.com/openshift-online/rosa-hyperfleet-api/hyperfleet-operator/api/v1alpha1"
v1alpha1 "github.com/openshift-online/rosa-hyperfleet-api/api/v1alpha1"
"github.com/openshift-online/rosa-hyperfleet-api/hyperfleet-operator/internal/controller"
"github.com/openshift-online/rosa-hyperfleet-api/hyperfleet-operator/internal/dynamo"
"github.com/openshift-online/rosa-hyperfleet-api/hyperfleet-operator/internal/dynamo/statusstream"
Expand Down
4 changes: 2 additions & 2 deletions hyperfleet-operator/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/openshift-online/rosa-hyperfleet-api/hyperfleet-operator
go 1.26.3

replace (
github.com/openshift-online/rosa-hyperfleet-api/api => ../api
github.com/openshift-online/rosa-hyperfleet-api/hyperfleet-db => ../hyperfleet-db
github.com/openshift-online/rosa-hyperfleet-api/hyperfleet-operator/api => ./api
)

require (
Expand All @@ -18,8 +18,8 @@ require (
github.com/jackc/pgx/v5 v5.10.0
github.com/onsi/ginkgo/v2 v2.27.4
github.com/onsi/gomega v1.42.1
github.com/openshift-online/rosa-hyperfleet-api/api v0.0.0
github.com/openshift-online/rosa-hyperfleet-api/hyperfleet-db v0.0.0
github.com/openshift-online/rosa-hyperfleet-api/hyperfleet-operator/api v0.0.0
github.com/openshift/api v0.0.0-20260416105050-3c6b218b8a80
github.com/openshift/hypershift/api v0.0.0-20260625052409-9acec4759a16
github.com/prometheus/client_golang v1.23.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/reconcile"
"sigs.k8s.io/controller-runtime/pkg/source"

hyperfleetv1alpha1 "github.com/openshift-online/rosa-hyperfleet-api/hyperfleet-operator/api/v1alpha1"
hyperfleetv1alpha1 "github.com/openshift-online/rosa-hyperfleet-api/api/v1alpha1"
"github.com/openshift-online/rosa-hyperfleet-api/hyperfleet-operator/internal/dynamo"
"github.com/openshift-online/rosa-hyperfleet-api/hyperfleet-operator/internal/render"
hypershiftv1beta1 "github.com/openshift/hypershift/api/hypershift/v1beta1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

hyperfleetv1alpha1 "github.com/openshift-online/rosa-hyperfleet-api/hyperfleet-operator/api/v1alpha1"
hyperfleetv1alpha1 "github.com/openshift-online/rosa-hyperfleet-api/api/v1alpha1"
"github.com/openshift-online/rosa-hyperfleet-api/hyperfleet-operator/internal/dynamo"
"github.com/openshift-online/rosa-hyperfleet-api/hyperfleet-operator/internal/render"
hypershiftv1beta1 "github.com/openshift/hypershift/api/hypershift/v1beta1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/source"

hyperfleetv1alpha1 "github.com/openshift-online/rosa-hyperfleet-api/hyperfleet-operator/api/v1alpha1"
hyperfleetv1alpha1 "github.com/openshift-online/rosa-hyperfleet-api/api/v1alpha1"
"github.com/openshift-online/rosa-hyperfleet-api/hyperfleet-operator/internal/dynamo"
)

Expand Down
Loading