Skip to content

Commit

Permalink
Change domain to unagex.com
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuCesbron committed Feb 6, 2024
1 parent de32807 commit 6f2ccda
Show file tree
Hide file tree
Showing 13 changed files with 30 additions and 109 deletions.
4 changes: 2 additions & 2 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is used to track the info used to scaffold your project
# and allow the plugins properly work.
# More info: https://book.kubebuilder.io/reference/project-config.html
domain: immudb.io
domain: unagex.com
layout:
- go.kubebuilder.io/v4
plugins:
Expand All @@ -15,7 +15,7 @@ resources:
crdVersion: v1
namespaced: true
controller: true
domain: immudb.io
domain: unagex.com
kind: Immudb
path: github.com/unagex/immudb-operator/api/v1
version: v1
Expand Down
4 changes: 2 additions & 2 deletions api/v1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.

// Package v1 contains API Schema definitions for the v1 API group
// +kubebuilder:object:generate=true
// +groupName=immudb.io
// +groupName=unagex.com
package v1

import (
Expand All @@ -26,7 +26,7 @@ import (

var (
// GroupVersion is group version used to register these objects
GroupVersion = schema.GroupVersion{Group: "immudb.io", Version: "v1"}
GroupVersion = schema.GroupVersion{Group: "unagex.com", Version: "v1"}

// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
Expand Down
4 changes: 2 additions & 2 deletions charts/operator/templates/cluster-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ kind: ClusterRole
metadata:
name: {{ .Chart.Name }}
rules:
- apiGroups: ["immudb.io"]
- apiGroups: ["unagex.com"]
resources: ["immudbs"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["immudb.io"]
- apiGroups: ["unagex.com"]
resources: ["immudbs/status"]
verbs: ["update"]
- apiGroups: ["apps"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
name: immudbs.immudb.io
name: immudbs.unagex.com
spec:
group: immudb.io
group: unagex.com
names:
kind: Immudb
listKind: ImmudbList
Expand Down
6 changes: 3 additions & 3 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/healthz"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

immudbiov1 "github.com/unagex/immudb-operator/api/v1"
unagexcomv1 "github.com/unagex/immudb-operator/api/v1"
"github.com/unagex/immudb-operator/internal/controller"
//+kubebuilder:scaffold:imports
)
Expand All @@ -44,7 +44,7 @@ var (
func init() {
utilruntime.Must(clientgoscheme.AddToScheme(scheme))

utilruntime.Must(immudbiov1.AddToScheme(scheme))
utilruntime.Must(unagexcomv1.AddToScheme(scheme))
//+kubebuilder:scaffold:scheme
}

Expand All @@ -71,7 +71,7 @@ func main() {
Port: 9443,
HealthProbeBindAddress: probeAddr,
LeaderElection: enableLeaderElection,
LeaderElectionID: "0f600675.immudb.io",
LeaderElectionID: "0f600675.unagex.com",
// LeaderElectionReleaseOnCancel defines if the leader should step down voluntarily
// when the Manager ends. This requires the binary to immediately end when the
// Manager is stopped, otherwise, this setting is unsafe. Setting this significantly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
name: immudbs.immudb.io
name: immudbs.unagex.com
spec:
group: immudb.io
group: unagex.com
names:
kind: Immudb
listKind: ImmudbList
Expand Down
2 changes: 1 addition & 1 deletion config/samples/v1_immudb.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: immudb.io/v1
apiVersion: unagex.com/v1
kind: Immudb
metadata:
name: immudb-sample
Expand Down
79 changes: 0 additions & 79 deletions helm/crd/immudb.io_immudbs.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions internal/controller/common/resource.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package common

import (
immudbiov1 "github.com/unagex/immudb-operator/api/v1"
unagexcomv1 "github.com/unagex/immudb-operator/api/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand All @@ -13,7 +13,7 @@ func GetLabels(name string) map[string]string {
}
}

func GetOwnerReferences(immudb *immudbiov1.Immudb) []metav1.OwnerReference {
func GetOwnerReferences(immudb *unagexcomv1.Immudb) []metav1.OwnerReference {
return []metav1.OwnerReference{
{
APIVersion: immudb.APIVersion,
Expand Down
6 changes: 3 additions & 3 deletions internal/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/reconcile"

immudbiov1 "github.com/unagex/immudb-operator/api/v1"
unagexcomv1 "github.com/unagex/immudb-operator/api/v1"
k8serrors "k8s.io/apimachinery/pkg/api/errors"

"github.com/go-logr/logr"
Expand All @@ -47,7 +47,7 @@ type ImmudbReconciler struct {
func (r *ImmudbReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
r.Log = log.FromContext(ctx).WithName("Reconciler")

immudb := &immudbiov1.Immudb{}
immudb := &unagexcomv1.Immudb{}
err := r.Get(ctx, req.NamespacedName, immudb)
if k8serrors.IsNotFound(err) {
return ctrl.Result{}, nil
Expand Down Expand Up @@ -89,7 +89,7 @@ func (r *ImmudbReconciler) SetupWithManager(mgr ctrl.Manager) error {
})

return ctrl.NewControllerManagedBy(mgr).
For(&immudbiov1.Immudb{}).
For(&unagexcomv1.Immudb{}).
Watches(&appsv1.StatefulSet{}, filter).
Watches(&corev1.Service{}, filter).
Complete(r)
Expand Down
6 changes: 3 additions & 3 deletions internal/controller/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

immudbiov1 "github.com/unagex/immudb-operator/api/v1"
unagexcomv1 "github.com/unagex/immudb-operator/api/v1"
"github.com/unagex/immudb-operator/internal/controller/common"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
Expand All @@ -16,7 +16,7 @@ import (
"k8s.io/apimachinery/pkg/types"
)

func (r *ImmudbReconciler) ManageDatabase(ctx context.Context, immudb *immudbiov1.Immudb) error {
func (r *ImmudbReconciler) ManageDatabase(ctx context.Context, immudb *unagexcomv1.Immudb) error {
sts := &appsv1.StatefulSet{}
err := r.Get(ctx, types.NamespacedName{
Namespace: immudb.Namespace,
Expand Down Expand Up @@ -69,7 +69,7 @@ func (r *ImmudbReconciler) ManageDatabase(ctx context.Context, immudb *immudbiov
return nil
}

func (r *ImmudbReconciler) GetStatefulset(immudb *immudbiov1.Immudb) *appsv1.StatefulSet {
func (r *ImmudbReconciler) GetStatefulset(immudb *unagexcomv1.Immudb) *appsv1.StatefulSet {
ls := common.GetLabels(immudb.Name)
return &appsv1.StatefulSet{
ObjectMeta: metav1.ObjectMeta{
Expand Down
12 changes: 6 additions & 6 deletions internal/controller/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

immudbiov1 "github.com/unagex/immudb-operator/api/v1"
unagexcomv1 "github.com/unagex/immudb-operator/api/v1"
"github.com/unagex/immudb-operator/internal/controller/common"
corev1 "k8s.io/api/core/v1"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
Expand All @@ -13,7 +13,7 @@ import (
"k8s.io/apimachinery/pkg/util/intstr"
)

func (r *ImmudbReconciler) ManageServices(ctx context.Context, immudb *immudbiov1.Immudb) error {
func (r *ImmudbReconciler) ManageServices(ctx context.Context, immudb *unagexcomv1.Immudb) error {
err := r.ManageServiceHTTP(ctx, immudb)
if err != nil {
return err
Expand All @@ -23,7 +23,7 @@ func (r *ImmudbReconciler) ManageServices(ctx context.Context, immudb *immudbiov
return err
}

func (r *ImmudbReconciler) ManageServiceHTTP(ctx context.Context, immudb *immudbiov1.Immudb) error {
func (r *ImmudbReconciler) ManageServiceHTTP(ctx context.Context, immudb *unagexcomv1.Immudb) error {
svc := &corev1.Service{}
err := r.Get(ctx, types.NamespacedName{
Namespace: immudb.Namespace,
Expand Down Expand Up @@ -51,7 +51,7 @@ func (r *ImmudbReconciler) ManageServiceHTTP(ctx context.Context, immudb *immudb
return nil
}

func (r *ImmudbReconciler) ManageServiceGRPC(ctx context.Context, immudb *immudbiov1.Immudb) error {
func (r *ImmudbReconciler) ManageServiceGRPC(ctx context.Context, immudb *unagexcomv1.Immudb) error {
svc := &corev1.Service{}
err := r.Get(ctx, types.NamespacedName{
Namespace: immudb.Namespace,
Expand Down Expand Up @@ -79,7 +79,7 @@ func (r *ImmudbReconciler) ManageServiceGRPC(ctx context.Context, immudb *immudb
return nil
}

func (r *ImmudbReconciler) GetServiceHTTP(immudb *immudbiov1.Immudb) *corev1.Service {
func (r *ImmudbReconciler) GetServiceHTTP(immudb *unagexcomv1.Immudb) *corev1.Service {
ls := common.GetLabels(immudb.Name)
return &corev1.Service{
ObjectMeta: metav1.ObjectMeta{
Expand All @@ -105,7 +105,7 @@ func (r *ImmudbReconciler) GetServiceHTTP(immudb *immudbiov1.Immudb) *corev1.Ser
}
}

func (r *ImmudbReconciler) GetServiceGRPC(immudb *immudbiov1.Immudb) *corev1.Service {
func (r *ImmudbReconciler) GetServiceGRPC(immudb *unagexcomv1.Immudb) *corev1.Service {
ls := common.GetLabels(immudb.Name)
return &corev1.Service{
ObjectMeta: metav1.ObjectMeta{
Expand Down
4 changes: 2 additions & 2 deletions internal/controller/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

immudbiov1 "github.com/unagex/immudb-operator/api/v1"
unagexcomv1 "github.com/unagex/immudb-operator/api/v1"
//+kubebuilder:scaffold:imports
)

Expand Down Expand Up @@ -62,7 +62,7 @@ var _ = BeforeSuite(func() {
Expect(err).NotTo(HaveOccurred())
Expect(cfg).NotTo(BeNil())

err = immudbiov1.AddToScheme(scheme.Scheme)
err = unagexcomv1.AddToScheme(scheme.Scheme)
Expect(err).NotTo(HaveOccurred())

//+kubebuilder:scaffold:scheme
Expand Down

0 comments on commit 6f2ccda

Please sign in to comment.