Skip to content

Conversation

chahatsagarmain
Copy link
Contributor

@chahatsagarmain chahatsagarmain commented Jul 18, 2025

Which problem is this PR solving?

Screenshot_20250730_224420

Description of the changes

  • Added Github action workflow to configure kubectl to access OKE and deploy from the bash script .

How was this change tested?

Checklist

Signed-off-by: chahat sagar <109112505+chahatsagarmain@users.noreply.github.com>
@chahatsagarmain chahatsagarmain requested a review from a team as a code owner July 18, 2025 19:19
@chahatsagarmain chahatsagarmain marked this pull request as draft July 18, 2025 19:19
@chahatsagarmain chahatsagarmain marked this pull request as ready for review July 29, 2025 19:35
@chahatsagarmain chahatsagarmain changed the title [WIP] Automate Jaeger Demo Deployment to OKE Using GitHub Actions Automate Jaeger Demo Deployment to OKE Using GitHub Actions Jul 29, 2025
Copy link

codecov bot commented Jul 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.47%. Comparing base (14a5f79) to head (cd3d716).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7334      +/-   ##
==========================================
+ Coverage   96.44%   96.47%   +0.03%     
==========================================
  Files         375      375              
  Lines       22951    22951              
==========================================
+ Hits        22135    22143       +8     
+ Misses        617      611       -6     
+ Partials      199      197       -2     
Flag Coverage Δ
badger_v1 9.06% <ø> (ø)
badger_v2 1.71% <ø> (ø)
cassandra-4.x-v1-manual 11.77% <ø> (ø)
cassandra-4.x-v2-auto 1.70% <ø> (ø)
cassandra-4.x-v2-manual 1.70% <ø> (ø)
cassandra-5.x-v1-manual 11.77% <ø> (ø)
cassandra-5.x-v2-auto 1.70% <ø> (ø)
cassandra-5.x-v2-manual 1.70% <ø> (ø)
elasticsearch-6.x-v1 16.72% <ø> (ø)
elasticsearch-7.x-v1 16.76% <ø> (ø)
elasticsearch-8.x-v1 16.90% <ø> (ø)
elasticsearch-8.x-v2 1.71% <ø> (ø)
elasticsearch-9.x-v2 1.71% <ø> (ø)
grpc_v1 10.29% <ø> (ø)
grpc_v2 1.71% <ø> (ø)
kafka-3.x-v1 9.22% <ø> (ø)
kafka-3.x-v2 1.71% <ø> (ø)
memory_v2 1.71% <ø> (ø)
opensearch-1.x-v1 16.81% <ø> (ø)
opensearch-2.x-v1 16.81% <ø> (ø)
opensearch-2.x-v2 1.71% <ø> (-0.09%) ⬇️
opensearch-3.x-v2 1.71% <ø> (ø)
query 1.71% <ø> (ø)
tailsampling-processor 0.47% <ø> (ø)
unittests 95.45% <ø> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@chahatsagarmain chahatsagarmain changed the title Automate Jaeger Demo Deployment to OKE Using GitHub Actions [wip] Automate Jaeger Demo Deployment to OKE Using GitHub Actions Jul 29, 2025
Signed-off-by: chahat sagar <109112505+chahatsagarmain@users.noreply.github.com>
Signed-off-by: chahat sagar <109112505+chahatsagarmain@users.noreply.github.com>
Comment on lines 32 to 33
- name: Clone Jaeger repository
run: git clone https://github.com/jaegertracing/jaeger.git
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current approach clones the main branch of the Jaeger repository regardless of which branch or PR triggered the workflow. For PR and push events, this means you're not testing the actual code changes being proposed.

Consider replacing this with the standard GitHub checkout action:

- name: Checkout code
  uses: actions/checkout@v3

This will automatically check out the correct branch or PR that triggered the workflow, ensuring you're testing the actual changes under review rather than the main branch.

Suggested change
- name: Clone Jaeger repository
run: git clone https://github.com/jaegertracing/jaeger.git
- name: Checkout code
uses: actions/checkout@v3

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

Signed-off-by: chahat sagar <109112505+chahatsagarmain@users.noreply.github.com>
Signed-off-by: chahat sagar <109112505+chahatsagarmain@users.noreply.github.com>
Signed-off-by: chahat sagar <109112505+chahatsagarmain@users.noreply.github.com>
Signed-off-by: chahat sagar <109112505+chahatsagarmain@users.noreply.github.com>
Signed-off-by: chahat sagar <109112505+chahatsagarmain@users.noreply.github.com>
Comment on lines 34 to 40
- name: Clone Jaeger repository
run: git clone https://github.com/jaegertracing/jaeger.git

- name: Deploy using Jaeger's deploy-all.sh
run: |
cd ./jaeger/examples/oci
bash ./deploy-all.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow should use actions/checkout@v3 instead of manually cloning the repository. The current approach creates a fresh clone rather than using the repository context where the workflow is running, which can cause path inconsistencies and doesn't reflect the actual code being submitted in the PR.

Consider replacing:

- name: Clone Jaeger repository
  run: git clone https://github.com/jaegertracing/jaeger.git

- name: Deploy using Jaeger's deploy-all.sh
  run: |
    cd ./jaeger/examples/oci
    bash ./deploy-all.sh

With:

- name: Checkout repository
  uses: actions/checkout@v3

- name: Deploy using Jaeger's deploy-all.sh
  run: |
    cd ./examples/oci
    bash ./deploy-all.sh

This ensures the workflow operates on the correct version of the code and simplifies the path references.

Suggested change
- name: Clone Jaeger repository
run: git clone https://github.com/jaegertracing/jaeger.git
- name: Deploy using Jaeger's deploy-all.sh
run: |
cd ./jaeger/examples/oci
bash ./deploy-all.sh
- name: Checkout repository
uses: actions/checkout@v3
- name: Deploy using Jaeger's deploy-all.sh
run: |
cd ./examples/oci
bash ./deploy-all.sh

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

Signed-off-by: chahat sagar <109112505+chahatsagarmain@users.noreply.github.com>
Comment on lines 28 to 34
- name: Debug Secrets
run: |
echo "OCI_CLI_USER: ${OCI_CLI_USER}"
echo "OCI_CLI_TENANCY: ${OCI_CLI_TENANCY}"
echo "OCI_CLI_FINGERPRINT: ${OCI_CLI_FINGERPRINT}"
echo "OCI_CLI_KEY_CONTENT: ${OCI_CLI_KEY_CONTENT}"
echo "OCI_CLI_REGION: ${OCI_CLI_REGION}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Security Concern: The Debug Secrets step is printing credential variables to the logs. While GitHub Actions will mask the actual secret values in the output, explicitly printing credentials is a security anti-pattern that should be avoided.

If verification of environment variables is needed, consider:

- name: Verify OCI credentials are set
  run: |
    [[ -n "$OCI_CLI_USER" ]] && echo "OCI_CLI_USER is set" || echo "OCI_CLI_USER is not set"
    [[ -n "$OCI_CLI_TENANCY" ]] && echo "OCI_CLI_TENANCY is set" || echo "OCI_CLI_TENANCY is not set"
    # Similar checks for other variables

For a production workflow, this debug step should be removed entirely once the deployment is working correctly.

Suggested change
- name: Debug Secrets
run: |
echo "OCI_CLI_USER: ${OCI_CLI_USER}"
echo "OCI_CLI_TENANCY: ${OCI_CLI_TENANCY}"
echo "OCI_CLI_FINGERPRINT: ${OCI_CLI_FINGERPRINT}"
echo "OCI_CLI_KEY_CONTENT: ${OCI_CLI_KEY_CONTENT}"
echo "OCI_CLI_REGION: ${OCI_CLI_REGION}"
- name: Verify OCI credentials are set
run: |
[[ -n "$OCI_CLI_USER" ]] && echo "OCI_CLI_USER is set" || echo "OCI_CLI_USER is not set"
[[ -n "$OCI_CLI_TENANCY" ]] && echo "OCI_CLI_TENANCY is set" || echo "OCI_CLI_TENANCY is not set"
[[ -n "$OCI_CLI_FINGERPRINT" ]] && echo "OCI_CLI_FINGERPRINT is set" || echo "OCI_CLI_FINGERPRINT is not set"
[[ -n "$OCI_CLI_KEY_CONTENT" ]] && echo "OCI_CLI_KEY_CONTENT is set" || echo "OCI_CLI_KEY_CONTENT is not set"
[[ -n "$OCI_CLI_REGION" ]] && echo "OCI_CLI_REGION is set" || echo "OCI_CLI_REGION is not set"

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

Signed-off-by: chahat sagar <109112505+chahatsagarmain@users.noreply.github.com>
Signed-off-by: chahat sagar <109112505+chahatsagarmain@users.noreply.github.com>
OCI_CLI_REGION: ${{ secrets.OCI_CLI_REGION }}

steps:
- name: Debug Secrets
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will not have access to secrets from a PR workflow, only when it's triggered from main.

Signed-off-by: chahat sagar <109112505+chahatsagarmain@users.noreply.github.com>
Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you tested the deploy script itself then just clean this pr and we can run it from main.


on:
schedule:
- cron: '0 5 * * *' # Daily at 5 AM UTC
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the deploy fails I would rather it happens on US ET time, not at midnight .

Comment on lines 26 to 38
- name: Debug Secrets
env: # Correctly placed at the same level as 'run'
OCI_CLI_USER: ${{ secrets.OCI_CLI_USER }}
OCI_CLI_TENANCY: ${{ secrets.OCI_CLI_TENANCY }}
OCI_CLI_FINGERPRINT: ${{ secrets.OCI_CLI_FINGERPRINT }}
OCI_CLI_KEY_CONTENT: ${{ secrets.OCI_CLI_KEY_CONTENT }}
OCI_CLI_REGION: ${{ secrets.OCI_CLI_REGION }}
run: |
echo "OCI_CLI_USER: ${OCI_CLI_USER}"
echo "OCI_CLI_TENANCY: ${OCI_CLI_TENANCY}"
echo "OCI_CLI_FINGERPRINT: ${OCI_CLI_FINGERPRINT}"
echo "OCI_CLI_KEY_CONTENT: ${OCI_CLI_KEY_CONTENT}"
echo "OCI_CLI_REGION: ${OCI_CLI_REGION}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Security Concern: The debug step is printing sensitive authentication credentials to the console logs. This exposes secrets like API keys and fingerprints that could be compromised if logs are accessible to unauthorized users.

Recommendation: Remove this debug step entirely for production workflows. If verification is needed, consider:

- name: Verify Secrets Exist
  run: |
    [[ -n "$OCI_CLI_USER" ]] && echo "OCI_CLI_USER is set" || echo "OCI_CLI_USER is not set"
    [[ -n "$OCI_CLI_TENANCY" ]] && echo "OCI_CLI_TENANCY is set" || echo "OCI_CLI_TENANCY is not set"
    # Similar checks for other secrets

This approach confirms secrets are available without exposing their actual values.

Suggested change
- name: Debug Secrets
env: # Correctly placed at the same level as 'run'
OCI_CLI_USER: ${{ secrets.OCI_CLI_USER }}
OCI_CLI_TENANCY: ${{ secrets.OCI_CLI_TENANCY }}
OCI_CLI_FINGERPRINT: ${{ secrets.OCI_CLI_FINGERPRINT }}
OCI_CLI_KEY_CONTENT: ${{ secrets.OCI_CLI_KEY_CONTENT }}
OCI_CLI_REGION: ${{ secrets.OCI_CLI_REGION }}
run: |
echo "OCI_CLI_USER: ${OCI_CLI_USER}"
echo "OCI_CLI_TENANCY: ${OCI_CLI_TENANCY}"
echo "OCI_CLI_FINGERPRINT: ${OCI_CLI_FINGERPRINT}"
echo "OCI_CLI_KEY_CONTENT: ${OCI_CLI_KEY_CONTENT}"
echo "OCI_CLI_REGION: ${OCI_CLI_REGION}"
- name: Verify Secrets Exist
env: # Correctly placed at the same level as 'run'
OCI_CLI_USER: ${{ secrets.OCI_CLI_USER }}
OCI_CLI_TENANCY: ${{ secrets.OCI_CLI_TENANCY }}
OCI_CLI_FINGERPRINT: ${{ secrets.OCI_CLI_FINGERPRINT }}
OCI_CLI_KEY_CONTENT: ${{ secrets.OCI_CLI_KEY_CONTENT }}
OCI_CLI_REGION: ${{ secrets.OCI_CLI_REGION }}
run: |
[[ -n "$OCI_CLI_USER" ]] && echo "OCI_CLI_USER is set" || echo "OCI_CLI_USER is not set"
[[ -n "$OCI_CLI_TENANCY" ]] && echo "OCI_CLI_TENANCY is set" || echo "OCI_CLI_TENANCY is not set"
[[ -n "$OCI_CLI_FINGERPRINT" ]] && echo "OCI_CLI_FINGERPRINT is set" || echo "OCI_CLI_FINGERPRINT is not set"
[[ -n "$OCI_CLI_KEY_CONTENT" ]] && echo "OCI_CLI_KEY_CONTENT is set" || echo "OCI_CLI_KEY_CONTENT is not set"
[[ -n "$OCI_CLI_REGION" ]] && echo "OCI_CLI_REGION is set" || echo "OCI_CLI_REGION is not set"

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

Signed-off-by: chahat sagar <109112505+chahatsagarmain@users.noreply.github.com>
@chahatsagarmain chahatsagarmain marked this pull request as draft July 30, 2025 13:52
Signed-off-by: chahat sagar <109112505+chahatsagarmain@users.noreply.github.com>
Signed-off-by: chahat sagar <109112505+chahatsagarmain@users.noreply.github.com>
Signed-off-by: chahat sagar <109112505+chahatsagarmain@users.noreply.github.com>
Signed-off-by: chahat sagar <109112505+chahatsagarmain@users.noreply.github.com>
Signed-off-by: chahat sagar <109112505+chahatsagarmain@users.noreply.github.com>
@chahatsagarmain chahatsagarmain changed the title [wip] Automate Jaeger Demo Deployment to OKE Using GitHub Actions Automate Jaeger Demo Deployment to OKE Using GitHub Actions Jul 30, 2025
@chahatsagarmain chahatsagarmain marked this pull request as ready for review July 30, 2025 17:18
@yurishkuro yurishkuro added the changelog:exprimental Change to an experimental part of the code label Jul 30, 2025
@yurishkuro yurishkuro enabled auto-merge July 30, 2025 19:35
@yurishkuro yurishkuro added this pull request to the merge queue Jul 30, 2025
Merged via the queue into jaegertracing:main with commit 2ab9ba5 Jul 30, 2025
63 of 65 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:exprimental Change to an experimental part of the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants