Skip to content

Commit ad7eae1

Browse files
chore: moves key-manager to top-level folder (#36)
This PR promotes `key-manager` as top-level component instead of keeping it in `deployment` folder where kustomize manifest live. Signed-off-by: Bartosz Majsak <bartosz.majsak@gmail.com>
1 parent 515662c commit ad7eae1

File tree

26 files changed

+23
-22
lines changed

26 files changed

+23
-22
lines changed

.github/workflows/key-manager-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Key Manager Build
33
on:
44
pull_request:
55
paths:
6-
- 'deployment/services/key-manager/**'
6+
- 'key-manager/**'
77
- 'Makefile'
88

99
jobs:

Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ REPO ?= ghcr.io/your-org/maas-key-manager
1111
TAG ?= latest
1212
FULL_IMAGE ?= $(REPO):$(TAG)
1313

14+
PROJECT_DIR:=$(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
15+
1416
# Key Manager settings
15-
KEY_MANAGER_DIR := deployment/services/key-manager
17+
KEY_MANAGER_DIR := $(PROJECT_DIR)/key-manager
1618
BINARY_NAME := key-manager
17-
BUILD_DIR := ./bin
18-
CMD_DIR := $(KEY_MANAGER_DIR)/cmd/key-manager
19+
BUILD_DIR := $(PROJECT_DIR)/bin
1920

2021
# Go settings
2122
GO_VERSION := 1.24.2
@@ -84,7 +85,7 @@ deps: ## Download Go dependencies
8485
build: fmt deps ## Build the key-manager binary
8586
@echo "Building $(BINARY_NAME)..."
8687
@mkdir -p $(BUILD_DIR)
87-
@cd $(KEY_MANAGER_DIR) && CGO_ENABLED=$(CGO_ENABLED) GOOS=$(GOOS) GOARCH=$(GOARCH) go build $(LDFLAGS) -o ../../$(BUILD_DIR)/$(BINARY_NAME) ./cmd/key-manager
88+
@cd $(KEY_MANAGER_DIR) && CGO_ENABLED=$(CGO_ENABLED) GOOS=$(GOOS) GOARCH=$(GOARCH) go build $(LDFLAGS) -o $(BUILD_DIR)/$(BINARY_NAME) ./cmd/
8889
@echo "Built $(BUILD_DIR)/$(BINARY_NAME)"
8990

9091
.PHONY: test

deployment/services/key-manager/Dockerfile renamed to key-manager/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ RUN go mod download
1414
COPY . .
1515

1616
# Build the application
17-
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o key-manager ./cmd/key-manager
17+
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o key-manager ./cmd/
1818

1919
# Runtime stage
2020
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest
File renamed without changes.
File renamed without changes.

deployment/services/key-manager/cmd/key-manager/main.go renamed to key-manager/cmd/main.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ import (
88
"k8s.io/client-go/kubernetes"
99
"k8s.io/client-go/rest"
1010

11-
"github.com/redhat-et/maas-billing/deployment/kuadrant-openshift/key-manager-v2/internal/auth"
12-
"github.com/redhat-et/maas-billing/deployment/kuadrant-openshift/key-manager-v2/internal/config"
13-
"github.com/redhat-et/maas-billing/deployment/kuadrant-openshift/key-manager-v2/internal/handlers"
14-
"github.com/redhat-et/maas-billing/deployment/kuadrant-openshift/key-manager-v2/internal/keys"
15-
"github.com/redhat-et/maas-billing/deployment/kuadrant-openshift/key-manager-v2/internal/models"
16-
"github.com/redhat-et/maas-billing/deployment/kuadrant-openshift/key-manager-v2/internal/teams"
11+
"github.com/opendatahub-io/maas-billing/key-manager/internal/auth"
12+
"github.com/opendatahub-io/maas-billing/key-manager/internal/config"
13+
"github.com/opendatahub-io/maas-billing/key-manager/internal/handlers"
14+
"github.com/opendatahub-io/maas-billing/key-manager/internal/keys"
15+
"github.com/opendatahub-io/maas-billing/key-manager/internal/models"
16+
"github.com/opendatahub-io/maas-billing/key-manager/internal/teams"
1717
)
1818

1919
func main() {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/redhat-et/maas-billing/deployment/kuadrant-openshift/key-manager-v2
1+
module github.com/opendatahub-io/maas-billing/key-manager
22

33
go 1.24.2
44

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)