Skip to content

Fix K8S_CLUSTER_URL discovery when running as a K8s job#14

Merged
PatAKnight merged 1 commit into
mainfrom
k8s-url-bug
Mar 12, 2026
Merged

Fix K8S_CLUSTER_URL discovery when running as a K8s job#14
PatAKnight merged 1 commit into
mainfrom
k8s-url-bug

Conversation

@PatAKnight

Copy link
Copy Markdown
Owner

Summary

Fixes a bug where the K8S_CLUSTER_URL isn't discovered when running as a job. This fix resolves that problem by checking if the scripts are running inside the cluster and then querying for the api endpoint of the cluster.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • New plugin support (adds integration for a new RHDH plugin)
  • Documentation update
  • Refactoring (no functional changes)
  • CI/CD changes

Related Issues

Closes #(issue number)

Changes Made

  • Change 1
  • Change 2
  • Change 3

Checklist

General

  • I have read the CONTRIBUTING guide
  • My code follows the project's code conventions
  • I have tested my changes against a real cluster
  • If upgrading RHDH version, verified values.yaml is compatible with new chart

Security

  • No secrets, tokens, or credentials are included in this PR
  • Secret templates contain only placeholders (empty strings or <PLACEHOLDER>)
  • No hardcoded cluster URLs or API endpoints

For Plugin Contributions

  • Documentation added in docs/<plugin-name>.md
  • Configuration script added in scripts/config-<plugin-name>-plugin.sh
  • config-plugins.sh updated with new mappings
  • Secret templates updated with new placeholders
  • Resource manifests added (if required)
  • All new scripts are executable (chmod +x)

Testing Notes

Describe how you tested these changes:

Screenshots (if applicable)

Add screenshots to help explain your changes.

Signed-off-by: Patrick Knight <pknight@redhat.com>
@PatAKnight PatAKnight merged commit be1a8a5 into main Mar 12, 2026
1 of 2 checks passed
@PatAKnight PatAKnight deleted the k8s-url-bug branch March 12, 2026 00:39
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.

1 participant