Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate in2un #191

Merged
merged 2 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Next Next commit
bump dependencies
  • Loading branch information
bverschueren committed Dec 12, 2024
commit 84cd54b896ec05039d548168254ef1d1df65aa41
The diff you're trying to view is too large. We only load the first 3000 changed files.
9 changes: 6 additions & 3 deletions cmd/get/know-types.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ import (
rbac "k8s.io/kubernetes/pkg/apis/rbac"
"k8s.io/kubernetes/pkg/apis/resource"
"k8s.io/kubernetes/pkg/apis/scheduling"
networkingv1_28 "k8s.io/kubernetes/v1_28/pkg/apis/networking"
policyv1_28 "k8s.io/kubernetes/v1_28/pkg/apis/policy"
resourcev1_30 "k8s.io/kubernetes/v1_30/pkg/apis/resource"

discovery "k8s.io/kubernetes/pkg/apis/discovery"
storage "k8s.io/kubernetes/pkg/apis/storage"
Expand Down Expand Up @@ -230,7 +233,7 @@ func addAppsTypes(scheme *runtime.Scheme) error {
func addNetworkingTypes(scheme *runtime.Scheme) error {
GroupVersion := schema.GroupVersion{Group: "networking.k8s.io", Version: "v1"}
types := []runtime.Object{
&networking.ClusterCIDR{},
&networkingv1_28.ClusterCIDR{},
&networking.IngressClass{},
&networking.Ingress{},
&networking.NetworkPolicy{},
Expand All @@ -251,7 +254,7 @@ func addPolicyV1Types(scheme *runtime.Scheme) error {
func addPolicyV1B1Types(scheme *runtime.Scheme) error {
GroupVersion := schema.GroupVersion{Group: "policy", Version: "v1"}
types := []runtime.Object{
&policy.PodSecurityPolicy{},
&policyv1_28.PodSecurityPolicy{},
}
scheme.AddKnownTypes(GroupVersion, types...)
return nil
Expand Down Expand Up @@ -320,7 +323,7 @@ func addStorageV1B1Types(scheme *runtime.Scheme) error {
func addResourceV1A2Types(scheme *runtime.Scheme) error {
GroupVersion := schema.GroupVersion{Group: "resource", Version: "v1alpha2"}
types := []runtime.Object{
&resource.ResourceClass{},
&resourcev1_30.ResourceClass{},
&resource.ResourceClaim{},
&resource.ResourceClaimTemplate{},
}
Expand Down
395 changes: 299 additions & 96 deletions go.mod

Large diffs are not rendered by default.

1,630 changes: 1,257 additions & 373 deletions go.sum

Large diffs are not rendered by default.

15 changes: 9 additions & 6 deletions pkg/deserializer/deserializer.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ import (

"k8s.io/kubernetes/pkg/apis/coordination"
"k8s.io/kubernetes/pkg/apis/networking"
networkingv1_28 "k8s.io/kubernetes/v1_28/pkg/apis/networking"
policyv1_28 "k8s.io/kubernetes/v1_28/pkg/apis/policy"
resourcev1_30 "k8s.io/kubernetes/v1_30/pkg/apis/resource"
"k8s.io/kubernetes/pkg/apis/rbac"

template "github.com/openshift/openshift-apiserver/pkg/template/apis/template"
Expand Down Expand Up @@ -167,8 +170,8 @@ func RawObjectToRuntimeObject(rawObject []byte, schema *runtime.Scheme) runtime.
return &imagev1.ImageStreamTag{}
case *imagev1.ImageTag:
return &imagev1.ImageTag{}
case *networking.ClusterCIDR:
return &networking.ClusterCIDR{}
case *networkingv1_28.ClusterCIDR:
return &networkingv1_28.ClusterCIDR{}
case *networking.IngressClass:
return &networking.IngressClass{}
case *networking.Ingress:
Expand All @@ -179,16 +182,16 @@ func RawObjectToRuntimeObject(rawObject []byte, schema *runtime.Scheme) runtime.
return &nodeapi.RuntimeClass{}
case *policy.PodDisruptionBudget:
return &policy.PodDisruptionBudget{}
case *policy.PodSecurityPolicy:
return &policy.PodSecurityPolicy{}
case *policyv1_28.PodSecurityPolicy:
return &policyv1_28.PodSecurityPolicy{}
case *project.Project:
return &project.Project{}
case *project.ProjectRequest:
return &project.ProjectRequest{}
case *quotav1.AppliedClusterResourceQuota:
return &quotav1.AppliedClusterResourceQuota{}
case *resource.ResourceClass:
return &resource.ResourceClass{}
case *resourcev1_30.ResourceClass:
return &resourcev1_30.ResourceClass{}
case *resource.ResourceClaim:
return &resource.ResourceClaim{}
case *resource.ResourceClaimTemplate:
Expand Down
2 changes: 2 additions & 0 deletions vendor/cel.dev/expr/.bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
7.0.1
# Keep this pinned version in parity with cel-go
2 changes: 2 additions & 0 deletions vendor/cel.dev/expr/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.pb.go linguist-generated=true
*.pb.go -diff -merge
2 changes: 2 additions & 0 deletions vendor/cel.dev/expr/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bazel-*
MODULE.bazel.lock
34 changes: 34 additions & 0 deletions vendor/cel.dev/expr/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")

package(default_visibility = ["//visibility:public"])

licenses(["notice"]) # Apache 2.0

go_library(
name = "expr",
srcs = [
"checked.pb.go",
"eval.pb.go",
"explain.pb.go",
"syntax.pb.go",
"value.pb.go",
],
importpath = "cel.dev/expr",
visibility = ["//visibility:public"],
deps = [
"@org_golang_google_genproto_googleapis_rpc//status:go_default_library",
"@org_golang_google_protobuf//reflect/protoreflect",
"@org_golang_google_protobuf//runtime/protoimpl",
"@org_golang_google_protobuf//types/known/anypb",
"@org_golang_google_protobuf//types/known/durationpb",
"@org_golang_google_protobuf//types/known/emptypb",
"@org_golang_google_protobuf//types/known/structpb",
"@org_golang_google_protobuf//types/known/timestamppb",
],
)

alias(
name = "go_default_library",
actual = ":expr",
visibility = ["//visibility:public"],
)
25 changes: 25 additions & 0 deletions vendor/cel.dev/expr/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Contributor Code of Conduct
## Version 0.1.1 (adapted from 0.3b-angular)

As contributors and maintainers of the Common Expression Language
(CEL) project, we pledge to respect everyone who contributes by
posting issues, updating documentation, submitting pull requests,
providing feedback in comments, and any other activities.

Communication through any of CEL's channels (GitHub, Gitter, IRC,
mailing lists, Google+, Twitter, etc.) must be constructive and never
resort to personal attacks, trolling, public or private harassment,
insults, or other unprofessional conduct.

We promise to extend courtesy and respect to everyone involved in this
project regardless of gender, gender identity, sexual orientation,
disability, age, race, ethnicity, religion, or level of experience. We
expect anyone contributing to the project to do the same.

If any member of the community violates this code of conduct, the
maintainers of the CEL project may take action, removing issues,
comments, and PRs or blocking accounts as deemed appropriate.

If you are subject to or witness unacceptable behavior, or have any
other concerns, please email us at
[[email protected]](mailto:[email protected]).
32 changes: 32 additions & 0 deletions vendor/cel.dev/expr/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# How to Contribute

We'd love to accept your patches and contributions to this project. There are a
few guidelines you need to follow.

## Contributor License Agreement

Contributions to this project must be accompanied by a Contributor License
Agreement. You (or your employer) retain the copyright to your contribution,
this simply gives us permission to use and redistribute your contributions as
part of the project. Head over to <https://cla.developers.google.com/> to see
your current agreements on file or to sign a new one.

You generally only need to submit a CLA once, so if you've already submitted one
(even if it was for a different project), you probably don't need to do it
again.

## Code reviews

All submissions, including submissions by project members, require review. We
use GitHub pull requests for this purpose. Consult
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
information on using pull requests.

## What to expect from maintainers

Expect maintainers to respond to new issues or pull requests within a week.
For outstanding and ongoing issues and particularly for long-running
pull requests, expect the maintainers to review within a week of a
contributor asking for a new review. There is no commitment to resolution --
merging or closing a pull request, or fixing or closing an issue -- because some
issues will require more discussion than others.
43 changes: 43 additions & 0 deletions vendor/cel.dev/expr/GOVERNANCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Project Governance

This document defines the governance process for the CEL language. CEL is
Google-developed, but openly governed. Major contributors to the CEL
specification and its corresponding implementations constitute the CEL
Language Council. New members may be added by a unanimous vote of the
Council.

The MAINTAINERS.md file lists the members of the CEL Language Council, and
unofficially indicates the "areas of expertise" of each member with respect
to the publicly available CEL repos.

## Code Changes

Code changes must follow the standard pull request (PR) model documented in the
CONTRIBUTING.md for each CEL repo. All fixes and features must be reviewed by a
maintainer. The maintainer reserves the right to request that any feature
request (FR) or PR be reviewed by the language council.

## Syntax and Semantic Changes

Syntactic and semantic changes must be reviewed by the CEL Language Council.
Maintainers may also request language council review at their discretion.

The review process is as follows:

- Create a Feature Request in the CEL-Spec repo. The feature description will
serve as an abstract for the detailed design document.
- Co-develop a design document with the Language Council.
- Once the proposer gives the design document approval, the document will be
linked to the FR in the CEL-Spec repo and opened for comments to members of
the [email protected].
- The Language Council will review the design doc at the next council meeting
(once every three weeks) and the council decision included in the document.

If the proposal is approved, the spec will be updated by a maintainer (if
applicable) and a rationale will be included in the CEL-Spec wiki to ensure
future developers may follow CEL's growth and direction over time.

Approved proposals may be implemented by the proposer or by the maintainers as
the parties see fit. At the discretion of the maintainer, changes from the
approved design are permitted during implementation if they improve the user
experience and clarity of the feature.
File renamed without changes.
13 changes: 13 additions & 0 deletions vendor/cel.dev/expr/MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# CEL Language Council

| Name | Company | Area of Expertise |
|-----------------|--------------|-------------------|
| Alfred Fuller | Facebook | cel-cpp, cel-spec |
| Jim Larson | Google | cel-go, cel-spec |
| Matthais Blume | Google | cel-spec |
| Tristan Swadell | Google | cel-go, cel-spec |

## Emeritus

* Sanjay Ghemawat (Google)
* Wolfgang Grieskamp (Facebook)
70 changes: 70 additions & 0 deletions vendor/cel.dev/expr/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
module(
name = "cel-spec",
)

bazel_dep(
name = "bazel_skylib",
version = "1.7.1",
)
bazel_dep(
name = "gazelle",
version = "0.36.0",
repo_name = "bazel_gazelle",
)
bazel_dep(
name = "googleapis",
version = "0.0.0-20240819-fe8ba054a",
repo_name = "com_google_googleapis",
)
bazel_dep(
name = "protobuf",
version = "26.0",
repo_name = "com_google_protobuf",
)
bazel_dep(
name = "rules_cc",
version = "0.0.9",
)
bazel_dep(
name = "rules_go",
version = "0.49.0",
repo_name = "io_bazel_rules_go",
)
bazel_dep(
name = "rules_java",
version = "7.6.5",
)
bazel_dep(
name = "rules_proto",
version = "6.0.0",
)
bazel_dep(
name = "rules_python",
version = "0.35.0",
)

### PYTHON ###
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
ignore_root_user_error = True,
python_version = "3.11",
)

switched_rules = use_extension("@com_google_googleapis//:extensions.bzl", "switched_rules")
switched_rules.use_languages(
cc = True,
go = True,
java = True,
)
use_repo(switched_rules, "com_google_googleapis_imports")

go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk")
go_sdk.download(version = "1.21.1")

go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
use_repo(
go_deps,
"org_golang_google_genproto_googleapis_rpc",
"org_golang_google_protobuf",
)
73 changes: 73 additions & 0 deletions vendor/cel.dev/expr/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Common Expression Language

The Common Expression Language (CEL) implements common semantics for expression
evaluation, enabling different applications to more easily interoperate.

Key Applications

* Security policy: organizations have complex infrastructure and need common
tooling to reason about the system as a whole
* Protocols: expressions are a useful data type and require interoperability
across programming languages and platforms.


Guiding philosophy:

1. Keep it small & fast.
* CEL evaluates in linear time, is mutation free, and not Turing-complete.
This limitation is a feature of the language design, which allows the
implementation to evaluate orders of magnitude faster than equivalently
sandboxed JavaScript.
2. Make it extensible.
* CEL is designed to be embedded in applications, and allows for
extensibility via its context which allows for functions and data to be
provided by the software that embeds it.
3. Developer-friendly.
* The language is approachable to developers. The initial spec was based
on the experience of developing Firebase Rules and usability testing
many prior iterations.
* The library itself and accompanying toolings should be easy to adopt by
teams that seek to integrate CEL into their platforms.

The required components of a system that supports CEL are:

* The textual representation of an expression as written by a developer. It is
of similar syntax to expressions in C/C++/Java/JavaScript
* A representation of the program's abstract syntax tree (AST).
* A compiler library that converts the textual representation to the binary
representation. This can be done ahead of time (in the control plane) or
just before evaluation (in the data plane).
* A context containing one or more typed variables, often protobuf messages.
Most use-cases will use `attribute_context.proto`
* An evaluator library that takes the binary format in the context and
produces a result, usually a Boolean.

For use cases which require persistence or cross-process communcation, it is
highly recommended to serialize the type-checked expression as a protocol
buffer. The CEL team will maintains canonical protocol buffers for ASTs and
will keep these versions identical and wire-compatible in perpetuity:

* [CEL canonical](https://github.com/google/cel-spec/tree/master/proto/cel/expr)
* [CEL v1alpha1](https://github.com/googleapis/googleapis/tree/master/google/api/expr/v1alpha1)


Example of boolean conditions and object construction:

``` c
// Condition
account.balance >= transaction.withdrawal
|| (account.overdraftProtection
&& account.overdraftLimit >= transaction.withdrawal - account.balance)

// Object construction
common.GeoPoint{ latitude: 10.0, longitude: -5.5 }
```

For more detail, see:

* [Introduction](doc/intro.md)
* [Language Definition](doc/langdef.md)

Released under the [Apache License](LICENSE).

Disclaimer: This is not an official Google product.
Loading