Skip to content
This repository was archived by the owner on Oct 29, 2025. It is now read-only.

Conversation

@natasha41575
Copy link
Contributor

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 18, 2022
# TODO: Add CI to validate the metadata here.

apiVersion: config.kubernetes.io/v1alpha1
kind: KRMFunctionDefinition
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is based on what the KrmFunctionDefinition spec will look like after kubernetes/enhancements#3220 goes in

CONTRIBUTING.md Outdated

Within the publisher's directory, there should be:
- An OWNERS file to approve KRM function metadata changes for the publisher.
- A directory for each published KRM function. This KRM function directory should contain a single file,
Copy link

Choose a reason for hiding this comment

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

Why a directory with a single file instead of just the file directly under publishers?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like that a directory with a single file is very clear about what the file is, e.g. the file render-helm-chart/krm-function-metadata.yaml is very clearly the function metadata file for the render-helm-chart function. However I suppose this clarity can be equally accomplished by making it clear in the publishers README that this directory contains files of function metadata, where each file is the function name, e.g. render-helm-chart.yaml.

I have made the change to do the latter.

image: us.gcr.io/k8s-artifacts-prod/krm-functions/render-helm-chart:unstable
requireNetwork: true
requireStorageMount: true
schema: |-
Copy link

Choose a reason for hiding this comment

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

In the KEP we have openAPIV3Schema under this like CRD does, and then of course the schema is in OpenAPI V3 format. Is there a particular reason you're using Swagger 2.0 here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah I must have misread the KEP. I have updated it accordingly.

@natasha41575 natasha41575 added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Feb 23, 2022
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 23, 2022
@natasha41575 natasha41575 requested a review from KnVerey February 24, 2022 18:15
### Repo layout

```
├── publishers # Home for all functions metadata
Copy link

Choose a reason for hiding this comment

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

I'd suggest the following layout to help publishing catalogs.

├── publishers # Home for all functions metadata
│   ├── kustomize
│   │   ├── functions
│   │   │   ├── fn-foo.yaml
│   │   │   ├── fn-bar.yaml
│   │   │   └── README.md
│   │   ├── catalogs
│   │   │   ├── v20220225.yaml
│   │   │   ├── v20220101.yaml
│   │   │   └── README.md
│   │   └── OWNERS # OWNERS of the publisher
...

@KnVerey WDYT?

Copy link

Choose a reason for hiding this comment

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

Hmm, yeah we didn't address where the static catalogs would go in the KEP, but it makes sense for them to be subjected to the same owners files as the functions themselves, so that layout looks good. I'd stick to a single README at the publishers/kustomize level though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

└── OWNERS
```

## Contributing in-tree KRM function source code
Copy link

Choose a reason for hiding this comment

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

We should talk about the criteria to accept functions as in-tree functions. For example, we should not accept 3rd party functions as in-tree functions, since if they give up the maintenance, it will be a problem for us.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do we consider 3rd party functions? If some company wishes to donate a function, does it need to be under SIG-CLI? In that case, would there be any publishers in the krm-functions folder outside of krm-functions/sig-cli?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added a requirements section to krm-functions/README.md stating that we cannot accept 3rd party functions as in-tree functions

Copy link

@mengqiy mengqiy left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 4, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mengqiy, natasha41575

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 Mar 4, 2022
@k8s-ci-robot k8s-ci-robot merged commit cbf69b5 into kubernetes-retired:main Mar 4, 2022
@natasha41575 natasha41575 deleted the docs branch March 4, 2022 18:58
natasha41575 added a commit to natasha41575/krm-functions-registry that referenced this pull request Mar 15, 2022
* flesh out READMEs and contributing docs

* suggested changes

* suggested changes
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants