Skip to content

Commit

Permalink
rebase with upstream main
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadhamzh committed Feb 12, 2025
1 parent 48ab51b commit b2a0f75
Show file tree
Hide file tree
Showing 14 changed files with 674 additions and 220 deletions.
122 changes: 86 additions & 36 deletions modules/api/cmd/kubermatic-api/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -7303,22 +7303,12 @@
"operationId": "createPolicyBinding",
"parameters": [
{
"type": "string",
"x-go-name": "Name",
"name": "name",
"in": "query"
},
{
"type": "string",
"x-go-name": "Namespace",
"name": "namespace",
"in": "query"
},
{
"type": "string",
"x-go-name": "ProjectID",
"name": "projectID",
"in": "query"
"name": "Body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/createPolicyBindingBody"
}
}
],
"responses": {
Expand Down Expand Up @@ -7553,10 +7543,12 @@
"operationId": "createPolicyTemplate",
"parameters": [
{
"type": "string",
"x-go-name": "Name",
"name": "name",
"in": "query"
"name": "Body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PolicyTemplate"
}
}
],
"responses": {
Expand Down Expand Up @@ -30860,35 +30852,45 @@
"x-go-package": "github.com/open-policy-agent/frameworks/constraint/pkg/apis/templates/v1"
},
"Condition": {
"description": "This struct is intended for direct use as an array at the field path .status.conditions. For example,\n\ntype FooStatus struct{\nRepresents the observations of a foo's current state.\nKnown .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\"\n+patchMergeKey=type\n+patchStrategy=merge\n+listType=map\n+listMapKey=type\nConditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\nother fields\n}",
"type": "object",
"title": "Condition defines variable-based conditional criteria for rule execution.",
"title": "Condition contains details for one aspect of the current state of this API Resource.",
"properties": {
"key": {
"$ref": "#/definitions/JSON"
"lastTransitionTime": {
"description": "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.\n+required\n+kubebuilder:validation:Required\n+kubebuilder:validation:Type=string\n+kubebuilder:validation:Format=date-time",
"type": "string",
"x-go-name": "LastTransitionTime"
},
"message": {
"description": "Message is an optional display message",
"description": "message is a human readable message indicating details about the transition.\nThis may be an empty string.\n+required\n+kubebuilder:validation:Required\n+kubebuilder:validation:MaxLength=32768",
"type": "string",
"x-go-name": "Message"
},
"operator": {
"$ref": "#/definitions/ConditionOperator"
"observedGeneration": {
"description": "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance.\n+optional\n+kubebuilder:validation:Minimum=0",
"type": "integer",
"format": "int64",
"x-go-name": "ObservedGeneration"
},
"value": {
"$ref": "#/definitions/JSON"
"reason": {
"description": "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty.\n+required\n+kubebuilder:validation:Required\n+kubebuilder:validation:MaxLength=1024\n+kubebuilder:validation:MinLength=1\n+kubebuilder:validation:Pattern=`^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$`",
"type": "string",
"x-go-name": "Reason"
},
"status": {
"$ref": "#/definitions/ConditionStatus"
},
"type": {
"description": "type of condition in CamelCase or in foo.example.com/CamelCase.\n\nMany .condition.type values are consistent across resources like Available, but because arbitrary conditions can be\nuseful (see .node.status.conditions), the ability to deconflict is important.\nThe regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)\n+required\n+kubebuilder:validation:Required\n+kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$`\n+kubebuilder:validation:MaxLength=316",
"type": "string",
"x-go-name": "Type"
}
},
"x-go-package": "github.com/kyverno/kyverno/api/kyverno/v1"
},
"ConditionOperator": {
"description": "+kubebuilder:validation:Enum=Equals;NotEquals;In;AnyIn;AllIn;NotIn;AnyNotIn;AllNotIn;GreaterThanOrEquals;GreaterThan;LessThanOrEquals;LessThan;DurationGreaterThanOrEquals;DurationGreaterThan;DurationLessThanOrEquals;DurationLessThan",
"type": "string",
"title": "ConditionOperator is the operation performed on condition key and value.",
"x-go-package": "github.com/kyverno/kyverno/api/kyverno/v1"
"x-go-package": "k8s.io/apimachinery/pkg/apis/meta/v1"
},
"ConditionStatus": {
"type": "string",
"x-go-package": "k8s.io/api/core/v1"
"x-go-package": "k8s.io/apimachinery/pkg/apis/meta/v1"
},
"ConditionsWrapper": {
"description": "+k8s:deepcopy-gen=false",
Expand Down Expand Up @@ -39357,6 +39359,12 @@
"name": {
"type": "string",
"x-go-name": "Name"
},
"spec": {
"$ref": "#/definitions/PolicyBindingSpec"
},
"status": {
"$ref": "#/definitions/PolicyBindingStatus"
}
},
"x-go-package": "k8c.io/dashboard/v2/pkg/api/v2"
Expand Down Expand Up @@ -39384,6 +39392,27 @@
},
"x-go-package": "k8c.io/kubermatic/v2/pkg/apis/kubermatic/v1"
},
"PolicyBindingStatus": {
"type": "object",
"title": "PolicyBindingStatus is the status of the policy binding.",
"properties": {
"conditions": {
"description": "Conditions represents the latest available observations of the policy binding's current state\n+optional\n+listType=map\n+listMapKey=type",
"type": "array",
"items": {
"$ref": "#/definitions/Condition"
},
"x-go-name": "Conditions"
},
"observedGeneration": {
"description": "ObservedGeneration is the generation observed by the controller.\n\n+optional",
"type": "integer",
"format": "int64",
"x-go-name": "ObservedGeneration"
}
},
"x-go-package": "k8c.io/kubermatic/v2/pkg/apis/kubermatic/v1"
},
"PolicyRule": {
"description": "PolicyRule holds information that describes a policy rule, but does not contain information\nabout who the rule applies to or which namespace the rule applies to.",
"type": "object",
Expand Down Expand Up @@ -42932,6 +42961,27 @@
},
"x-go-package": "k8c.io/dashboard/v2/pkg/handler/v2/constraint"
},
"createPolicyBindingBody": {
"type": "object",
"properties": {
"name": {
"type": "string",
"x-go-name": "Name"
},
"namespace": {
"type": "string",
"x-go-name": "Namespace"
},
"projectID": {
"type": "string",
"x-go-name": "ProjectID"
},
"spec": {
"$ref": "#/definitions/PolicyBindingSpec"
}
},
"x-go-package": "k8c.io/dashboard/v2/pkg/ee/kyverno/policy-binding"
},
"ctBody": {
"type": "object",
"properties": {
Expand Down
81 changes: 80 additions & 1 deletion modules/api/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ require (
github.com/gorilla/websocket v1.5.3
github.com/hetznercloud/hcloud-go v1.59.2
github.com/kubeovn/kube-ovn v1.13.0
github.com/kyverno/kyverno v1.13.4 // indirect
github.com/kyverno/kyverno v1.13.4
github.com/minio/minio-go/v7 v7.0.81
github.com/onsi/ginkgo v1.16.5
github.com/open-policy-agent/frameworks/constraint v0.0.0-20241101234656-e78c8abd754a // v0.9.0+
Expand Down Expand Up @@ -164,43 +164,75 @@ require (
github.com/aws/aws-sdk-go-v2/service/s3 v1.58.2 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.24.7 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.6 // indirect
github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20240909191326-0ee4ec5d16bf // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver v3.5.1+incompatible // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/buildkite/agent/v3 v3.78.0 // indirect
github.com/buildkite/go-pipeline v0.11.0 // indirect
github.com/buildkite/interpolate v0.1.3 // indirect
github.com/buildkite/roko v1.2.0 // indirect
github.com/cert-manager/cert-manager v1.16.2 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/chrismellard/docker-credential-acr-env v0.0.0-20230304212654-82a0ddb27589 // indirect
github.com/clbanning/mxj/v2 v2.7.0 // indirect
github.com/cloudflare/circl v1.4.0 // indirect
github.com/cockroachdb/apd/v3 v3.2.1 // indirect
github.com/common-nighthawk/go-figure v0.0.0-20210622060536-734e95fb86be // indirect
github.com/containerd/containerd v1.7.24 // indirect
github.com/containerd/errdefs v1.0.0 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/containerd/platforms v0.2.1 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect
github.com/coreos/go-oidc/v3 v3.11.0 // indirect
github.com/cyberphone/json-canonicalization v0.0.0-20231217050601-ba74d44ecf5f // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/digitorus/pkcs7 v0.0.0-20230818184609-3a137a874352 // indirect
github.com/digitorus/timestamp v0.0.0-20231217203849-220c5c2851b7 // indirect
github.com/dimchansky/utfbom v1.1.1 // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/djherbis/times v1.6.0 // indirect
github.com/docker/cli v27.2.0+incompatible // indirect
github.com/docker/distribution v2.8.3+incompatible // indirect
github.com/docker/docker-credential-helpers v0.8.2 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
github.com/emicklei/proto v1.13.2 // indirect
github.com/equinix/equinix-sdk-go v0.46.0 // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/fatih/color v1.17.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.8.0 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 // indirect
github.com/go-chi/chi v4.1.2+incompatible // indirect
github.com/go-ini/ini v1.67.0 // indirect
github.com/go-jose/go-jose/v3 v3.0.3 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-logr/zerologr v1.2.3 // indirect
github.com/go-openapi/analysis v0.23.0 // indirect
github.com/go-openapi/inflect v0.21.0 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/loads v0.22.0 // indirect
github.com/go-openapi/spec v0.21.0 // indirect
github.com/go-piv/piv-go v1.11.0 // indirect
github.com/gobuffalo/flect v1.0.3 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/goccy/go-json v0.10.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.1 // indirect
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/cel-go v0.22.1 // indirect
github.com/google/certificate-transparency-go v1.2.1 // indirect
github.com/google/gnostic-models v0.6.9 // indirect
github.com/google/go-containerregistry v0.20.2 // indirect
github.com/google/go-github/v55 v55.0.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gofuzz v1.2.1-0.20210504230335-f78f29fc09ea // indirect
github.com/google/s2a-go v0.1.8 // indirect
Expand All @@ -215,8 +247,12 @@ require (
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/huandu/xstrings v1.5.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/in-toto/attestation v1.1.0 // indirect
github.com/in-toto/in-toto-golang v0.9.1-0.20240317085821-8e2966059a09 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jedisct1/go-minisign v0.0.0-20230811132847-661be99b8267 // indirect
github.com/jessevdk/go-flags v1.5.0 // indirect
github.com/jinzhu/copier v0.4.0 // indirect
github.com/jmespath/go-jmespath v0.4.1-0.20220621161143-b0104c826a24 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
Expand All @@ -232,6 +268,7 @@ require (
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/miekg/pkcs11 v1.1.1 // indirect
github.com/minio/md5-simd v1.1.2 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
Expand All @@ -243,12 +280,17 @@ require (
github.com/moby/spdystream v0.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mozillazg/docker-credential-acr-helper v0.3.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/nozzle/throttler v0.0.0-20180817012639-2ea982251481 // indirect
github.com/nutanix-cloud-native/prism-go-client v0.5.1 // indirect
github.com/nxadm/tail v1.4.11 // indirect
github.com/oklog/run v1.1.0 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/oleiade/reflections v1.1.0 // indirect
github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852 // indirect
github.com/open-policy-agent/opa v0.68.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0 // indirect
github.com/openshift/custom-resource-status v1.1.2 // indirect
Expand All @@ -263,28 +305,63 @@ require (
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.60.1 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/protocolbuffers/txtpbfmt v0.0.0-20240116145035-ef3ab179eed6 // indirect
github.com/r3labs/diff v1.1.0 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/robfig/cron/v3 v3.0.1 // indirect
github.com/rogpeppe/go-internal v1.13.1 // indirect
github.com/rs/xid v1.6.0 // indirect
github.com/rs/zerolog v1.33.0 // indirect
github.com/sagikazarmark/locafero v0.6.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sassoftware/relic v7.2.1+incompatible // indirect
github.com/secure-systems-lab/go-securesystemslib v0.8.0 // indirect
github.com/segmentio/ksuid v1.0.4 // indirect
github.com/shibumi/go-pathspec v1.3.0 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
github.com/sigstore/cosign/v2 v2.4.0 // indirect
github.com/sigstore/fulcio v1.6.3 // indirect
github.com/sigstore/k8s-manifest-sigstore v0.5.4 // indirect
github.com/sigstore/protobuf-specs v0.3.2 // indirect
github.com/sigstore/rekor v1.3.6 // indirect
github.com/sigstore/sigstore v1.8.10 // indirect
github.com/sigstore/sigstore-go v0.6.2 // indirect
github.com/sigstore/timestamp-authority v1.2.2 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.7.0 // indirect
github.com/spf13/viper v1.19.0 // indirect
github.com/spiffe/go-spiffe/v2 v2.3.0 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect
github.com/tchap/go-patricia/v2 v2.3.1 // indirect
github.com/tektoncd/chains v0.22.0 // indirect
github.com/thales-e-security/pool v0.0.2 // indirect
github.com/theupdateframework/go-tuf v0.7.0 // indirect
github.com/theupdateframework/go-tuf/v2 v2.0.1 // indirect
github.com/tinkerbell/tink v0.12.1 // indirect
github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect
github.com/tjfoc/gmsm v1.4.1 // indirect
github.com/toqueteos/webbrowser v1.2.0 // indirect
github.com/transparency-dev/merkle v0.0.2 // indirect
github.com/vbatts/tar-split v0.11.5 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/xanzy/go-gitlab v0.108.0 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/yashtewari/glob-intersection v0.2.0 // indirect
github.com/zeebo/errs v1.3.0 // indirect
go.mongodb.org/mongo-driver v1.17.1 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.57.0 // indirect
go.opentelemetry.io/otel v1.32.0 // indirect
go.opentelemetry.io/otel/metric v1.32.0 // indirect
go.opentelemetry.io/otel/sdk v1.31.0 // indirect
go.opentelemetry.io/otel/trace v1.32.0 // indirect
go.step.sm/crypto v0.51.1 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.32.0 // indirect
golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f // indirect
Expand Down Expand Up @@ -316,8 +393,10 @@ require (
k8s.io/kube-openapi v0.31.2 // indirect
k8s.io/kube-proxy v0.31.3 // indirect
k8s.io/kubelet v0.31.3 // indirect
k8s.io/pod-security-admission v0.31.2 // indirect
kubevirt.io/controller-lifecycle-operator-sdk/api v0.2.4 // indirect
sigs.k8s.io/gateway-api v1.2.1 // indirect
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
sigs.k8s.io/release-utils v0.8.4 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.3 // indirect
)
2 changes: 1 addition & 1 deletion modules/api/hack/gen-api-client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ run_swagger generate spec \
--scan-models \
-o ${TMP_SWAGGER} \
-x github.com/sigstore/rekor/pkg/generated/models \
-x k8s.io/api/admissionregistration/* \
-x "github.com/kyverno/kyverno/api/kyverno/v1"/* \
-x k8c.io/kubermatic/*

rm -r ../../pkg/test/e2e/utils/apiclient/
Expand Down
Loading

0 comments on commit b2a0f75

Please sign in to comment.