Skip to content

Commit

Permalink
Rename module+repos Mirantis/hmc -> K0rdent/kcm
Browse files Browse the repository at this point in the history
  • Loading branch information
a13x5 committed Jan 3, 2025
1 parent cff36cb commit a0b1e6a
Show file tree
Hide file tree
Showing 74 changed files with 187 additions and 187 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:

env:
GO_VERSION: '1.23'
REGISTRY_REPO: 'oci://ghcr.io/mirantis/hmc/charts-ci'
REGISTRY_REPO: 'oci://ghcr.io/k0rdent/kcm/charts-ci'

jobs:
build:
Expand Down Expand Up @@ -77,11 +77,11 @@ jobs:
uses: docker/build-push-action@v6
with:
build-args: |
LD_FLAGS=-s -w -X github.com/Mirantis/hmc/internal/build.Version=${{ steps.vars.outputs.version }}
LD_FLAGS=-s -w -X github.com/K0rdent/kcm/internal/build.Version=${{ steps.vars.outputs.version }}
context: .
platforms: linux/amd64
tags: |
ghcr.io/mirantis/hmc/controller-ci:${{ steps.vars.outputs.version }}
ghcr.io/k0rdent/kcm/controller-ci:${{ steps.vars.outputs.version }}
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
env:
GINKGO_LABEL_FILTER: 'controller'
CLUSTER_DEPLOYMENT_NAME: ${{ needs.build.outputs.clustername }}
IMG: 'ghcr.io/mirantis/hmc/controller-ci:${{ needs.build.outputs.version }}'
IMG: 'ghcr.io/k0rdent/kcm/controller-ci:${{ needs.build.outputs.version }}'
VERSION: ${{ needs.build.outputs.version }}
run: |
make test-e2e
Expand Down Expand Up @@ -163,7 +163,7 @@ jobs:
env:
GINKGO_LABEL_FILTER: 'provider:cloud'
CLUSTER_DEPLOYMENT_NAME: ${{ needs.build.outputs.clustername }}
IMG: 'ghcr.io/mirantis/hmc/controller-ci:${{ needs.build.outputs.version }}'
IMG: 'ghcr.io/k0rdent/kcm/controller-ci:${{ needs.build.outputs.version }}'
VERSION: ${{ needs.build.outputs.version }}
run: |
make test-e2e
Expand Down Expand Up @@ -216,7 +216,7 @@ jobs:
env:
GINKGO_LABEL_FILTER: 'provider:onprem'
CLUSTER_DEPLOYMENT_NAME: ${{ needs.build.outputs.clustername }}
IMG: 'ghcr.io/mirantis/hmc/controller-ci:${{ needs.build.outputs.version }}'
IMG: 'ghcr.io/k0rdent/kcm/controller-ci:${{ needs.build.outputs.version }}'
VERSION: ${{ needs.build.outputs.version }}
run: |
make test-e2e
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ jobs:
uses: docker/build-push-action@v6
with:
build-args: |
LD_FLAGS=-s -w -X github.com/Mirantis/hmc/internal/build.Version=${{ env.VERSION }} -X github.com/Mirantis/hmc/internal/telemetry.segmentToken=${{ secrets.SEGMENT_TOKEN }}
LD_FLAGS=-s -w -X github.com/K0rdent/kcm/internal/build.Version=${{ env.VERSION }} -X github.com/K0rdent/kcm/internal/telemetry.segmentToken=${{ secrets.SEGMENT_TOKEN }}
context: .
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/mirantis/hmc/controller:${{ env.VERSION }}
ghcr.io/k0rdent/kcm/controller:${{ env.VERSION }}
push: true
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Prepare HMC chart
run: VERSION="${{ env.VERSION }}" make hmc-chart-release
- name: Push charts to GHCR
run: REGISTRY_REPO="oci://ghcr.io/mirantis/hmc/charts" make helm-push
run: REGISTRY_REPO="oci://ghcr.io/k0rdent/kcm/charts" make helm-push

- name: Prepare manifests
run: make hmc-dist-release
Expand All @@ -61,7 +61,7 @@ jobs:

- name: Build airgap bundle
env:
IMG: 'ghcr.io/mirantis/hmc/controller:${{ env.VERSION }}'
IMG: 'ghcr.io/k0rdent/kcm/controller:${{ env.VERSION }}'
run: |
make airgap-package
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ linters-settings:
sections:
- standard # Standard section: captures all standard packages.
- default # Default section: contains all imports that could not be matched to another section type.
- prefix(github.com/Mirantis/hmc) # Custom section: groups all imports with the specified Prefix.
- prefix(github.com/K0rdent/kcm) # Custom section: groups all imports with the specified Prefix.
skip-generated: false
gofmt:
# Apply the rewrite rules to the source before reformatting.
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ package-chart-%: lint-chart-%
##@ Build

LD_FLAGS?= -s -w
LD_FLAGS += -X github.com/Mirantis/hmc/internal/build.Version=$(VERSION)
LD_FLAGS += -X github.com/Mirantis/hmc/internal/telemetry.segmentToken=$(SEGMENT_TOKEN)
LD_FLAGS += -X github.com/K0rdent/kcm/internal/build.Version=$(VERSION)
LD_FLAGS += -X github.com/K0rdent/kcm/internal/telemetry.segmentToken=$(SEGMENT_TOKEN)

.PHONY: build
build: generate-all ## Build manager binary.
Expand Down
26 changes: 13 additions & 13 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ domain: hmc.mirantis.com
layout:
- go.kubebuilder.io/v4
projectName: hmc
repo: github.com/Mirantis/hmc
repo: github.com/K0rdent/kcm
resources:
- api:
crdVersion: v1
Expand All @@ -15,7 +15,7 @@ resources:
domain: hmc.mirantis.com
group: hmc.mirantis.com
kind: ClusterDeployment
path: github.com/Mirantis/hmc/api/v1alpha1
path: github.com/K0rdent/kcm/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
Expand All @@ -24,14 +24,14 @@ resources:
domain: hmc.mirantis.com
group: hmc.mirantis.com
kind: Management
path: github.com/Mirantis/hmc/api/v1alpha1
path: github.com/K0rdent/kcm/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
domain: hmc.mirantis.com
group: hmc.mirantis.com
kind: Release
path: github.com/Mirantis/hmc/api/v1alpha1
path: github.com/K0rdent/kcm/api/v1alpha1
version: v1alpha1
webhooks:
validation: true
Expand All @@ -43,7 +43,7 @@ resources:
domain: hmc.mirantis.com
group: hmc.mirantis.com
kind: ClusterTemplate
path: github.com/Mirantis/hmc/api/v1alpha1
path: github.com/K0rdent/kcm/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
Expand All @@ -52,7 +52,7 @@ resources:
domain: hmc.mirantis.com
group: hmc.mirantis.com
kind: ProviderTemplate
path: github.com/Mirantis/hmc/api/v1alpha1
path: github.com/K0rdent/kcm/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
Expand All @@ -61,7 +61,7 @@ resources:
domain: hmc.mirantis.com
group: hmc.mirantis.com
kind: ServiceTemplate
path: github.com/Mirantis/hmc/api/v1alpha1
path: github.com/K0rdent/kcm/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
Expand All @@ -70,22 +70,22 @@ resources:
domain: hmc.mirantis.com
group: hmc.mirantis.com
kind: AccessManagement
path: github.com/Mirantis/hmc/api/v1alpha1
path: github.com/K0rdent/kcm/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
namespaced: true
domain: hmc.mirantis.com
group: hmc.mirantis.com
kind: ClusterTemplateChain
path: github.com/Mirantis/hmc/api/v1alpha1
path: github.com/K0rdent/kcm/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
domain: hmc.mirantis.com
group: hmc.mirantis.com
kind: ServiceTemplateChain
path: github.com/Mirantis/hmc/api/v1alpha1
path: github.com/K0rdent/kcm/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
Expand All @@ -94,15 +94,15 @@ resources:
domain: hmc.mirantis.com
group: hmc.mirantis.com
kind: Credential
path: github.com/Mirantis/hmc/api/v1alpha1
path: github.com/K0rdent/kcm/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
controller: true
domain: hmc.mirantis.com
group: hmc.mirantis.com
kind: MultiClusterService
path: github.com/Mirantis/hmc/api/v1alpha1
path: github.com/K0rdent/kcm/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
Expand All @@ -111,6 +111,6 @@ resources:
domain: hmc.mirantis.com
group: hmc.mirantis.com
kind: Backup
path: github.com/Mirantis/hmc/api/v1alpha1
path: github.com/K0rdent/kcm/api/v1alpha1
version: v1alpha1
version: "3"
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ Detailed documentation is available in [Project 0x2A Docs](https://mirantis.gith
### TL;DR

```bash
kubectl apply -f https://github.com/Mirantis/hmc/releases/download/v0.0.5/install.yaml
kubectl apply -f https://github.com/K0rdent/kcm/releases/download/v0.0.5/install.yaml
```

or install using `helm`

```bash
helm install hmc oci://ghcr.io/mirantis/hmc/charts/hmc --version 0.0.5 -n hmc-system --create-namespace
helm install hmc oci://ghcr.io/k0rdent/kcm/charts/hmc --version 0.0.5 -n hmc-system --create-namespace
```

Then follow the [Deploy a cluster deployment](#deploy-a-cluster-deployment) guide to
Expand Down Expand Up @@ -63,7 +63,7 @@ see [Documentation](#documentation)
```
export KUBECONFIG=<path-to-management-kubeconfig>
helm install hmc oci://ghcr.io/mirantis/hmc/charts/hmc --version <hmc-version> -n hmc-system --create-namespace
helm install hmc oci://ghcr.io/k0rdent/kcm/charts/hmc --version <hmc-version> -n hmc-system --create-namespace
```

#### Extended Management configuration
Expand Down
14 changes: 7 additions & 7 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ import (
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
"sigs.k8s.io/controller-runtime/pkg/webhook"

hmcmirantiscomv1alpha1 "github.com/Mirantis/hmc/api/v1alpha1"
"github.com/Mirantis/hmc/internal/controller"
"github.com/Mirantis/hmc/internal/helm"
"github.com/Mirantis/hmc/internal/telemetry"
"github.com/Mirantis/hmc/internal/utils"
hmcwebhook "github.com/Mirantis/hmc/internal/webhook"
hmcmirantiscomv1alpha1 "github.com/K0rdent/kcm/api/v1alpha1"
"github.com/K0rdent/kcm/internal/controller"
"github.com/K0rdent/kcm/internal/helm"
"github.com/K0rdent/kcm/internal/telemetry"
"github.com/K0rdent/kcm/internal/utils"
hmcwebhook "github.com/K0rdent/kcm/internal/webhook"
)

var (
Expand Down Expand Up @@ -88,7 +88,7 @@ func main() {
"If set the metrics endpoint is served securely")
flag.BoolVar(&enableHTTP2, "enable-http2", false,
"If set, HTTP/2 will be enabled for the metrics and webhook servers")
flag.StringVar(&defaultRegistryURL, "default-registry-url", "oci://ghcr.io/mirantis/hmc/charts",
flag.StringVar(&defaultRegistryURL, "default-registry-url", "oci://ghcr.io/k0rdent/kcm/charts",
"The default registry to download Helm charts from, prefix with oci:// for OCI registries.")
flag.StringVar(&registryCredentialsSecret, "registry-creds-secret", "",
"Secret containing authentication credentials for the registry.")
Expand Down
8 changes: 4 additions & 4 deletions docs/dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ a managed cluster on AWS with k0s for testing. The kind cluster acts as manageme
### Clone HMC repository

```bash
git clone https://github.com/Mirantis/hmc.git && cd hmc
git clone https://github.com/K0rdent/kcm.git && cd hmc
```

### Install required CLIs
Expand Down Expand Up @@ -141,8 +141,8 @@ and hmc-controller image will need to exist on the registry, for example, using
GHCR:

```
IMG="ghcr.io/mirantis/hmc/controller-ci:v0.0.1-179-ga5bdf29" \
REGISTRY_REPO="oci://ghcr.io/mirantis/hmc/charts-ci" \
IMG="ghcr.io/k0rdent/kcm/controller-ci:v0.0.1-179-ga5bdf29" \
REGISTRY_REPO="oci://ghcr.io/k0rdent/kcm/charts-ci" \
make test-e2e
```

Expand Down Expand Up @@ -244,7 +244,7 @@ to ensure the correctly tagged HMC controller image is present in the bundle
prefix the `IMG` env var with the desired image, for example:

```bash
IMG="ghcr.io/mirantis/hmc:0.0.4" make airgap-package
IMG="ghcr.io/k0rdent/kcm:0.0.4" make airgap-package
```

Not setting an `IMG` var will use the default image name/tag generated by the
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/Mirantis/hmc
module github.com/K0rdent/kcm

go 1.23.0

Expand Down
2 changes: 1 addition & 1 deletion internal/controller/accessmanagement_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"

hmc "github.com/Mirantis/hmc/api/v1alpha1"
hmc "github.com/K0rdent/kcm/api/v1alpha1"
)

// AccessManagementReconciler reconciles an AccessManagement object
Expand Down
8 changes: 4 additions & 4 deletions internal/controller/accessmanagement_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ import (
crclient "sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/reconcile"

hmc "github.com/Mirantis/hmc/api/v1alpha1"
am "github.com/Mirantis/hmc/test/objects/accessmanagement"
"github.com/Mirantis/hmc/test/objects/credential"
tc "github.com/Mirantis/hmc/test/objects/templatechain"
hmc "github.com/K0rdent/kcm/api/v1alpha1"
am "github.com/K0rdent/kcm/test/objects/accessmanagement"
"github.com/K0rdent/kcm/test/objects/credential"
tc "github.com/K0rdent/kcm/test/objects/templatechain"
)

var _ = Describe("Template Management Controller", func() {
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/backup_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/log"

hmcmirantiscomv1alpha1 "github.com/Mirantis/hmc/api/v1alpha1"
hmcmirantiscomv1alpha1 "github.com/K0rdent/kcm/api/v1alpha1"
)

// BackupReconciler reconciles a Backup object
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/backup_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"k8s.io/apimachinery/pkg/types"
"sigs.k8s.io/controller-runtime/pkg/reconcile"

hmcmirantiscomv1alpha1 "github.com/Mirantis/hmc/api/v1alpha1"
hmcmirantiscomv1alpha1 "github.com/K0rdent/kcm/api/v1alpha1"
)

var _ = Describe("Backup Controller", func() {
Expand Down
14 changes: 7 additions & 7 deletions internal/controller/clusterdeployment_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ import (
"sigs.k8s.io/controller-runtime/pkg/handler"
"sigs.k8s.io/controller-runtime/pkg/predicate"

hmc "github.com/Mirantis/hmc/api/v1alpha1"
"github.com/Mirantis/hmc/internal/credspropagation"
"github.com/Mirantis/hmc/internal/helm"
"github.com/Mirantis/hmc/internal/sveltos"
"github.com/Mirantis/hmc/internal/telemetry"
"github.com/Mirantis/hmc/internal/utils/status"
hmc "github.com/K0rdent/kcm/api/v1alpha1"
"github.com/K0rdent/kcm/internal/credspropagation"
"github.com/K0rdent/kcm/internal/helm"
"github.com/K0rdent/kcm/internal/sveltos"
"github.com/K0rdent/kcm/internal/telemetry"
"github.com/K0rdent/kcm/internal/utils/status"
)

const (
Expand Down Expand Up @@ -558,7 +558,7 @@ func (r *ClusterDeploymentReconciler) Delete(ctx context.Context, clusterDeploym
// which prevents Sveltos objects from being removed from the management cluster.
// It is detailed in https://github.com/projectsveltos/addon-controller/issues/732.
// We may try to remove the explicit call to Delete once a fix for it has been merged.
// TODO(https://github.com/Mirantis/hmc/issues/526).
// TODO(https://github.com/K0rdent/kcm/issues/526).
if err := sveltos.DeleteProfile(ctx, r.Client, clusterDeployment.Namespace, clusterDeployment.Name); err != nil {
return ctrl.Result{}, err
}
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/clusterdeployment_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/reconcile"

hmc "github.com/Mirantis/hmc/api/v1alpha1"
hmc "github.com/K0rdent/kcm/api/v1alpha1"
)

var _ = Describe("ClusterDeployment Controller", func() {
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/credential_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"

hmc "github.com/Mirantis/hmc/api/v1alpha1"
hmc "github.com/K0rdent/kcm/api/v1alpha1"
)

const defaultSyncPeriod = 15 * time.Minute
Expand Down
Loading

0 comments on commit a0b1e6a

Please sign in to comment.