Skip to content

Add harvester_api_server output to harvester-integration module#60

Merged
HiranAdikari merged 2 commits intowso2:mainfrom
HiranAdikari:feature/57-harvester-api-server-output
Apr 21, 2026
Merged

Add harvester_api_server output to harvester-integration module#60
HiranAdikari merged 2 commits intowso2:mainfrom
HiranAdikari:feature/57-harvester-api-server-output

Conversation

@HiranAdikari
Copy link
Copy Markdown
Contributor

Summary

  • Adds harvester_api_server output to modules/management/harvester-integration
  • Value is extracted from local._matched_cluster.cluster.server — already computed internally, no new parsing
  • Marked sensitive = true (derives from harvester_kubeconfig)
  • Returns null when create_cloud_credential = false (brownfield)

Why

Consumers that provision RKE2 clusters via harvester-cloud-credential need the direct Harvester API URL (https://<vip>:6443). Without this output they must hardcode the VIP, which is environment-specific and error-prone.

Consumer pattern

# 02-management/outputs.tf
output "harvester_api_server" {
  value     = module.harvester_integration.harvester_api_server
  sensitive = true
}

# 08-workloads — via remote state
module "my_cluster_cred" {
  source               = "...harvester-cloud-credential..."
  harvester_api_server = data.terraform_remote_state.management.outputs.harvester_api_server
  ...
}

Test plan

  • Apply 02-management with create_cloud_credential = true — verify output matches the VIP in the kubeconfig
  • Apply with create_cloud_credential = false — verify output is null

Closes #57

🤖 Generated with Claude Code

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 17, 2026

Warning

Rate limit exceeded

@HiranAdikari has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 57 minutes and 54 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 57 minutes and 54 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 74bf1f17-8c6c-4206-afbb-f112cc760ae6

📥 Commits

Reviewing files that changed from the base of the PR and between c64fe87 and 8b19de7.

📒 Files selected for processing (2)
  • modules/management/harvester-integration/main.tf
  • modules/management/harvester-integration/outputs.tf
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

gnudeep
gnudeep previously approved these changes Apr 17, 2026
Uvindu96
Uvindu96 previously approved these changes Apr 20, 2026
gnudeep
gnudeep previously approved these changes Apr 20, 2026
HiranAdikari and others added 2 commits April 21, 2026 10:36
Exposes the Harvester Kubernetes API server URL extracted from
the kubeconfig so downstream layers can pass it to the
harvester-cloud-credential module without hardcoding the VIP.

Marked sensitive because it derives from the kubeconfig input.
Returns null when create_cloud_credential = false.

Closes wso2#57

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Checkov CKV_K8S_21 flags resources placed in the default namespace.
Move the rancher-cloud-credential ServiceAccount and its token Secret
to kube-system, which is the conventional namespace for infrastructure-
level service accounts.

The ClusterRoleBinding subject namespace reference is derived from
the ServiceAccount metadata, so no separate change is needed there.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@HiranAdikari HiranAdikari dismissed stale reviews from gnudeep and Uvindu96 via 8b19de7 April 21, 2026 05:07
@HiranAdikari HiranAdikari force-pushed the feature/57-harvester-api-server-output branch from f260857 to 8b19de7 Compare April 21, 2026 05:07
@HiranAdikari HiranAdikari merged commit 72cb731 into wso2:main Apr 21, 2026
3 of 4 checks passed
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.

Fix: Condition ssh_pwauth and lock_passwd on password variable in cloud-init template

3 participants