Skip to content

Commit

Permalink
feat: Rename telemetry-operator to telemetry-manager (kyma-project#811)
Browse files Browse the repository at this point in the history
Co-authored-by: Nina Hingerl <[email protected]>
  • Loading branch information
hisarbalik and NHingerl authored Feb 22, 2024
1 parent 069e397 commit 5c5afb5
Show file tree
Hide file tree
Showing 38 changed files with 95 additions and 90 deletions.
4 changes: 2 additions & 2 deletions .github/template/finalize-test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ runs:
shell: bash
if: ${{ inputs.failure }}
run: |
kubectl -n kyma-system describe pod -l "app.kubernetes.io/instance=telemetry, app.kubernetes.io/name=operator"
kubectl -n kyma-system describe pod -l "app.kubernetes.io/instance=telemetry, app.kubernetes.io/name=manager"
- name: Print manager logs
shell: bash
if: ${{ inputs.failure }}
run: |
kubectl -n kyma-system logs -l "app.kubernetes.io/instance=telemetry, app.kubernetes.io/name=operator"
kubectl -n kyma-system logs -l "app.kubernetes.io/instance=telemetry, app.kubernetes.io/name=manager"
- name: List Namespaces
shell: bash
Expand Down
6 changes: 3 additions & 3 deletions .github/template/prepare-test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Prepares everything for integration test execution

inputs:
release:
description: Deploy operator in release mode
description: Deploy manager in release mode
required: false
github-token:
description: Github token to use for github access
Expand Down Expand Up @@ -45,9 +45,9 @@ runs:
shell: bash
run: make deploy-dev

- name: Wait for operator readiness
- name: Wait for manager readiness
shell: bash
run: kubectl -n kyma-system rollout status deployment telemetry-operator --timeout=90s
run: kubectl -n kyma-system rollout status deployment telemetry-manager --timeout=90s

- name: Print cluster info
shell: bash
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/pr-lifecycle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,19 @@ jobs:
GITHUB_OWNER: "${{ github.repository_owner }}"
GITHUB_REPO: "telemetry-manager"

- name: Undeploy operator deployment
shell: bash
run: |
kubectl -n kyma-system scale deployment telemetry-operator --replicas 0
- name: Deploy with current version
shell: bash
run: |
IMG=europe-docker.pkg.dev/kyma-project/dev/telemetry-manager:PR-${{ github.event.number }} make deploy-dev
- name: Wait for operator readiness
- name: Wait for manager readiness
shell: bash
run: kubectl -n kyma-system rollout status deployment telemetry-operator --timeout=90s
run: kubectl -n kyma-system rollout status deployment telemetry-manager --timeout=90s

- name: Run test on current version
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ crd-docs-gen: tablegen ## Generates CRD spec into docs folder

.PHONY: manifests
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
$(CONTROLLER_GEN) rbac:roleName=operator-manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
$(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
$(MAKE) crd-docs-gen

.PHONY: generate
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[![REUSE status](https://api.reuse.software/badge/github.com/kyma-project/telemetry-manager)](https://api.reuse.software/info/github.com/kyma-project/telemetry-manager)

![GitHub tag checks state](https://img.shields.io/github/checks-status/kyma-project/telemetry-manager/main?label=telemetry-operator&link=https%3A%2F%2Fgithub.com%2Fkyma-project%2Ftelemetry-manager%2Fcommits%2Fmain)
![GitHub tag checks state](https://img.shields.io/github/checks-status/kyma-project/telemetry-manager/main?label=telemetry-manager&link=https%3A%2F%2Fgithub.com%2Fkyma-project%2Ftelemetry-manager%2Fcommits%2Fmain)

## Overview

Expand Down
6 changes: 3 additions & 3 deletions config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ namePrefix: telemetry-
labels:
- includeSelectors: false
pairs:
control-plane: telemetry-operator
control-plane: telemetry-manager
app.kubernetes.io/component: telemetry
app.kubernetes.io/part-of: kyma
app.kubernetes.io/name: telemetry-operator
app.kubernetes.io/instance: telemetry-operator
app.kubernetes.io/name: telemetry-manager
app.kubernetes.io/instance: telemetry-manager
app.kubernetes.io/managed-by: kustomize
resources:
- ../crd
Expand Down
6 changes: 3 additions & 3 deletions config/development/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ namePrefix: telemetry-
labels:
- includeSelectors: false
pairs:
control-plane: telemetry-operator
control-plane: telemetry-manager
app.kubernetes.io/component: telemetry
app.kubernetes.io/part-of: kyma
app.kubernetes.io/name: telemetry-operator
app.kubernetes.io/instance: telemetry-operator
app.kubernetes.io/name: telemetry-manager
app.kubernetes.io/instance: telemetry-manager
app.kubernetes.io/managed-by: kustomize

resources:
Expand Down
12 changes: 6 additions & 6 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: operator
name: manager
namespace: system
spec:
selector:
matchLabels:
app.kubernetes.io/name: operator
app.kubernetes.io/name: manager
app.kubernetes.io/instance: telemetry
kyma-project.io/component: controller
control-plane: telemetry-operator
control-plane: telemetry-manager
replicas: 1
template:
metadata:
annotations:
sidecar.istio.io/inject: "false"
kubectl.kubernetes.io/default-container: manager
labels:
app.kubernetes.io/name: operator
app.kubernetes.io/name: manager
app.kubernetes.io/instance: telemetry
kyma-project.io/component: controller
control-plane: telemetry-operator
control-plane: telemetry-manager
spec:
priorityClassName: "telemetry-priority-class"
securityContext:
Expand Down Expand Up @@ -71,5 +71,5 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
serviceAccountName: operator
serviceAccountName: manager
terminationGracePeriodSeconds: 10
6 changes: 3 additions & 3 deletions config/manager/metrics_service.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: Service
metadata:
name: operator-metrics
name: manager-metrics
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8080"
Expand All @@ -12,7 +12,7 @@ spec:
port: 8080
targetPort: 8080
selector:
app.kubernetes.io/name: operator
app.kubernetes.io/name: manager
app.kubernetes.io/instance: telemetry
kyma-project.io/component: controller
control-plane: telemetry-operator
control-plane: telemetry-manager
6 changes: 3 additions & 3 deletions config/networking/networkpolicy.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: operator
name: manager
spec:
podSelector:
matchLabels:
app.kubernetes.io/name: operator
app.kubernetes.io/name: manager
app.kubernetes.io/instance: telemetry
kyma-project.io/component: controller
control-plane: telemetry-operator
control-plane: telemetry-manager
policyTypes:
- Ingress
- Egress
Expand Down
2 changes: 1 addition & 1 deletion config/rbac/auth_proxy_role_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ roleRef:
name: proxy-role
subjects:
- kind: ServiceAccount
name: operator
name: manager
namespace: system
6 changes: 3 additions & 3 deletions config/rbac/auth_proxy_service.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: Service
metadata:
name: operator-metrics-secured
name: manager-metrics-secured
namespace: system
spec:
ports:
Expand All @@ -10,7 +10,7 @@ spec:
protocol: TCP
targetPort: https
selector:
app.kubernetes.io/name: operator
app.kubernetes.io/name: manager
app.kubernetes.io/instance: telemetry
kyma-project.io/component: controller
control-plane: telemetry-operator
control-plane: telemetry-manager
2 changes: 1 addition & 1 deletion config/rbac/leader_election_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: operator-leader-election-role
name: manager-leader-election-role
rules:
- apiGroups:
- ""
Expand Down
6 changes: 3 additions & 3 deletions config/rbac/leader_election_role_binding.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: operator-leader-election-rolebinding
name: manager-leader-election-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: telemetry-operator-leader-election-role
name: telemetry-manager-leader-election-role
subjects:
- kind: ServiceAccount
name: operator
name: manager
namespace: system
4 changes: 2 additions & 2 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: operator-manager-role
name: manager-role
rules:
- nonResourceURLs:
- /metrics
Expand Down Expand Up @@ -263,7 +263,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
creationTimestamp: null
name: operator-manager-role
name: manager-role
namespace: system
rules:
- apiGroups:
Expand Down
12 changes: 6 additions & 6 deletions config/rbac/role_binding.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: operator-manager-rolebinding
name: manager-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: telemetry-operator-manager-role
name: manager-role
subjects:
- kind: ServiceAccount
name: operator
name: manager
namespace: system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: operator-manager-rolebinding
name: manager-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: telemetry-operator-manager-role
name: manager-role
subjects:
- kind: ServiceAccount
name: operator
name: manager
namespace: system
2 changes: 1 addition & 1 deletion config/rbac/service_account.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: operator
name: manager
namespace: system
4 changes: 2 additions & 2 deletions config/samples/operator_v1alpha1_telemetry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ metadata:
labels:
app.kubernetes.io/name: telemetry
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: telemetry-operator
app.kubernetes.io/part-of: telemetry-manager
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/created-by: telemetry-operator
app.kubernetes.io/created-by: telemetry-manager
name: default

4 changes: 2 additions & 2 deletions config/samples/telemetry_v1alpha1_metricpipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ metadata:
labels:
app.kubernetes.io/name: metricpipeline
app.kubernetes.io/instance: metricpipeline-sample
app.kubernetes.io/part-of: telemetry-operator
app.kubernetes.io/part-of: telemetry-manager
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/created-by: telemetry-operator
app.kubernetes.io/created-by: telemetry-manager
name: metricpipeline-sample
spec:
input:
Expand Down
4 changes: 2 additions & 2 deletions config/webhook/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ webhooks:
- v1
clientConfig:
service:
name: telemetry-operator-webhook
name: telemetry-manager-webhook
namespace: system
path: /validate-logpipeline
port: 443
Expand All @@ -37,7 +37,7 @@ webhooks:
- v1
clientConfig:
service:
name: telemetry-operator-webhook
name: telemetry-manager-webhook
namespace: system
path: /validate-logparser
port: 443
Expand Down
6 changes: 3 additions & 3 deletions config/webhook/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
apiVersion: v1
kind: Service
metadata:
name: operator-webhook
name: manager-webhook
namespace: system
spec:
ports:
- port: 443
protocol: TCP
targetPort: 9443
selector:
app.kubernetes.io/name: operator
app.kubernetes.io/name: manager
app.kubernetes.io/instance: telemetry
kyma-project.io/component: controller
control-plane: telemetry-operator
control-plane: telemetry-manager
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The Telemetry Manager, which queries metrics from Prometheus, is not part of the
## Problem
When Prometheus is not part of the Istio service mesh, it will cause metrics data to be transported unencrypted. Thus, the metrics could be counterfeited. This would mean we get the wrong information about the possible issue with observability components. The side effects could be the following:
- Customer gets wrongly notified because of false positives.
- Telemetry operator gets the wrong decision about the scaling, like scaling down when scaling up is needed, thus causing data loss
- Telemetry Manager gets the wrong decision about the scaling, like scaling down when scaling up is needed, thus causing data loss

## Argument
- The network policy that enables Telemetry Manager to accept data from a desired IP address in the Kubernetes cluster reduces the attack vector. It also increases the attack complexity because the attacker would need access to the underlying node to perform the attack.
Expand Down
Loading

0 comments on commit 5c5afb5

Please sign in to comment.