Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into perf-test-otel-logs
Browse files Browse the repository at this point in the history
  • Loading branch information
k15r committed Aug 13, 2024
2 parents 77b1965 + b19ba1d commit 274d7b2
Show file tree
Hide file tree
Showing 39 changed files with 327 additions and 1,123 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build Image

on:
pull_request_target:
types: [ opened, edited, synchronize, reopened, ready_for_review ]
types: [opened, edited, synchronize, reopened, ready_for_review]
branches:
- "main"
- "release-[0-9]+.[0-9]+"
Expand All @@ -13,7 +13,6 @@ on:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
jobs:

envs:
runs-on: ubuntu-latest
outputs:
Expand All @@ -33,7 +32,7 @@ jobs:
needs: envs
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: telemetry-manager
name: telemetry-manager
dockerfile: Dockerfile
context: .
tags: ${{ needs.envs.outputs.tags }}
Expand All @@ -53,7 +52,7 @@ jobs:
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_HUSKIES_NOTIF_WEBHOOK_URL }}

list-images:
Build-Image-Success:
needs: build-image
runs-on: ubuntu-latest
steps:
Expand Down
27 changes: 19 additions & 8 deletions .github/workflows/pr-code-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
- "main"
- "release-*"
paths-ignore:
- 'docs/**'
- '**.md'
- "docs/**"
- "**.md"
workflow_dispatch:

env:
Expand All @@ -17,14 +17,14 @@ jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Checkout repo
uses: actions/checkout@v4

- name: Setup Golang
uses: "./.github/template/setup-golang"
- name: Setup Golang
uses: "./.github/template/setup-golang"

- name: Run tests
run: make test
- name: Run tests
run: make test

lint:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -64,3 +64,14 @@ jobs:
env:
PULL_BASE_SHA: ${{ github.event.pull_request.base.sha }}
PULL_HEAD_SHA: ${{ github.event.pull_request.head.sha }}

PR-Code-Checks-Success:
needs:
- unit-tests
- lint
- coverage
- gitleaks
runs-on: ubuntu-latest
steps:
- name: Hurray
run: echo Hurray
10 changes: 9 additions & 1 deletion .github/workflows/pr-docu-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,17 @@ jobs:
- name: Install node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: "20.x"
- name: Install md-check-link
run: npm install -g md-check-link
- name: Verify links
run: |
md-check-link -q -n 8 -c https://raw.githubusercontent.com/kyma-project/md-check-link/main/.mlc.config.json ./
PR-Docu-Checks-Success:
needs: [verify-manifests, markdown-link-check]
runs-on: ubuntu-latest
steps:
- name: Success
run: |
echo "PR Docu Checks completed successfully"
10 changes: 8 additions & 2 deletions .github/workflows/pr-github-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ jobs:
run: |
echo "${MILESTONE}" | jq -e '.!=null' || (echo "Milestone is not set"; exit 1)
pr-label-check:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -53,7 +52,6 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}


pr-title-check:
runs-on: ubuntu-latest
steps:
Expand All @@ -71,3 +69,11 @@ jobs:
test
requireScope: false
subjectPattern: ^([A-Z].*[^.]|bump .*)$

PR-Github-Checks-Success:
needs: [pr-milestone-check, pr-label-check, pr-title-check]
runs-on: ubuntu-latest
steps:
- name: PR Github Checks Success
run: |
echo "PR Github Checks Success"
26 changes: 17 additions & 9 deletions .github/workflows/pr-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
fail-fast: false
matrix:
ginkgo-labels:
- logs
- metrics
- traces
- telemetry
- max-pipeline
- telemetry-log-analysis
- logs
- metrics
- traces
- telemetry
- max-pipeline
- telemetry-log-analysis
runs-on: ubuntu-latest
steps:
- name: Checkout repo
Expand All @@ -50,9 +50,9 @@ jobs:
fail-fast: false
matrix:
ginkgo-labels:
- logs
- metrics
- traces
- logs
- metrics
- traces
runs-on: ubuntu-latest
steps:
- name: Checkout repo
Expand Down Expand Up @@ -140,3 +140,11 @@ jobs:
if: success() || failure()
with:
failure: failure()

PR-Integration-Success:
needs: [e2e, e2e-dev, e2e-istio, e2e-self-mon]
runs-on: ubuntu-latest
steps:
- name: Success
run: |
echo "PR Integration completed successfully"
10 changes: 9 additions & 1 deletion .github/workflows/pr-lifecycle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,19 @@ jobs:
- name: Run test on current version
shell: bash
run: |
make install-tools # delete after the tools via go modules are released
make install-tools # delete after the tools via go modules are released
bin/ginkgo run --tags e2e --flake-attempts=5 --label-filter="operational" -v test/e2e
- name: Finalize test
uses: "./.github/template/finalize-test"
if: success() || failure()
with:
failure: failure()

PR-Lifecycle-Success:
needs: manager-upgrade
runs-on: ubuntu-latest
steps:
- name: Success
run: |
echo "PR Lifecycle completed successfully"
10 changes: 0 additions & 10 deletions .mockery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,6 @@ packages:
github.com/kyma-project/telemetry-manager/internal/selfmonitor/prober:
interfaces:
alertGetter:
github.com/kyma-project/telemetry-manager/webhook/dryrun:
interfaces:
commandRunner:
fileWriter:
github.com/kyma-project/telemetry-manager/webhook/logparser:
interfaces:
DryRunner:
github.com/kyma-project/telemetry-manager/webhook/logpipeline:
interfaces:
DryRunner:
github.com/kyma-project/telemetry-manager/webhook/logpipeline/validation:
interfaces:
FilesValidator:
Expand Down
2 changes: 0 additions & 2 deletions .testcoverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ override:
path: ^internal/resourcelock$
- threshold: 86
path: ^internal/webhookcert$
- threshold: 75
path: ^webhook/dryrun$
- threshold: 70
path: ^webhook/logpipeline

Expand Down
3 changes: 3 additions & 0 deletions config/development/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ patches:
- op: add
path: /spec/template/spec/containers/0/args/-
value: --kyma-input-allowed=true
- op: add
path: /spec/template/spec/containers/0/args/-
value: --k8s-cluster-receiver-allowed=true
target:
kind: Deployment
name: manager
Expand Down
123 changes: 123 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ rules:
- events
verbs:
- create
- get
- list
- patch
- watch
- apiGroups:
- ""
resources:
Expand All @@ -35,6 +38,14 @@ rules:
- get
- list
- watch
- apiGroups:
- ""
resources:
- namespaces/status
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
Expand All @@ -51,6 +62,14 @@ rules:
- get
- list
- watch
- apiGroups:
- ""
resources:
- nodes/spec
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
Expand All @@ -67,6 +86,38 @@ rules:
- get
- list
- watch
- apiGroups:
- ""
resources:
- pods/status
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- replicationcontrollers
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- replicationcontrollers/status
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- resourcequotas
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
Expand Down Expand Up @@ -106,6 +157,78 @@ rules:
- apiGroups:
- apps
resources:
- daemonsets
verbs:
- get
- list
- watch
- apiGroups:
- apps
resources:
- deployments
verbs:
- get
- list
- watch
- apiGroups:
- apps
resources:
- replicasets
verbs:
- get
- list
- watch
- apiGroups:
- apps
resources:
- statefulsets
verbs:
- get
- list
- watch
- apiGroups:
- autoscaling
resources:
- horizontalpodautoscalers
verbs:
- get
- list
- watch
- apiGroups:
- batch
resources:
- cronjobs
verbs:
- get
- list
- watch
- apiGroups:
- batch
resources:
- jobs
verbs:
- get
- list
- watch
- apiGroups:
- extensions
resources:
- daemonsets
verbs:
- get
- list
- watch
- apiGroups:
- extensions
resources:
- deployments
verbs:
- get
- list
- watch
- apiGroups:
- extensions
resources:
- replicasets
verbs:
- get
Expand Down
2 changes: 1 addition & 1 deletion controllers/telemetry/metricpipeline_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func NewMetricPipelineController(client client.Client, reconcileTriggerChan <-ch
}

agentRBAC := otelcollector.MakeMetricAgentRBAC(types.NamespacedName{Name: config.Agent.BaseName, Namespace: config.Agent.Namespace})
gatewayRBAC := otelcollector.MakeMetricGatewayRBAC(types.NamespacedName{Name: config.Gateway.BaseName, Namespace: config.Gateway.Namespace}, config.KymaInputAllowed)
gatewayRBAC := otelcollector.MakeMetricGatewayRBAC(types.NamespacedName{Name: config.Gateway.BaseName, Namespace: config.Gateway.Namespace}, config.KymaInputAllowed, config.K8sClusterReceiverAllowed)

reconciler := metricpipeline.New(
client,
Expand Down
Loading

0 comments on commit 274d7b2

Please sign in to comment.