From 2a99086c71d3cc8ab46e806a4d4862f2536cbbcc Mon Sep 17 00:00:00 2001 From: Kristof Gyuracz Date: Thu, 1 Feb 2024 16:09:25 +0100 Subject: [PATCH] rename project Signed-off-by: Kristof Gyuracz --- PROJECT | 12 +-- README.md | 6 +- cmd/main.go | 4 +- config/default/kustomization.yaml | 19 +++-- config/manager/manager.yaml | 74 +++++++++---------- config/prometheus/monitor.yaml | 4 +- .../rbac/auth_proxy_client_clusterrole.yaml | 12 +-- config/rbac/auth_proxy_role.yaml | 28 +++---- config/rbac/auth_proxy_role_binding.yaml | 10 +-- config/rbac/auth_proxy_service.yaml | 12 +-- config/rbac/leader_election_role.yaml | 66 ++++++++--------- config/rbac/leader_election_role_binding.yaml | 10 +-- config/rbac/role_binding.yaml | 10 +-- config/rbac/service_account.yaml | 4 +- .../rbac/telemetry_collector_editor_role.yaml | 40 +++++----- .../rbac/telemetry_collector_viewer_role.yaml | 32 ++++---- .../telemetry_oteloutput_editor_role.yaml | 40 +++++----- .../telemetry_oteloutput_viewer_role.yaml | 32 ++++---- .../telemetry_subscription_editor_role.yaml | 40 +++++----- .../telemetry_subscription_viewer_role.yaml | 32 ++++---- config/rbac/telemetry_tenant_editor_role.yaml | 40 +++++----- config/rbac/telemetry_tenant_viewer_role.yaml | 32 ++++---- .../samples/telemetry_v1alpha1_collector.yaml | 4 +- .../telemetry_v1alpha1_oteloutput.yaml | 4 +- .../telemetry_v1alpha1_subscription.yaml | 4 +- config/samples/telemetry_v1alpha1_tenant.yaml | 5 +- go.mod | 6 +- .../telemetry/collector_controller.go | 2 +- .../controller/telemetry/otel_conf_gen.go | 2 +- .../telemetry/otel_conf_gen_test.go | 2 +- internal/controller/telemetry/suite_test.go | 2 +- 31 files changed, 294 insertions(+), 296 deletions(-) diff --git a/PROJECT b/PROJECT index 5ac73b2b..ecd6e968 100644 --- a/PROJECT +++ b/PROJECT @@ -6,8 +6,8 @@ domain: kube-logging.dev layout: - go.kubebuilder.io/v4 multigroup: true -projectName: subscription-operator -repo: github.com/kube-logging/subscription-operator +projectName: telemetry-controller +repo: github.com/kube-logging/telemetry-controller resources: - api: crdVersion: v1 @@ -16,7 +16,7 @@ resources: domain: kube-logging.dev group: telemetry kind: Collector - path: github.com/kube-logging/subscription-operator/api/telemetry/v1alpha1 + path: github.com/kube-logging/telemetry-controller/api/telemetry/v1alpha1 version: v1alpha1 - api: crdVersion: v1 @@ -24,7 +24,7 @@ resources: domain: kube-logging.dev group: telemetry kind: Subscription - path: github.com/kube-logging/subscription-operator/api/telemetry/v1alpha1 + path: github.com/kube-logging/telemetry-controller/api/telemetry/v1alpha1 version: v1alpha1 - api: crdVersion: v1 @@ -32,7 +32,7 @@ resources: domain: kube-logging.dev group: telemetry kind: Tenant - path: github.com/kube-logging/subscription-operator/api/telemetry/v1alpha1 + path: github.com/kube-logging/telemetry-controller/api/telemetry/v1alpha1 version: v1alpha1 - api: crdVersion: v1 @@ -40,6 +40,6 @@ resources: domain: kube-logging.dev group: telemetry kind: OtelOutput - path: github.com/kube-logging/subscription-operator/api/telemetry/v1alpha1 + path: github.com/kube-logging/telemetry-controller/api/telemetry/v1alpha1 version: v1alpha1 version: "3" diff --git a/README.md b/README.md index 38cb31cb..14f3aed7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# subscription-operator +# telemetry-controller // TODO(user): Add simple overview of use/purpose ## Description @@ -16,7 +16,7 @@ **Build and push your image to the location specified by `IMG`:** ```sh -make docker-build docker-push IMG=/subscription-operator:tag +make docker-build docker-push IMG=/telemetry-controller:tag ``` **NOTE:** This image ought to be published in the personal registry you specified. @@ -32,7 +32,7 @@ make install **Deploy the Manager to the cluster with the image specified by `IMG`:** ```sh -make deploy IMG=/subscription-operator:tag +make deploy IMG=/telemetry-controller:tag ``` > **NOTE**: If you encounter RBAC errors, you may need to grant yourself cluster-admin diff --git a/cmd/main.go b/cmd/main.go index c280d560..7d3295b6 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -32,8 +32,8 @@ import ( rbacv1 "k8s.io/api/rbac/v1" - telemetryv1alpha1 "github.com/kube-logging/subscription-operator/api/telemetry/v1alpha1" - controller "github.com/kube-logging/subscription-operator/internal/controller/telemetry" + telemetryv1alpha1 "github.com/kube-logging/telemetry-controller/api/telemetry/v1alpha1" + controller "github.com/kube-logging/telemetry-controller/internal/controller/telemetry" // +kubebuilder:scaffold:imports diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml index 585aca65..d13953a8 100644 --- a/config/default/kustomization.yaml +++ b/config/default/kustomization.yaml @@ -1,12 +1,12 @@ # Adds namespace to all resources. -namespace: subscription-operator-system +namespace: telemetry-controller-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: subscription-operator- +namePrefix: telemetry-controller- # Labels to add to all resources and selectors. #labels: @@ -15,9 +15,9 @@ namePrefix: subscription-operator- # someName: someValue resources: -- ../crd -- ../rbac -- ../manager + - ../crd + - ../rbac + - ../manager # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in # crd/kustomization.yaml #- ../webhook @@ -27,11 +27,10 @@ resources: #- ../prometheus patches: -# Protect the /metrics endpoint by putting it behind auth. -# If you want your controller-manager to expose the /metrics -# endpoint w/o any authn/z, please comment the following line. -- path: manager_auth_proxy_patch.yaml - + # Protect the /metrics endpoint by putting it behind auth. + # If you want your controller-manager to expose the /metrics + # endpoint w/o any authn/z, please comment the following line. + - path: manager_auth_proxy_patch.yaml # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in # crd/kustomization.yaml #- path: manager_webhook_patch.yaml diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 068ec9ac..0c8e2b53 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: subscription-operator - app.kubernetes.io/part-of: subscription-operator + app.kubernetes.io/created-by: telemetry-controller + app.kubernetes.io/part-of: telemetry-controller 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: subscription-operator - app.kubernetes.io/part-of: subscription-operator + app.kubernetes.io/created-by: telemetry-controller + app.kubernetes.io/part-of: telemetry-controller app.kubernetes.io/managed-by: kustomize spec: selector: @@ -66,38 +66,38 @@ spec: # seccompProfile: # type: RuntimeDefault containers: - - command: - - /manager - args: - - --leader-elect - image: controller:latest - imagePullPolicy: IfNotPresent - name: manager - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - "ALL" - livenessProbe: - httpGet: - path: /healthz - port: 8081 - initialDelaySeconds: 15 - periodSeconds: 20 - readinessProbe: - httpGet: - path: /readyz - port: 8081 - initialDelaySeconds: 5 - periodSeconds: 10 - # TODO(user): Configure the resources accordingly based on the project requirements. - # More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - resources: - limits: - cpu: 500m - memory: 128Mi - requests: - cpu: 10m - memory: 64Mi + - command: + - /manager + args: + - --leader-elect + image: controller:latest + imagePullPolicy: IfNotPresent + name: manager + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - "ALL" + livenessProbe: + httpGet: + path: /healthz + port: 8081 + initialDelaySeconds: 15 + periodSeconds: 20 + readinessProbe: + httpGet: + path: /readyz + port: 8081 + initialDelaySeconds: 5 + periodSeconds: 10 + # TODO(user): Configure the resources accordingly based on the project requirements. + # More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 10m + memory: 64Mi serviceAccountName: controller-manager terminationGracePeriodSeconds: 10 diff --git a/config/prometheus/monitor.yaml b/config/prometheus/monitor.yaml index b14eebc0..fb62c627 100644 --- a/config/prometheus/monitor.yaml +++ b/config/prometheus/monitor.yaml @@ -7,8 +7,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: subscription-operator - app.kubernetes.io/part-of: subscription-operator + app.kubernetes.io/created-by: telemetry-controller + app.kubernetes.io/part-of: telemetry-controller 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 c9f20d74..0c6cc42a 100644 --- a/config/rbac/auth_proxy_client_clusterrole.yaml +++ b/config/rbac/auth_proxy_client_clusterrole.yaml @@ -5,12 +5,12 @@ metadata: app.kubernetes.io/name: clusterrole app.kubernetes.io/instance: metrics-reader app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: subscription-operator - app.kubernetes.io/part-of: subscription-operator + app.kubernetes.io/created-by: telemetry-controller + app.kubernetes.io/part-of: telemetry-controller app.kubernetes.io/managed-by: kustomize name: metrics-reader rules: -- nonResourceURLs: - - "/metrics" - verbs: - - get + - nonResourceURLs: + - "/metrics" + verbs: + - get diff --git a/config/rbac/auth_proxy_role.yaml b/config/rbac/auth_proxy_role.yaml index 9509ccc5..20150f5a 100644 --- a/config/rbac/auth_proxy_role.yaml +++ b/config/rbac/auth_proxy_role.yaml @@ -5,20 +5,20 @@ metadata: app.kubernetes.io/name: clusterrole app.kubernetes.io/instance: proxy-role app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: subscription-operator - app.kubernetes.io/part-of: subscription-operator + app.kubernetes.io/created-by: telemetry-controller + app.kubernetes.io/part-of: telemetry-controller app.kubernetes.io/managed-by: kustomize name: proxy-role rules: -- apiGroups: - - authentication.k8s.io - resources: - - tokenreviews - verbs: - - create -- apiGroups: - - authorization.k8s.io - resources: - - subjectaccessreviews - verbs: - - create + - apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create + - apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create diff --git a/config/rbac/auth_proxy_role_binding.yaml b/config/rbac/auth_proxy_role_binding.yaml index 95cb1f9a..468bb5dc 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: subscription-operator - app.kubernetes.io/part-of: subscription-operator + app.kubernetes.io/created-by: telemetry-controller + app.kubernetes.io/part-of: telemetry-controller app.kubernetes.io/managed-by: kustomize name: proxy-rolebinding roleRef: @@ -14,6 +14,6 @@ roleRef: kind: ClusterRole name: proxy-role subjects: -- kind: ServiceAccount - name: controller-manager - namespace: system + - kind: ServiceAccount + name: controller-manager + namespace: system diff --git a/config/rbac/auth_proxy_service.yaml b/config/rbac/auth_proxy_service.yaml index 9ad39d92..a1724bfa 100644 --- a/config/rbac/auth_proxy_service.yaml +++ b/config/rbac/auth_proxy_service.yaml @@ -6,16 +6,16 @@ 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: subscription-operator - app.kubernetes.io/part-of: subscription-operator + app.kubernetes.io/created-by: telemetry-controller + app.kubernetes.io/part-of: telemetry-controller app.kubernetes.io/managed-by: kustomize name: controller-manager-metrics-service namespace: system spec: ports: - - name: https - port: 8443 - protocol: TCP - targetPort: https + - name: https + port: 8443 + protocol: TCP + targetPort: https selector: control-plane: controller-manager diff --git a/config/rbac/leader_election_role.yaml b/config/rbac/leader_election_role.yaml index df5ad75e..deeb54ac 100644 --- a/config/rbac/leader_election_role.yaml +++ b/config/rbac/leader_election_role.yaml @@ -6,39 +6,39 @@ metadata: app.kubernetes.io/name: role app.kubernetes.io/instance: leader-election-role app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: subscription-operator - app.kubernetes.io/part-of: subscription-operator + app.kubernetes.io/created-by: telemetry-controller + app.kubernetes.io/part-of: telemetry-controller app.kubernetes.io/managed-by: kustomize name: leader-election-role rules: -- apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete -- apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - get - - list - - watch - - create - - update - - patch - - delete -- apiGroups: - - "" - resources: - - events - verbs: - - create - - patch + - apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - "" + resources: + - events + verbs: + - create + - patch diff --git a/config/rbac/leader_election_role_binding.yaml b/config/rbac/leader_election_role_binding.yaml index e53e47b1..b2a96085 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: subscription-operator - app.kubernetes.io/part-of: subscription-operator + app.kubernetes.io/created-by: telemetry-controller + app.kubernetes.io/part-of: telemetry-controller app.kubernetes.io/managed-by: kustomize name: leader-election-rolebinding roleRef: @@ -14,6 +14,6 @@ roleRef: kind: Role name: leader-election-role subjects: -- kind: ServiceAccount - name: controller-manager - namespace: system + - kind: ServiceAccount + name: controller-manager + namespace: system diff --git a/config/rbac/role_binding.yaml b/config/rbac/role_binding.yaml index cfb9e0e7..8a4fbf12 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: subscription-operator - app.kubernetes.io/part-of: subscription-operator + app.kubernetes.io/created-by: telemetry-controller + app.kubernetes.io/part-of: telemetry-controller app.kubernetes.io/managed-by: kustomize name: manager-rolebinding roleRef: @@ -14,6 +14,6 @@ roleRef: kind: ClusterRole name: manager-role subjects: -- kind: ServiceAccount - name: controller-manager - namespace: system + - kind: ServiceAccount + name: controller-manager + namespace: system diff --git a/config/rbac/service_account.yaml b/config/rbac/service_account.yaml index efc6649d..2660c776 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: subscription-operator - app.kubernetes.io/part-of: subscription-operator + app.kubernetes.io/created-by: telemetry-controller + app.kubernetes.io/part-of: telemetry-controller app.kubernetes.io/managed-by: kustomize name: controller-manager namespace: system diff --git a/config/rbac/telemetry_collector_editor_role.yaml b/config/rbac/telemetry_collector_editor_role.yaml index 48292f4d..f95da3cc 100644 --- a/config/rbac/telemetry_collector_editor_role.yaml +++ b/config/rbac/telemetry_collector_editor_role.yaml @@ -6,26 +6,26 @@ metadata: app.kubernetes.io/name: clusterrole app.kubernetes.io/instance: collector-editor-role app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: subscription-operator - app.kubernetes.io/part-of: subscription-operator + app.kubernetes.io/created-by: telemetry-controller + app.kubernetes.io/part-of: telemetry-controller app.kubernetes.io/managed-by: kustomize name: collector-editor-role rules: -- apiGroups: - - telemetry.kube-logging.dev - resources: - - collectors - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - telemetry.kube-logging.dev - resources: - - collectors/status - verbs: - - get + - apiGroups: + - telemetry.kube-logging.dev + resources: + - collectors + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - telemetry.kube-logging.dev + resources: + - collectors/status + verbs: + - get diff --git a/config/rbac/telemetry_collector_viewer_role.yaml b/config/rbac/telemetry_collector_viewer_role.yaml index d628a527..0d8e9e1b 100644 --- a/config/rbac/telemetry_collector_viewer_role.yaml +++ b/config/rbac/telemetry_collector_viewer_role.yaml @@ -6,22 +6,22 @@ metadata: app.kubernetes.io/name: clusterrole app.kubernetes.io/instance: collector-viewer-role app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: subscription-operator - app.kubernetes.io/part-of: subscription-operator + app.kubernetes.io/created-by: telemetry-controller + app.kubernetes.io/part-of: telemetry-controller app.kubernetes.io/managed-by: kustomize name: collector-viewer-role rules: -- apiGroups: - - telemetry.kube-logging.dev - resources: - - collectors - verbs: - - get - - list - - watch -- apiGroups: - - telemetry.kube-logging.dev - resources: - - collectors/status - verbs: - - get + - apiGroups: + - telemetry.kube-logging.dev + resources: + - collectors + verbs: + - get + - list + - watch + - apiGroups: + - telemetry.kube-logging.dev + resources: + - collectors/status + verbs: + - get diff --git a/config/rbac/telemetry_oteloutput_editor_role.yaml b/config/rbac/telemetry_oteloutput_editor_role.yaml index e8149b91..0838893b 100644 --- a/config/rbac/telemetry_oteloutput_editor_role.yaml +++ b/config/rbac/telemetry_oteloutput_editor_role.yaml @@ -6,26 +6,26 @@ metadata: app.kubernetes.io/name: clusterrole app.kubernetes.io/instance: oteloutput-editor-role app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: subscription-operator - app.kubernetes.io/part-of: subscription-operator + app.kubernetes.io/created-by: telemetry-controller + app.kubernetes.io/part-of: telemetry-controller app.kubernetes.io/managed-by: kustomize name: oteloutput-editor-role rules: -- apiGroups: - - telemetry.kube-logging.dev - resources: - - oteloutputs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - telemetry.kube-logging.dev - resources: - - oteloutputs/status - verbs: - - get + - apiGroups: + - telemetry.kube-logging.dev + resources: + - oteloutputs + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - telemetry.kube-logging.dev + resources: + - oteloutputs/status + verbs: + - get diff --git a/config/rbac/telemetry_oteloutput_viewer_role.yaml b/config/rbac/telemetry_oteloutput_viewer_role.yaml index 430a7f66..14445330 100644 --- a/config/rbac/telemetry_oteloutput_viewer_role.yaml +++ b/config/rbac/telemetry_oteloutput_viewer_role.yaml @@ -6,22 +6,22 @@ metadata: app.kubernetes.io/name: clusterrole app.kubernetes.io/instance: oteloutput-viewer-role app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: subscription-operator - app.kubernetes.io/part-of: subscription-operator + app.kubernetes.io/created-by: telemetry-controller + app.kubernetes.io/part-of: telemetry-controller app.kubernetes.io/managed-by: kustomize name: oteloutput-viewer-role rules: -- apiGroups: - - telemetry.kube-logging.dev - resources: - - oteloutputs - verbs: - - get - - list - - watch -- apiGroups: - - telemetry.kube-logging.dev - resources: - - oteloutputs/status - verbs: - - get + - apiGroups: + - telemetry.kube-logging.dev + resources: + - oteloutputs + verbs: + - get + - list + - watch + - apiGroups: + - telemetry.kube-logging.dev + resources: + - oteloutputs/status + verbs: + - get diff --git a/config/rbac/telemetry_subscription_editor_role.yaml b/config/rbac/telemetry_subscription_editor_role.yaml index b51c8605..9c50569f 100644 --- a/config/rbac/telemetry_subscription_editor_role.yaml +++ b/config/rbac/telemetry_subscription_editor_role.yaml @@ -6,26 +6,26 @@ metadata: app.kubernetes.io/name: clusterrole app.kubernetes.io/instance: subscription-editor-role app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: subscription-operator - app.kubernetes.io/part-of: subscription-operator + app.kubernetes.io/created-by: telemetry-controller + app.kubernetes.io/part-of: telemetry-controller app.kubernetes.io/managed-by: kustomize name: subscription-editor-role rules: -- apiGroups: - - telemetry.kube-logging.dev - resources: - - subscriptions - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - telemetry.kube-logging.dev - resources: - - subscriptions/status - verbs: - - get + - apiGroups: + - telemetry.kube-logging.dev + resources: + - subscriptions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - telemetry.kube-logging.dev + resources: + - subscriptions/status + verbs: + - get diff --git a/config/rbac/telemetry_subscription_viewer_role.yaml b/config/rbac/telemetry_subscription_viewer_role.yaml index b8fef8fd..d904fced 100644 --- a/config/rbac/telemetry_subscription_viewer_role.yaml +++ b/config/rbac/telemetry_subscription_viewer_role.yaml @@ -6,22 +6,22 @@ metadata: app.kubernetes.io/name: clusterrole app.kubernetes.io/instance: subscription-viewer-role app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: subscription-operator - app.kubernetes.io/part-of: subscription-operator + app.kubernetes.io/created-by: telemetry-controller + app.kubernetes.io/part-of: telemetry-controller app.kubernetes.io/managed-by: kustomize name: subscription-viewer-role rules: -- apiGroups: - - telemetry.kube-logging.dev - resources: - - subscriptions - verbs: - - get - - list - - watch -- apiGroups: - - telemetry.kube-logging.dev - resources: - - subscriptions/status - verbs: - - get + - apiGroups: + - telemetry.kube-logging.dev + resources: + - subscriptions + verbs: + - get + - list + - watch + - apiGroups: + - telemetry.kube-logging.dev + resources: + - subscriptions/status + verbs: + - get diff --git a/config/rbac/telemetry_tenant_editor_role.yaml b/config/rbac/telemetry_tenant_editor_role.yaml index 348749d9..4526ce2e 100644 --- a/config/rbac/telemetry_tenant_editor_role.yaml +++ b/config/rbac/telemetry_tenant_editor_role.yaml @@ -6,26 +6,26 @@ metadata: app.kubernetes.io/name: clusterrole app.kubernetes.io/instance: tenant-editor-role app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: subscription-operator - app.kubernetes.io/part-of: subscription-operator + app.kubernetes.io/created-by: telemetry-controller + app.kubernetes.io/part-of: telemetry-controller app.kubernetes.io/managed-by: kustomize name: tenant-editor-role rules: -- apiGroups: - - telemetry.kube-logging.dev - resources: - - tenants - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - telemetry.kube-logging.dev - resources: - - tenants/status - verbs: - - get + - apiGroups: + - telemetry.kube-logging.dev + resources: + - tenants + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - telemetry.kube-logging.dev + resources: + - tenants/status + verbs: + - get diff --git a/config/rbac/telemetry_tenant_viewer_role.yaml b/config/rbac/telemetry_tenant_viewer_role.yaml index e1829215..4967b01b 100644 --- a/config/rbac/telemetry_tenant_viewer_role.yaml +++ b/config/rbac/telemetry_tenant_viewer_role.yaml @@ -6,22 +6,22 @@ metadata: app.kubernetes.io/name: clusterrole app.kubernetes.io/instance: tenant-viewer-role app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: subscription-operator - app.kubernetes.io/part-of: subscription-operator + app.kubernetes.io/created-by: telemetry-controller + app.kubernetes.io/part-of: telemetry-controller app.kubernetes.io/managed-by: kustomize name: tenant-viewer-role rules: -- apiGroups: - - telemetry.kube-logging.dev - resources: - - tenants - verbs: - - get - - list - - watch -- apiGroups: - - telemetry.kube-logging.dev - resources: - - tenants/status - verbs: - - get + - apiGroups: + - telemetry.kube-logging.dev + resources: + - tenants + verbs: + - get + - list + - watch + - apiGroups: + - telemetry.kube-logging.dev + resources: + - tenants/status + verbs: + - get diff --git a/config/samples/telemetry_v1alpha1_collector.yaml b/config/samples/telemetry_v1alpha1_collector.yaml index 0bc97241..f2e6d524 100644 --- a/config/samples/telemetry_v1alpha1_collector.yaml +++ b/config/samples/telemetry_v1alpha1_collector.yaml @@ -4,9 +4,9 @@ metadata: labels: app.kubernetes.io/name: collector app.kubernetes.io/instance: collector-sample - app.kubernetes.io/part-of: subscription-operator + app.kubernetes.io/part-of: telemetry-controller app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/created-by: subscription-operator + app.kubernetes.io/created-by: telemetry-controller name: collector-sample spec: tenantSelector: diff --git a/config/samples/telemetry_v1alpha1_oteloutput.yaml b/config/samples/telemetry_v1alpha1_oteloutput.yaml index bd3a12f5..2c74c947 100644 --- a/config/samples/telemetry_v1alpha1_oteloutput.yaml +++ b/config/samples/telemetry_v1alpha1_oteloutput.yaml @@ -4,9 +4,9 @@ metadata: labels: app.kubernetes.io/name: oteloutput app.kubernetes.io/instance: oteloutput-sample - app.kubernetes.io/part-of: subscription-operator + app.kubernetes.io/part-of: telemetry-controller app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/created-by: subscription-operator + app.kubernetes.io/created-by: telemetry-controller name: oteloutput-sample spec: otlp: diff --git a/config/samples/telemetry_v1alpha1_subscription.yaml b/config/samples/telemetry_v1alpha1_subscription.yaml index 4f7644bd..49391f35 100644 --- a/config/samples/telemetry_v1alpha1_subscription.yaml +++ b/config/samples/telemetry_v1alpha1_subscription.yaml @@ -4,9 +4,9 @@ metadata: labels: app.kubernetes.io/name: subscription app.kubernetes.io/instance: subscription-sample - app.kubernetes.io/part-of: subscription-operator + app.kubernetes.io/part-of: telemetry-controller app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/created-by: subscription-operator + app.kubernetes.io/created-by: telemetry-controller name: subscription-sample spec: outputs: diff --git a/config/samples/telemetry_v1alpha1_tenant.yaml b/config/samples/telemetry_v1alpha1_tenant.yaml index 4d3e9a50..de0a3083 100644 --- a/config/samples/telemetry_v1alpha1_tenant.yaml +++ b/config/samples/telemetry_v1alpha1_tenant.yaml @@ -4,13 +4,12 @@ metadata: labels: app.kubernetes.io/name: tenant app.kubernetes.io/instance: tenant-sample - app.kubernetes.io/part-of: subscription-operator + app.kubernetes.io/part-of: telemetry-controller app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/created-by: subscription-operator + app.kubernetes.io/created-by: telemetry-controller tenant: tenantA name: tenant-sample spec: subscriptionNamespaceSelector: matchLabels: nsTenant: tenantA - diff --git a/go.mod b/go.mod index 14a2ea23..5e69b879 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/kube-logging/subscription-operator +module github.com/kube-logging/telemetry-controller go 1.21 @@ -50,7 +50,7 @@ require ( github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/gnostic-models v0.6.8 // indirect - github.com/google/go-cmp v0.6.0 // indirect + github.com/google/go-cmp v0.6.0 github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect github.com/google/uuid v1.4.0 // indirect @@ -84,7 +84,7 @@ require ( google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 k8s.io/api v0.28.4 k8s.io/apiextensions-apiserver v0.28.4 // indirect diff --git a/internal/controller/telemetry/collector_controller.go b/internal/controller/telemetry/collector_controller.go index cf4900dd..7edbe731 100644 --- a/internal/controller/telemetry/collector_controller.go +++ b/internal/controller/telemetry/collector_controller.go @@ -34,7 +34,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/kube-logging/subscription-operator/api/telemetry/v1alpha1" + "github.com/kube-logging/telemetry-controller/api/telemetry/v1alpha1" "github.com/cisco-open/operator-tools/pkg/reconciler" otelv1alpha1 "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" diff --git a/internal/controller/telemetry/otel_conf_gen.go b/internal/controller/telemetry/otel_conf_gen.go index 2ed08aac..c1bf7006 100644 --- a/internal/controller/telemetry/otel_conf_gen.go +++ b/internal/controller/telemetry/otel_conf_gen.go @@ -19,7 +19,7 @@ import ( "slices" "strings" - "github.com/kube-logging/subscription-operator/api/telemetry/v1alpha1" + "github.com/kube-logging/telemetry-controller/api/telemetry/v1alpha1" "gopkg.in/yaml.v3" ) diff --git a/internal/controller/telemetry/otel_conf_gen_test.go b/internal/controller/telemetry/otel_conf_gen_test.go index d9a9c7a3..c0a12a07 100644 --- a/internal/controller/telemetry/otel_conf_gen_test.go +++ b/internal/controller/telemetry/otel_conf_gen_test.go @@ -23,7 +23,7 @@ import ( "github.com/stretchr/testify/assert" "gopkg.in/yaml.v2" - "github.com/kube-logging/subscription-operator/api/telemetry/v1alpha1" + "github.com/kube-logging/telemetry-controller/api/telemetry/v1alpha1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/internal/controller/telemetry/suite_test.go b/internal/controller/telemetry/suite_test.go index e5d23835..61178b3c 100644 --- a/internal/controller/telemetry/suite_test.go +++ b/internal/controller/telemetry/suite_test.go @@ -30,7 +30,7 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/log/zap" - telemetryv1alpha1 "github.com/kube-logging/subscription-operator/api/telemetry/v1alpha1" + telemetryv1alpha1 "github.com/kube-logging/telemetry-controller/api/telemetry/v1alpha1" //+kubebuilder:scaffold:imports )