Skip to content

Conversation

@barney-s
Copy link
Contributor

@barney-s barney-s commented Oct 11, 2025

This PR moves the simple-schema package to its own Go module at the top-level of the repository. This is done to make the package more reusable and independent of the main kro module.

The following changes were made:

  • Moved the simple-schema package to the top-level of the repository.
  • Created a new go.mod file for the simple-schema module.
  • Updated the import paths in the main module to use the new module.
  • Updated the main go.mod file to use a replace directive for the new module.
  • Moved the crd utils into simple-schema
  • Add a new cli for generating CRD from simple schema file.

Fixes: #720

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 11, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: barney-s

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

The pull request process is described here

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 11, 2025
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Oct 11, 2025
This commit moves the simpleschema package to its own Go module at the
top-level of the repository. This is done to make the package more
reusable and independent of the main kro module.

The following changes were made:
- Moved the simpleschema package to the top-level of the repository.
- Created a new go.mod file for the simpleschema module.
- Updated the import paths in the main module to use the new module.
- Updated the main go.mod file to use a replace directive for the new
  module.
- Moved the crd utils into simple-schema
- Add a new cli for generating CRD from simple schema file.
   ./bin/simpleschema --input ./cmd/example.yaml | kubectl apply -f -
@jakobmoellerdev
Copy link
Member

I understand that you want to separate out development of simpleschema from kro mainline, but my question is if this really solves the problem of independance? if we think that development on KRO is too slow, we should fix that.

I think if we introduce a separate module that wont change our review practices so im afraid it wont achieve the desired goal. Also happy to hear other thoughts though and maybe I am missing things.

On a different note: We will have to start running separate releases for this and document it as well, bit unsure if we want to maintain overhead

On a final note, we should not merge this without a two step approach because of the replace statement. Currently the statement would prohibit people from calling "go get" and one wouldnt be able to use the "pkg" packages as imports anymore.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 13, 2025
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

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.

Copy link
Member

@a-hilaly a-hilaly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank barni - i do have few thoughts:

1/ I think simpleschema is fundamentally about OpenAPI specs rather than CRDs. That's why I do not agree moving graph/crd into the simpleschema package.

2/ the new simpleschema/go.mod pulls in heavy Kubernetes dependencies (k8s.io/apiextensions-apiserver and k8s.io/apimachinery). If the goal is to make it "more reusable and independent" adding these dependencies works against that.

3/ If we truly want simpleschema to be independnt, it probably belongs in its own repository (like github.com/opensimpleschema) but its probably too early to commit to that kind of distributed development workflow.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the CLI addition was unexpected and I'm not clear on why we need one now.

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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Separate out simple schema into its own package

4 participants