Skip to content
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

[Feature] possibility to check log contents #1896

Open
1 task done
camaeel opened this issue Aug 28, 2024 · 0 comments
Open
1 task done

[Feature] possibility to check log contents #1896

camaeel opened this issue Aug 28, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@camaeel
Copy link

camaeel commented Aug 28, 2024

Problem Statement

I would like to have a step to check pod log contents in automated and convenient way.

Solution Description

It would be great if podLogs could be used in try blocks, and checked for contents (just as command/script).

Alternatives

Workaround is to wait for workload to complete and check pod logs:

        - description: Check if pod logs contain information that the file was created.
          script:
            env:
              - name: namespace
                value: ($namespace)
            content:
              kubectl logs -n $namespace -l app=test-ebs-velero
            check:
              (contains($stdout, 'File /data/test.txt not exists. Creating')): true

Additional Context

No response

Slack discussion

No response

Research

  • I have searched other issues in this repository and mine is not recorded.
@camaeel camaeel added the enhancement New feature or request label Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants
@camaeel and others