Validate required env vars before leader election

Open Beginner friendly
#276 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
go, kubernetes

Research direction

Start in main.go, then compare with Initialize in internal/provider/provider.go to understand when configuration is currently checked. Trace the controller-manager startup path and identify where validation can run before leader election. Done means missing OXIDE_HOST, OXIDE_TOKEN, or OXIDE_PROJECT stops the process at startup with one clear message listing the missing variables.

Written by the indexing model from the issue text.

Description

Bug Kubernetes Cloud Controller Manager (CCM)

Context

Initialize (internal/provider/provider.go) calls klog.Fatalf when OXIDE_PROJECT is missing or the Oxide client can't be built — but Initialize runs after winning leader election, so a misconfigured deployment crash-loops while holding/churning the lease.

Scope

Validate OXIDE_HOST, OXIDE_TOKEN, and OXIDE_PROJECT at process start in main.go, before the controller-manager command runs, and fail with a clear message listing what's missing.

Done when

A missing env var fails the process at startup, before leader election, with an actionable error.

Dominant language
Go
Stars
6
Forks
2
Avg merge
2h 5m
Merged PRs (30d)
14

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from oxidecomputer/oxide-cloud-controller-manager

All issues in oxidecomputer/oxide-cloud-controller-manager

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.