| apiVersion: v1 | |
| kind: ConfigMap | |
| metadata: | |
| name: sample-configmap | |
| namespace: default | |
| labels: | |
| app: my-sample-app | |
| data: | |
| # Configuration key-value pairs | |
| database_url: "postgresql://db.example.com:5432/mydb" |
Code used: jpbetz/kubernetes@intern-bench
This measures performance impact of interning strings (via Go's unique.Make) on DeepEquals.
For each API type, the test:
| apiVersion: review.gemini.google.com/v1alpha1 | |
| kind: RepoWatch | |
| metadata: | |
| name: k8s | |
| spec: | |
| repoURL: https://github.com/kubernetes/kubernetes | |
| githubSecretName: github-pat | |
| review: | |
| gemini: | |
| prompt: | |
This is not just about adding comments; it's about elevating the developer experience for a critical part of the Kubernetes ecosystem. Contributors should aim to create documentation that is clear, comprehensive, and empowers new and existing developers to work with API Machinery effectively.
For a concrete example of the quality standard we are aiming for, please review the changes in pull request #133632, which documents the client-go library. The contents of this PR are also available in the client-go-docs branch for local inspection using git commands.
| diff --git hack/update-codegen.sh hack/update-codegen.sh | |
| index ea899266851..2a2aff11276 100755 | |
| --- hack/update-codegen.sh | |
| +++ hack/update-codegen.sh | |
| @@ -153,6 +153,10 @@ function codegen::protobuf() { | |
| kube::log::status "protoc ${PROTOC_VERSION} not found (can install with hack/install-protoc.sh); generating containerized..." | |
| build/run.sh hack/_update-generated-protobuf-dockerized.sh "${apis[@]}" | |
| fi | |
| + | |
| + git_find -z \ |
| var associativeListParserOld = func() *typed.Parser { | |
| oldParser, err := typed.NewParser(`types: | |
| - name: v1 | |
| map: | |
| fields: | |
| - name: list | |
| type: | |
| namedType: associativeList |
After analyzing the comprehensive validation rules from all Kubernetes resources, I've identified several resource kinds with diverse validation rules, particularly focusing on those with cross-field validations. These resources are prioritized based on both validation diversity and relative simplicity.
Kubernetes API validation ensures that objects created or updated through the API server meet specific formatting requirements, constraints, and semantic rules before being stored in etcd. Validation occurs in multiple layers: