Skip to content

Nirmata 0.130.x #13486

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: release/v0.130.x
Choose a base branch
from

Conversation

jigar-joshi-nirmata
Copy link

Description

Link to tracking issue

Fixes #

Testing

Documentation

…or Docker images

- Add comprehensive workflow for building and pushing multiarch images
- Support linux/amd64 and linux/arm64 platforms
- Automated builds on push to main/nirmata-0.130.x branches
- Manual workflow dispatch with configurable options
- Built-in security scanning with Trivy
- SBOM and provenance attestations
- Push to ghcr.io/nirmata/opentelemetry-collector
- Proper authentication using GITHUB_TOKEN
- Version tagging: 0.130.1, 0.130, latest
- PR builds for testing (no push)
- Image functionality testing
- Comprehensive status reporting

This resolves authentication issues by using repository's
built-in permissions instead of personal access tokens.
- Add security-events: write for Trivy scan SARIF uploads
- Add actions: read for workflow details access
- Add attestations: write for SBOM and provenance attestations
- Ensures compatibility with GitHub Security tab integration
- Aligns with repository security workflow patterns (CodeQL, Scorecard)
- Add fallback authentication using CONTAINER_REGISTRY_TOKEN secret
- Add conditional push logic to prevent failures when token unavailable
- Support multiple authentication methods: org token, repo secret, or GITHUB_TOKEN
- Graceful handling of permission issues in organization repositories

To fix the permission_denied error:
1. Add CONTAINER_REGISTRY_TOKEN secret with the provided PAT, OR
2. Enable organization package permissions for workflows, OR
3. Create organization-level token with write:packages permission
- Use github.repository_owner instead of hardcoded 'nirmata'
- Use CR_PAT secret pattern that works in other Nirmata repos
- Match authentication approach from enterprise-kyverno workflow
- Remove conditional push logic that was causing issues
- This pattern is proven to work in nirmata/enterprise-kyverno

Based on working workflow:
https://github.com/nirmata/enterprise-kyverno/blob/main/.github/workflows/release.yaml
Analysis of working nirmata/enterprise-kyverno workflow shows:
- Main publishing uses secrets.GITHUB_TOKEN (not CR_PAT)
- CR_PAT only used in reusable workflow calls
- Our workflow now matches their exact authentication pattern

This should resolve permission_denied issues since enterprise-kyverno
successfully pushes to ghcr.io/nirmata/* using this approach.
Add the Prometheus receiver and prometheusremotewrite exporter to the builder configuration
Rebuild the collector with these additional components
@jigar-joshi-nirmata jigar-joshi-nirmata requested a review from a team as a code owner July 25, 2025 10:07
Copy link

linux-foundation-easycla bot commented Jul 25, 2025

CLA Not Signed

@jigar-joshi-nirmata jigar-joshi-nirmata changed the base branch from main to release/v0.130.x July 25, 2025 10:07
@jade-guiton-dd
Copy link
Contributor

What is this PR meant to do? Did you mean to open it on the upstream Collector repository?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants