Skip to content

AUTOSCALE-588: Initialize repo structure #4

Open
maxcao13 wants to merge 3 commits intoopenshift:mainfrom
maxcao13:initting-repo
Open

AUTOSCALE-588: Initialize repo structure #4
maxcao13 wants to merge 3 commits intoopenshift:mainfrom
maxcao13:initting-repo

Conversation

@maxcao13
Copy link
Copy Markdown
Member

@maxcao13 maxcao13 commented Apr 22, 2026

Adds the initial repository structure for karpenter-operator:

  • Dockerfile, Makefile, .gitignore, go.mod with vendored dependencies
  • CVO install manifests: namespace, operator Deployment, ClusterOperator
    CR, and image-references
  • Minimal operator binary (cmd/main.go) that starts a controller-runtime
    manager with health/ready probes
  • pkg/operator with Options (flags + env) and a stub Run()
  • pkg/version for build-time version injection
  • golangci-lint with some opinionated rules enabled

Helped with cursor + claude opus 4.6.

The operator builds and starts but doesn't do anything yet.

Anyone can test on a cluster with:

IMG=quay.io/macao/karpenter-operator:latest make deploy

I separated the vendor commit because it's a million lines, so just ignore the second commit when reviewing.

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 22, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 22, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Apr 22, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Apr 22, 2026

@maxcao13: This pull request references AUTOSCALE-588 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Adds the initial repository structure for karpenter-operator:

  • Dockerfile, Makefile, .gitignore, go.mod with vendored dependencies
  • CVO install manifests: namespace, operator Deployment, ClusterOperator
    CR, and image-references
  • Minimal operator binary (cmd/main.go) that starts a controller-runtime
    manager with health/ready probes
  • pkg/operator with Options (flags + env) and a stub Run()
  • pkg/version for build-time version injection

Helped with cursor + claude opus 4.6.

The operator builds and starts but doesn't do anything yet.

Anyone can test on a cluster with:

IMG=quay.io/macao/karpenter-operator:latest make deploy

I've also added github actions for simple checks like linting so we don't waste prow infra (and since hypershift does it).

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Apr 22, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: maxcao13

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 22, 2026
The skeleton — builds, produces a container image, CVO can deploy it
(operator starts, runs health checks, but registers no controllers).

Includes:
- cmd/main.go: base entry point with flag parsing and signal handling
- pkg/operator: manager setup (options, validation, leader election)
- pkg/version: build-time version injection
- install/: CVO manifests (Namespace, ServiceAccount, Role/RoleBinding
  for leader election, Deployment, ClusterOperator, image-references)
- Dockerfile, Makefile, .gitignore, .ci-operator.yaml
Vendors go.mod dependencies (controller-runtime, client-go, API
machinery, AWS SDK v2, and transitive dependencies).
Adds .golangci.yml aligned with upstream Karpenter's enabled linters
(staticcheck, gosec, errorlint, revive, etc.) and OpenShift's gci
import ordering. Pins golangci-lint v2.11.4 in the Makefile via
`go run` to ensure consistent results across environments.
@maxcao13 maxcao13 marked this pull request as ready for review April 22, 2026 20:06
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 22, 2026
@openshift-ci openshift-ci Bot requested review from elmiko and joelsmith April 22, 2026 20:07
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Apr 22, 2026

@maxcao13: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants