From 0a41c1de9ad71b4db6cf3851c8240c58b5f78241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Drzewiecki?= Date: Wed, 13 Sep 2023 09:34:16 +0200 Subject: [PATCH 1/2] rename to infrastructure manager --- .github/workflows/run-tests.yaml | 2 +- PROJECT | 8 +-- README.md | 14 +++--- api/v1/groupversion_info.go | 6 +-- cmd/main.go | 6 +-- ...ry.kyma-project.io_clusterinventories.yaml | 18 +++---- ...terinventory.kyma-project.io_clusters.yaml | 4 +- ...cturemanager.kyma-project.io_clusters.yaml | 49 +++++++++++++++++++ config/crd/kustomization.yaml | 2 +- .../crd/patches/cainjection_in_clusters.yaml | 2 +- config/crd/patches/webhook_in_clusters.yaml | 2 +- config/default/kustomization.yaml | 4 +- config/manager/kustomization.yaml | 6 +++ config/manager/manager.yaml | 8 +-- config/prometheus/monitor.yaml | 4 +- .../rbac/auth_proxy_client_clusterrole.yaml | 4 +- config/rbac/auth_proxy_role.yaml | 4 +- config/rbac/auth_proxy_role_binding.yaml | 4 +- config/rbac/auth_proxy_service.yaml | 4 +- config/rbac/cluster_editor_role.yaml | 8 +-- config/rbac/cluster_viewer_role.yaml | 8 +-- config/rbac/leader_election_role.yaml | 4 +- config/rbac/leader_election_role_binding.yaml | 4 +- config/rbac/role.yaml | 6 +-- config/rbac/role_binding.yaml | 4 +- config/rbac/service_account.yaml | 4 +- .../samples/clusterinventory_v1_cluster.yaml | 6 +-- config/samples/kustomization.yaml | 2 +- go.mod | 2 +- internal/controller/cluster_controller.go | 10 ++-- internal/controller/suite_test.go | 4 +- reuse/dep5 | 4 +- 32 files changed, 136 insertions(+), 81 deletions(-) create mode 100644 config/crd/bases/infrastructuremanager.kyma-project.io_clusters.yaml diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml index 2bdc9941..b1cff0b1 100644 --- a/.github/workflows/run-tests.yaml +++ b/.github/workflows/run-tests.yaml @@ -23,7 +23,7 @@ jobs: path: | ~/.cache/go-build ~/go/pkg/mod - /home/runner/work/cluster-inventory/cluster-inventory/bin + /home/runner/work/infrastructure-manager/infrastructure-manager/bin key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- diff --git a/PROJECT b/PROJECT index 68c06657..7a439738 100644 --- a/PROJECT +++ b/PROJECT @@ -5,16 +5,16 @@ domain: kyma-project.io layout: - go.kubebuilder.io/v4 -projectName: cluster-inventory -repo: github.com/kyma-project/cluster-inventory +projectName: infrastructure-manager +repo: github.com/kyma-project/infrastructure-manager resources: - api: crdVersion: v1 namespaced: true controller: true domain: kyma-project.io - group: clusterinventory + group: infrastructuremanager kind: Cluster - path: github.com/kyma-project/cluster-inventory/api/v1 + path: github.com/kyma-project/infrastructure-manager/api/v1 version: v1 version: "3" diff --git a/README.md b/README.md index 0dcd772c..48e6efff 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![REUSE status](https://api.reuse.software/badge/github.com/kyma-project/cluster-inventory)](https://api.reuse.software/info/github.com/kyma-project/cluster-inventory) +[![REUSE status](https://api.reuse.software/badge/github.com/kyma-project/infrastructure-manager)](https://api.reuse.software/info/github.com/kyma-project/infrastructure-manager) > **NOTE:** This is a general template that can be used for a project README.md, example README.md, or any other README.md type in all Kyma repositories in the Kyma organization. Except for the mandatory sections, use only those sections that suit your use case but keep the proposed section order. > @@ -9,7 +9,7 @@ > - `Code of Conduct` - do not change this! > - `Licensing` - do not change this! -# Cluster Inventory +# Infrastructure manager ## Overview @@ -32,14 +32,14 @@ It's main responsibilities **will be**: 1. Clone the project. ```bash -git clone https://github.com/kyma-project/cluster-inventory.git && cd cluster-inventory/ +git clone https://github.com/kyma-project/infrastructure-manager.git && cd infrastructure-manager/ ``` -2. Set the `cluster-inventory` image name. +2. Set the `infrastructure-manager` image name. ```bash -export IMG=custom-cluster-inventory:0.0.1 -export K3D_CLUSTER_NAME=cluster-inventory-demo +export IMG=custom-infrastructure-manager:0.0.1 +export K3D_CLUSTER_NAME=infrastructure-manager-demo ``` 3. Build the project. @@ -56,7 +56,7 @@ make docker-build 5. Push the image to the registry. -
+
k3d diff --git a/api/v1/groupversion_info.go b/api/v1/groupversion_info.go index 03774255..7b765e9d 100644 --- a/api/v1/groupversion_info.go +++ b/api/v1/groupversion_info.go @@ -14,9 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package v1 contains API Schema definitions for the clusterinventory v1 API group +// Package v1 contains API Schema definitions for the infrastructuremanager v1 API group // +kubebuilder:object:generate=true -// +groupName=clusterinventory.kyma-project.io +// +groupName=infrastructuremanager.kyma-project.io package v1 import ( @@ -26,7 +26,7 @@ import ( var ( // GroupVersion is group version used to register these objects - GroupVersion = schema.GroupVersion{Group: "clusterinventory.kyma-project.io", Version: "v1"} //nolint:gochecknoglobals + GroupVersion = schema.GroupVersion{Group: "infrastructuremanager.kyma-project.io", Version: "v1"} //nolint:gochecknoglobals // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} //nolint:gochecknoglobals diff --git a/cmd/main.go b/cmd/main.go index 01e40ab0..09459028 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -20,8 +20,8 @@ import ( "flag" "os" - clusterinventoryv1 "github.com/kyma-project/cluster-inventory/api/v1" - "github.com/kyma-project/cluster-inventory/internal/controller" + infrastructuremanagerv1 "github.com/kyma-project/infrastructure-manager/api/v1" + "github.com/kyma-project/infrastructure-manager/internal/controller" "k8s.io/apimachinery/pkg/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime" clientgoscheme "k8s.io/client-go/kubernetes/scheme" @@ -41,7 +41,7 @@ var ( func init() { utilruntime.Must(clientgoscheme.AddToScheme(scheme)) - utilruntime.Must(clusterinventoryv1.AddToScheme(scheme)) + utilruntime.Must(infrastructuremanagerv1.AddToScheme(scheme)) //+kubebuilder:scaffold:scheme } diff --git a/config/crd/bases/clusterinventory.kyma-project.io_clusterinventories.yaml b/config/crd/bases/clusterinventory.kyma-project.io_clusterinventories.yaml index 86a0c7c0..f71a1a14 100644 --- a/config/crd/bases/clusterinventory.kyma-project.io_clusterinventories.yaml +++ b/config/crd/bases/clusterinventory.kyma-project.io_clusterinventories.yaml @@ -4,20 +4,20 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.12.0 - name: clusterinventories.clusterinventory.kyma-project.io + name: clusterinventories.infrastructuremanager.kyma-project.io spec: - group: clusterinventory.kyma-project.io + group: infrastructuremanager.kyma-project.io names: - kind: ClusterInventory - listKind: ClusterInventoryList + kind: infrastructuremanager + listKind: infrastructuremanagerList plural: clusterinventories - singular: clusterinventory + singular: infrastructuremanager scope: Namespaced versions: - name: v1 schema: openAPIV3Schema: - description: ClusterInventory is the Schema for the clusterinventories API + description: infrastructuremanager is the Schema for the clusterinventories API properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -32,15 +32,15 @@ spec: metadata: type: object spec: - description: ClusterInventorySpec defines the desired state of ClusterInventory + description: infrastructuremanagerSpec defines the desired state of infrastructuremanager properties: foo: - description: Foo is an example field of ClusterInventory. Edit clusterinventory_types.go + description: Foo is an example field of infrastructuremanager. Edit infrastructuremanager_types.go to remove/update type: string type: object status: - description: ClusterInventoryStatus defines the observed state of ClusterInventory + description: infrastructuremanagerStatus defines the observed state of infrastructuremanager type: object type: object served: true diff --git a/config/crd/bases/clusterinventory.kyma-project.io_clusters.yaml b/config/crd/bases/clusterinventory.kyma-project.io_clusters.yaml index bb577ff5..77af01f4 100644 --- a/config/crd/bases/clusterinventory.kyma-project.io_clusters.yaml +++ b/config/crd/bases/clusterinventory.kyma-project.io_clusters.yaml @@ -4,9 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.12.0 - name: clusters.clusterinventory.kyma-project.io + name: clusters.infrastructuremanager.kyma-project.io spec: - group: clusterinventory.kyma-project.io + group: infrastructuremanager.kyma-project.io names: kind: Cluster listKind: ClusterList diff --git a/config/crd/bases/infrastructuremanager.kyma-project.io_clusters.yaml b/config/crd/bases/infrastructuremanager.kyma-project.io_clusters.yaml new file mode 100644 index 00000000..77af01f4 --- /dev/null +++ b/config/crd/bases/infrastructuremanager.kyma-project.io_clusters.yaml @@ -0,0 +1,49 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.0 + name: clusters.infrastructuremanager.kyma-project.io +spec: + group: infrastructuremanager.kyma-project.io + names: + kind: Cluster + listKind: ClusterList + plural: clusters + singular: cluster + scope: Namespaced + versions: + - name: v1 + schema: + openAPIV3Schema: + description: Cluster is the Schema for the clusters API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: ClusterSpec defines the desired state of Cluster + properties: + foo: + description: Foo is an example field of Cluster. Edit cluster_types.go + to remove/update + type: string + type: object + status: + description: ClusterStatus defines the observed state of Cluster + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index 668d44b6..715d712c 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -2,7 +2,7 @@ # since it depends on service name and namespace that are out of this kustomize package. # It should be run by config/default resources: -- bases/clusterinventory.kyma-project.io_clusters.yaml +- bases/infrastructuremanager.kyma-project.io_clusters.yaml #+kubebuilder:scaffold:crdkustomizeresource patches: diff --git a/config/crd/patches/cainjection_in_clusters.yaml b/config/crd/patches/cainjection_in_clusters.yaml index 3979d4a5..264ab1a2 100644 --- a/config/crd/patches/cainjection_in_clusters.yaml +++ b/config/crd/patches/cainjection_in_clusters.yaml @@ -4,4 +4,4 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: CERTIFICATE_NAMESPACE/CERTIFICATE_NAME - name: clusters.clusterinventory.kyma-project.io + name: clusters.infrastructuremanager.kyma-project.io diff --git a/config/crd/patches/webhook_in_clusters.yaml b/config/crd/patches/webhook_in_clusters.yaml index 09d57b56..b61d3c5e 100644 --- a/config/crd/patches/webhook_in_clusters.yaml +++ b/config/crd/patches/webhook_in_clusters.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: - name: clusters.clusterinventory.kyma-project.io + name: clusters.infrastructuremanager.kyma-project.io spec: conversion: strategy: Webhook diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml index 2de34192..58eb8de3 100644 --- a/config/default/kustomization.yaml +++ b/config/default/kustomization.yaml @@ -1,12 +1,12 @@ # Adds namespace to all resources. -namespace: cluster-inventory-system +namespace: infrastructure-manager-system # Value of this field is prepended to the # names of all resources, e.g. a deployment named # "wordpress" becomes "alices-wordpress". # Note that it should also match with the prefix (text before '-') of the namespace # field above. -namePrefix: cluster-inventory- +namePrefix: infrastructure-manager- # Labels to add to all resources and selectors. #labels: diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 5c5f0b84..8af8ea33 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -1,2 +1,8 @@ resources: - manager.yaml +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +images: +- name: controller + newName: infrastructure-manager + newTag: 0.0.1 diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 805e800e..56cd1913 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -6,8 +6,8 @@ metadata: app.kubernetes.io/name: namespace app.kubernetes.io/instance: system app.kubernetes.io/component: manager - app.kubernetes.io/created-by: cluster-inventory - app.kubernetes.io/part-of: cluster-inventory + app.kubernetes.io/created-by: infrastructure-manager + app.kubernetes.io/part-of: infrastructure-manager app.kubernetes.io/managed-by: kustomize name: system --- @@ -21,8 +21,8 @@ metadata: app.kubernetes.io/name: deployment app.kubernetes.io/instance: controller-manager app.kubernetes.io/component: manager - app.kubernetes.io/created-by: cluster-inventory - app.kubernetes.io/part-of: cluster-inventory + app.kubernetes.io/created-by: infrastructure-manager + app.kubernetes.io/part-of: infrastructure-manager app.kubernetes.io/managed-by: kustomize spec: selector: diff --git a/config/prometheus/monitor.yaml b/config/prometheus/monitor.yaml index d4762aba..efbe164e 100644 --- a/config/prometheus/monitor.yaml +++ b/config/prometheus/monitor.yaml @@ -8,8 +8,8 @@ metadata: app.kubernetes.io/name: servicemonitor app.kubernetes.io/instance: controller-manager-metrics-monitor app.kubernetes.io/component: metrics - app.kubernetes.io/created-by: cluster-inventory - app.kubernetes.io/part-of: cluster-inventory + app.kubernetes.io/created-by: infrastructure-manager + app.kubernetes.io/part-of: infrastructure-manager app.kubernetes.io/managed-by: kustomize name: controller-manager-metrics-monitor namespace: system diff --git a/config/rbac/auth_proxy_client_clusterrole.yaml b/config/rbac/auth_proxy_client_clusterrole.yaml index aac9f477..98aa5202 100644 --- a/config/rbac/auth_proxy_client_clusterrole.yaml +++ b/config/rbac/auth_proxy_client_clusterrole.yaml @@ -5,8 +5,8 @@ metadata: app.kubernetes.io/name: clusterrole app.kubernetes.io/instance: metrics-reader app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: cluster-inventory - app.kubernetes.io/part-of: cluster-inventory + app.kubernetes.io/created-by: infrastructure-manager + app.kubernetes.io/part-of: infrastructure-manager app.kubernetes.io/managed-by: kustomize name: metrics-reader rules: diff --git a/config/rbac/auth_proxy_role.yaml b/config/rbac/auth_proxy_role.yaml index f7c7ff98..9dd98baf 100644 --- a/config/rbac/auth_proxy_role.yaml +++ b/config/rbac/auth_proxy_role.yaml @@ -5,8 +5,8 @@ metadata: app.kubernetes.io/name: clusterrole app.kubernetes.io/instance: proxy-role app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: cluster-inventory - app.kubernetes.io/part-of: cluster-inventory + app.kubernetes.io/created-by: infrastructure-manager + app.kubernetes.io/part-of: infrastructure-manager app.kubernetes.io/managed-by: kustomize name: proxy-role rules: diff --git a/config/rbac/auth_proxy_role_binding.yaml b/config/rbac/auth_proxy_role_binding.yaml index 48df0066..fceb3271 100644 --- a/config/rbac/auth_proxy_role_binding.yaml +++ b/config/rbac/auth_proxy_role_binding.yaml @@ -5,8 +5,8 @@ metadata: app.kubernetes.io/name: clusterrolebinding app.kubernetes.io/instance: proxy-rolebinding app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: cluster-inventory - app.kubernetes.io/part-of: cluster-inventory + app.kubernetes.io/created-by: infrastructure-manager + app.kubernetes.io/part-of: infrastructure-manager app.kubernetes.io/managed-by: kustomize name: proxy-rolebinding roleRef: diff --git a/config/rbac/auth_proxy_service.yaml b/config/rbac/auth_proxy_service.yaml index 1b7d554f..a6304194 100644 --- a/config/rbac/auth_proxy_service.yaml +++ b/config/rbac/auth_proxy_service.yaml @@ -6,8 +6,8 @@ metadata: app.kubernetes.io/name: service app.kubernetes.io/instance: controller-manager-metrics-service app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: cluster-inventory - app.kubernetes.io/part-of: cluster-inventory + app.kubernetes.io/created-by: infrastructure-manager + app.kubernetes.io/part-of: infrastructure-manager app.kubernetes.io/managed-by: kustomize name: controller-manager-metrics-service namespace: system diff --git a/config/rbac/cluster_editor_role.yaml b/config/rbac/cluster_editor_role.yaml index 851c8e42..d1f14686 100644 --- a/config/rbac/cluster_editor_role.yaml +++ b/config/rbac/cluster_editor_role.yaml @@ -6,13 +6,13 @@ metadata: app.kubernetes.io/name: clusterrole app.kubernetes.io/instance: cluster-editor-role app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: cluster-inventory - app.kubernetes.io/part-of: cluster-inventory + app.kubernetes.io/created-by: infrastructure-manager + app.kubernetes.io/part-of: infrastructure-manager app.kubernetes.io/managed-by: kustomize name: cluster-editor-role rules: - apiGroups: - - clusterinventory.kyma-project.io + - infrastructuremanager.kyma-project.io resources: - clusters verbs: @@ -24,7 +24,7 @@ rules: - update - watch - apiGroups: - - clusterinventory.kyma-project.io + - infrastructuremanager.kyma-project.io resources: - clusters/status verbs: diff --git a/config/rbac/cluster_viewer_role.yaml b/config/rbac/cluster_viewer_role.yaml index 0d29f90f..ec7eedcd 100644 --- a/config/rbac/cluster_viewer_role.yaml +++ b/config/rbac/cluster_viewer_role.yaml @@ -6,13 +6,13 @@ metadata: app.kubernetes.io/name: clusterrole app.kubernetes.io/instance: cluster-viewer-role app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: cluster-inventory - app.kubernetes.io/part-of: cluster-inventory + app.kubernetes.io/created-by: infrastructure-manager + app.kubernetes.io/part-of: infrastructure-manager app.kubernetes.io/managed-by: kustomize name: cluster-viewer-role rules: - apiGroups: - - clusterinventory.kyma-project.io + - infrastructuremanager.kyma-project.io resources: - clusters verbs: @@ -20,7 +20,7 @@ rules: - list - watch - apiGroups: - - clusterinventory.kyma-project.io + - infrastructuremanager.kyma-project.io resources: - clusters/status verbs: diff --git a/config/rbac/leader_election_role.yaml b/config/rbac/leader_election_role.yaml index 3173ee9c..6948fd44 100644 --- a/config/rbac/leader_election_role.yaml +++ b/config/rbac/leader_election_role.yaml @@ -6,8 +6,8 @@ metadata: app.kubernetes.io/name: role app.kubernetes.io/instance: leader-election-role app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: cluster-inventory - app.kubernetes.io/part-of: cluster-inventory + app.kubernetes.io/created-by: infrastructure-manager + app.kubernetes.io/part-of: infrastructure-manager app.kubernetes.io/managed-by: kustomize name: leader-election-role rules: diff --git a/config/rbac/leader_election_role_binding.yaml b/config/rbac/leader_election_role_binding.yaml index 79e749d4..e35c4f32 100644 --- a/config/rbac/leader_election_role_binding.yaml +++ b/config/rbac/leader_election_role_binding.yaml @@ -5,8 +5,8 @@ metadata: app.kubernetes.io/name: rolebinding app.kubernetes.io/instance: leader-election-rolebinding app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: cluster-inventory - app.kubernetes.io/part-of: cluster-inventory + app.kubernetes.io/created-by: infrastructure-manager + app.kubernetes.io/part-of: infrastructure-manager app.kubernetes.io/managed-by: kustomize name: leader-election-rolebinding roleRef: diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index e07477d4..c5c7711b 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -5,7 +5,7 @@ metadata: name: manager-role rules: - apiGroups: - - clusterinventory.kyma-project.io + - infrastructuremanager.kyma-project.io resources: - clusters verbs: @@ -17,13 +17,13 @@ rules: - update - watch - apiGroups: - - clusterinventory.kyma-project.io + - infrastructuremanager.kyma-project.io resources: - clusters/finalizers verbs: - update - apiGroups: - - clusterinventory.kyma-project.io + - infrastructuremanager.kyma-project.io resources: - clusters/status verbs: diff --git a/config/rbac/role_binding.yaml b/config/rbac/role_binding.yaml index 1717f402..560964a7 100644 --- a/config/rbac/role_binding.yaml +++ b/config/rbac/role_binding.yaml @@ -5,8 +5,8 @@ metadata: app.kubernetes.io/name: clusterrolebinding app.kubernetes.io/instance: manager-rolebinding app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: cluster-inventory - app.kubernetes.io/part-of: cluster-inventory + app.kubernetes.io/created-by: infrastructure-manager + app.kubernetes.io/part-of: infrastructure-manager app.kubernetes.io/managed-by: kustomize name: manager-rolebinding roleRef: diff --git a/config/rbac/service_account.yaml b/config/rbac/service_account.yaml index 0c4a322d..25faa441 100644 --- a/config/rbac/service_account.yaml +++ b/config/rbac/service_account.yaml @@ -5,8 +5,8 @@ metadata: app.kubernetes.io/name: serviceaccount app.kubernetes.io/instance: controller-manager-sa app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: cluster-inventory - app.kubernetes.io/part-of: cluster-inventory + app.kubernetes.io/created-by: infrastructure-manager + app.kubernetes.io/part-of: infrastructure-manager app.kubernetes.io/managed-by: kustomize name: controller-manager namespace: system diff --git a/config/samples/clusterinventory_v1_cluster.yaml b/config/samples/clusterinventory_v1_cluster.yaml index 9f36d5b0..d831a185 100644 --- a/config/samples/clusterinventory_v1_cluster.yaml +++ b/config/samples/clusterinventory_v1_cluster.yaml @@ -1,12 +1,12 @@ -apiVersion: clusterinventory.kyma-project.io/v1 +apiVersion: infrastructuremanager.kyma-project.io/v1 kind: Cluster metadata: labels: app.kubernetes.io/name: cluster app.kubernetes.io/instance: cluster-sample - app.kubernetes.io/part-of: cluster-inventory + app.kubernetes.io/part-of: infrastructure-manager app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/created-by: cluster-inventory + app.kubernetes.io/created-by: infrastructure-manager name: cluster-sample spec: # TODO(user): Add fields here diff --git a/config/samples/kustomization.yaml b/config/samples/kustomization.yaml index 3d4a5e47..2852b544 100644 --- a/config/samples/kustomization.yaml +++ b/config/samples/kustomization.yaml @@ -1,4 +1,4 @@ ## Append samples of your project ## resources: -- clusterinventory_v1_cluster.yaml +- infrastructuremanager_v1_cluster.yaml #+kubebuilder:scaffold:manifestskustomizesamples diff --git a/go.mod b/go.mod index c90c97ed..c213d1a6 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/kyma-project/cluster-inventory +module github.com/kyma-project/infrastructure-manager go 1.20 diff --git a/internal/controller/cluster_controller.go b/internal/controller/cluster_controller.go index e4093062..e693e8a6 100644 --- a/internal/controller/cluster_controller.go +++ b/internal/controller/cluster_controller.go @@ -19,7 +19,7 @@ package controller import ( "context" - clusterinventoryv1 "github.com/kyma-project/cluster-inventory/api/v1" + infrastructuremanagerv1 "github.com/kyma-project/infrastructure-manager/api/v1" "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" @@ -32,9 +32,9 @@ type ClusterReconciler struct { Scheme *runtime.Scheme } -//+kubebuilder:rbac:groups=clusterinventory.kyma-project.io,resources=clusters,verbs=get;list;watch;create;update;patch;delete -//+kubebuilder:rbac:groups=clusterinventory.kyma-project.io,resources=clusters/status,verbs=get;update;patch -//+kubebuilder:rbac:groups=clusterinventory.kyma-project.io,resources=clusters/finalizers,verbs=update +//+kubebuilder:rbac:groups=infrastructuremanager.kyma-project.io,resources=clusters,verbs=get;list;watch;create;update;patch;delete +//+kubebuilder:rbac:groups=infrastructuremanager.kyma-project.io,resources=clusters/status,verbs=get;update;patch +//+kubebuilder:rbac:groups=infrastructuremanager.kyma-project.io,resources=clusters/finalizers,verbs=update // Reconcile is part of the main kubernetes reconciliation loop which aims to // move the current state of the cluster closer to the desired state. @@ -56,6 +56,6 @@ func (r *ClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct // SetupWithManager sets up the controller with the Manager. func (r *ClusterReconciler) SetupWithManager(mgr ctrl.Manager) error { return ctrl.NewControllerManagedBy(mgr). - For(&clusterinventoryv1.Cluster{}). + For(&infrastructuremanagerv1.Cluster{}). Complete(r) } diff --git a/internal/controller/suite_test.go b/internal/controller/suite_test.go index 343410cb..8f0ee1e5 100644 --- a/internal/controller/suite_test.go +++ b/internal/controller/suite_test.go @@ -20,7 +20,7 @@ import ( "path/filepath" "testing" - clusterinventoryv1 "github.com/kyma-project/cluster-inventory/api/v1" + infrastructuremanagerv1 "github.com/kyma-project/infrastructure-manager/api/v1" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "k8s.io/client-go/kubernetes/scheme" @@ -59,7 +59,7 @@ var _ = BeforeSuite(func() { Expect(err).NotTo(HaveOccurred()) Expect(cfg).NotTo(BeNil()) - err = clusterinventoryv1.AddToScheme(scheme.Scheme) + err = infrastructuremanagerv1.AddToScheme(scheme.Scheme) Expect(err).NotTo(HaveOccurred()) //+kubebuilder:scaffold:scheme diff --git a/reuse/dep5 b/reuse/dep5 index 5dae265c..387e8b92 100755 --- a/reuse/dep5 +++ b/reuse/dep5 @@ -1,7 +1,7 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: cluster-inventory +Upstream-Name: infrastructure-manager Upstream-Contact: Framefrog Team -Source: +Source: Disclaimer: The code in this project may include calls to APIs ("API Calls") of SAP or third-party products or services developed outside of this project ("External Products"). From 8a97541aa5c56262e780f01111fbdf325ab9e5e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=27Disper=27=20Drzewiecki?= Date: Wed, 13 Sep 2023 12:04:16 +0200 Subject: [PATCH 2/2] Update README.md --- README.md | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/README.md b/README.md index 48e6efff..6007a241 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,14 @@ [![REUSE status](https://api.reuse.software/badge/github.com/kyma-project/infrastructure-manager)](https://api.reuse.software/info/github.com/kyma-project/infrastructure-manager) -> **NOTE:** This is a general template that can be used for a project README.md, example README.md, or any other README.md type in all Kyma repositories in the Kyma organization. Except for the mandatory sections, use only those sections that suit your use case but keep the proposed section order. -> -> Mandatory sections: -> - `Overview` -> - `Prerequisites`, if there are any requirements regarding hard- or software -> - `Contributing` - do not change this! -> - `Code of Conduct` - do not change this! -> - `Licensing` - do not change this! - # Infrastructure manager ## Overview - This project **will be** responsible for managing [Kyma](https://kyma-project.io/#/) clusters infrastructure. Buil using [kubebuilder framework](https://github.com/kubernetes-sigs/kubebuilder) It's main responsibilities **will be**: - Provisioning and deprovisioning Kyma clusters - Generating dynamic kubeconfigs - ## Prerequisites - Access to a k8s cluster.