Commit Graph

42 Commits

Author SHA1 Message Date
Jordan Liggitt b3ad9fb4e3 Generate and format files
- Run hack/update-codegen.sh
- Run hack/update-generated-device-plugin.sh
- Run hack/update-generated-protobuf.sh
- Run hack/update-generated-runtime.sh
- Run hack/update-generated-swagger-docs.sh
- Run hack/update-openapi-spec.sh
- Run hack/update-gofmt.sh

Replay of a9593d634c6a053848413e600dadbf974627515f

Kubernetes-commit: 15d9d196476d64482189f00f1cf1a2061aea5b35
2022-11-16 11:39:18 -05:00
willise f0281f38ec fix: typos in comments of admission
Kubernetes-commit: e8b5658bd11384d2796f9512f6edb95c632a0a59
2020-01-10 14:01:06 +08:00
Jordan Liggitt 4b9c976f43 AdmissionConfiguration v1
Kubernetes-commit: 1234290adfa11eb3dd34242c296e1f1dbe211c19
2019-11-11 11:57:29 -05:00
David Eads 331894196f add featuregate inspection as admission plugin initializer
Kubernetes-commit: 675c2fb924e82091f7ce4601e48daf4cc7030e72
2019-11-05 14:28:40 -05:00
Mehdy Bohlool 0fbb46dc25 Remove the propagated scheme from the Admission chain
Kubernetes-commit: cebb4ee2ac9e19fe90f78c3285978e585e67a3ac
2019-02-16 13:28:14 -08:00
David Eads 743057093a allow apiservers to override the list of decorators
Kubernetes-commit: ad740bbba58e48d5ff8353419066b7fd30abfa45
2019-02-18 14:24:14 -05:00
Jordan Liggitt 123cf8011f Remove alpha InitializerConfiguration types, Initializers admission plugin
Kubernetes-commit: dc1fa870bff65c20f48a83ea3af54adb3f526e28
2019-01-16 10:19:44 -05:00
Chao Wang b0b043eda2 list the default enabled admission plugins
Kubernetes-commit: ee96a5638d21f0da111b1106a82976cc59bbbf67
2018-08-06 17:25:24 +08:00
Mikhail Mazurskiy 0f7bbcadfb Add missing error handling in schema-related code
Kubernetes-commit: bfe313d5f351dfae086a85a97e7103183173e5b5
2018-06-03 14:59:58 +10:00
tamal b534ae405b Don't panic is admission options is nil
Kubernetes-commit: bc04c091c3ca0320a6fa83ef35f891d21423afbb
2018-05-05 11:59:28 -07:00
hzxuzhonghu 45ac728887 set default enabled admission plugins by official document
Kubernetes-commit: 27f3fd2d79d2d669ddecdd987c8b099f1f43ce38
2018-01-23 20:12:10 +08:00
David Eads bf5feefec3 add an admission decorator chain
Kubernetes-commit: 1ae856484b8a827b7ce6018ddfa103493a2cb97d
2018-02-14 09:27:25 -05:00
Dr. Stefan Schimanski 338a852bbb apiserver: make SecureServingOptions and authz/n options re-usable
Kubernetes-commit: 4e0114b0dd3701b68c02d038edcf4fbe84515a68
2018-01-31 16:17:48 +01:00
hzxuzhonghu b636311708 refactor admission flag: add two admission flags and make plugins auto in recommended order
Kubernetes-commit: 7c5f9e0bbaff15570f1709e70b7fa6952395d7cd
2018-01-15 14:58:57 +08:00
Jordan Liggitt e090ce7de2 Fix loading structured admission plugin config
Kubernetes-commit: 34328ea87dc9ac61bd036228102c952017cb81d0
2018-01-18 02:32:28 -05:00
Dr. Stefan Schimanski 574b95f04b admission: do not leak admission config types outside of the plugins
Kubernetes-commit: 1a552bbe149373c056ee004304d7e5abaa89f4c6
2017-11-27 14:44:04 +01:00
Dr. Stefan Schimanski 73975eaf19 Simplify extra initializer logic
Kubernetes-commit: a8127df3bb396717b4fb2a7f688c1f98e6bef6b4
2017-12-20 12:17:44 +01:00
xuzhonghu 82b64e7264 add admission into RecommendedOption
Kubernetes-commit: 6149df089e2667fefb740e408ece883fd76dd40e
2017-12-01 11:07:28 +08:00
hzxuzhonghu 0f7253ee99 validate admission-control param
Kubernetes-commit: 64a7c60e00a1f6cf92710415e0e3dee133ebab7c
2017-11-30 14:34:36 +08:00
Chao Xu 53b8960359 move the MutatingAdmissionWebhook to the last in the mutating amdission
plugin chain.

Kubernetes-commit: 8e8e32fa05f02331f724930933dfa34be995247c
2017-11-17 14:16:37 -08:00
Kubernetes Submit Queue e16244b0bc Merge pull request #55812 from deads2k/admission-17-external
Automatic merge from submit-queue (batch tested with PRs 55812, 55752, 55447, 55848, 50984). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Make versioned types for webhook admission config

Versioned webhook admission config type as promised in https://github.com/kubernetes/kubernetes/pull/54414.

@kubernetes/sig-api-machinery-pr-reviews
@ericchiang as promised.  fyi.

```yaml
kind: AdmissionConfiguration
apiVersion: apiserver.k8s.io/v1alpha1
plugins:
- name: GenericAdmissionWebhook
  configuration:
    kind: WebhookAdmission
    apiVersion: apiserver.config.k8s.io/v1alpha1
    kubeConfigFile: /path/to/my/file
```

`ADMISSION_CONTROL_CONFIG_FILE=../foo.yaml hack/local-up-cluster.sh`

Kubernetes-commit: 25ebf875b4235cb8f43be2aec699d62e78339cec
2017-12-07 04:34:43 +00:00
Dr. Stefan Schimanski 2ee052ccdf admission: make metrics compositional and move to metrics sub-package
Kubernetes-commit: baba0c827bfddfdc56b69c88e19406966ef900a2
2017-11-17 11:49:55 +01:00
Daniel Smith 4406561b46 add detail to flag help
Kubernetes-commit: 2956314cde74f0481be1da6107cc266f56127173
2017-11-17 15:22:53 -08:00
Chao Xu cb8d15718f Adding the mutating webhook
Kubernetes-commit: ea123f82aae5bc46b9a91c4543c8f742d0db52da
2017-11-14 16:36:28 -08:00
Chao Xu f88f0f12a1 Reorganize the admission webhook code.
Moved client and kubeconfig related code to webhook/config;
Moved the rule matcher to webhook/rules;
Left TODOs saying we are going to move some other common utilities;
Other code is moved to webhook/validation.

Kubernetes-commit: 1adfacc7eb41da109e970a9c2985fd55b4cbbdfd
2017-11-05 18:11:47 -08:00
hzxuzhonghu c37db061da remove redundant code in admission initializer
Kubernetes-commit: 9d1e6d3e2cc25db8e07db446d00390059c8264f8
2017-11-08 10:54:06 +08:00
Chao Xu 3843f2885c remove the nesting directory webhook/webhook
Kubernetes-commit: ca8131877ad4fcab76388360e04ff9eb05af41a4
2017-10-26 14:19:49 -07:00
David Eads 3cb246ace6 move webhook admission to generic apiserver
Kubernetes-commit: 8c1fe1f61a1de754a2cfed1966f4a1f8024ca618
2017-10-24 08:48:05 -04:00
David Eads d3f753a815 update admission webhook to accept client config
Kubernetes-commit: 0859798e8e278ec382dcbeb77914f40bf2c78a2c
2017-10-18 12:57:59 -04:00
p0lyn0mial 136304ddb2 removes k8s.io/kubernetes/pkg/api dependency from the webhook plugin.
Kubernetes-commit: fa96700b76de3df759b3dddb747da575c909acec
2017-10-09 22:15:25 +02:00
Chao Xu 9696b0c05e move initializer to the generic apiserver
move k8s.io/kubernetes/plugin/pkg/admission/initialization to
k8s.io/apiserver/pkg/admission/plugin/initialization/initialization.go;
move k8s.io/kubernetes/pkg/kubeapiserver/admission/configuration to
k8s.io/apiserver/pkg/admission/configuration.

Kubernetes-commit: 89a0511fcb22caf23427587c026952b2a387f293
2017-10-04 16:54:08 -07:00
p0lyn0mial f189d35f0e removes Authorizer and ExternalClientSet from kubeapiserver's admission initializer.
Kubernetes-commit: 6b1f1d14148fe3962594d8f4c9ca15d1c6171819
2017-10-03 18:08:30 +02:00
p0lyn0mial 941c87ca76 moved admission interfaces WantsClientCert, WantsAuthorizer and WantsExternalKubeClientSet to apiserver
Kubernetes-commit: 475493ced69f47dd78d72ff98bf2c5853fc5ea19
2017-09-27 22:05:34 +02:00
p0lyn0mial 1c446c37e3 adds two new fields to AdmissionOption.
The first one being RecommendedPluginOrder the second one being DefaultOffPlugins.
In case a cluster-admin did not provide plugin names they will be derived from these fields.

Kubernetes-commit: 7a92947588070a8eedd0bf50edcfbf0fcc1d4096
2017-08-24 21:36:39 +02:00
Dr. Stefan Schimanski 75cf96f31e apiserver: stratify versioned informer construction
Kubernetes-commit: ca3f7453464f6866a3bf467c8b9d8e132484cfb4
2017-09-09 21:44:32 +00:00
m1093782566 5cfd8381c1 add some checks for fedration-apiserver options
Kubernetes-commit: 172ab88ce848d2c2e6c344535d3011d4ac558a37
2017-08-29 13:15:23 +00:00
Clayton Coleman fcc6b93d70 Load initializers from dynamic config
Handle failure cases on startup gracefully to avoid causing cascading
errors and poor initialization in other components. Initial errors from
config load cause the initializer to pause and hold requests. Return
typed errors to better communicate failures to clients.

Add code to handle two specific cases - admin wants to bypass
initialization defaulting, and mirror pods (which want to bypass
initialization because the kubelet owns their lifecycle).

Kubernetes-commit: 772ab8e1b4163c17d285a2789321762a8f2dc9f3
2017-06-13 20:47:31 +00:00
Clayton Coleman 5fa08b8c5e Allow initialization of resources
Add support for creating resources that are not immediately visible to
naive clients, but must first be initialized by one or more privileged
cluster agents. These controllers can mark the object as initialized,
allowing others to see them.

Permission to override initialization defaults or modify an initializing
object is limited per resource to a virtual subresource "RESOURCE/initialize"
via RBAC.

Initialization is currently alpha.

Kubernetes-commit: 331eea67d8000e5c4b37e2234a90903c15881c2f
2017-06-13 20:47:30 +00:00
p0lyn0mial 42d367c84c register all generic admission plugins when AdmissionOptions are created.
lifecycle plugin: make use of the libraries under k8s.io/client-go/pkg/api and k8s.io/client-go/kubernetes
for the client libraries instead of k8s.io/kubernetes/client/*

move registration to AdmissionOptions

Kubernetes-commit: 77eb2f39500f1fcf66899ea557791e7bca851449
2017-06-13 20:47:29 +00:00
p0lyn0mial ecba80695f remove init blocks from all admission plugins
Kubernetes-commit: c5019bf6962475ffff94ef4993bdc651b79f650c
2017-06-13 20:47:28 +00:00
p0lyn0mial ceeef3670c This PR implements AdmissionOptions.ApplyTo
ApplyTo adds the admission chain to the server configuration the method lazily initializes a generic plugin
that is appended to the list of pluginInitializers.

apiserver.Config will hold an instance of SharedInformerFactory to ensure we only have once instance.
The field will be initialized in apisever.SecureServingOptions

Kubernetes-commit: 8cea69aa9812d6627ebdfa4f8b9c1d7624a8f3f5
2017-05-16 17:27:50 +00:00
p0lyn0mial 3422dafac7 Split out AdmissionOptions
In the long term AdmissionOptions will accepts various dependencies
and spit out AdmissionControl

Kubernetes-commit: de9706bc15ffc3a6a4ef30a00d5c7ea9a8881396
2017-04-21 20:35:37 +00:00