Library for writing a Kubernetes-style API server.
Go to file
Kubernetes Publisher 375f5ba17b Merge pull request #53558 from nikhita/cr-strategic-merge-patch
Automatic merge from submit-queue (batch tested with PRs 54800, 53898, 54812, 54921, 53558). 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>.

Fix error for strategic merge patch of custom resources

Fixes #50037.

We need the go struct tags `patchMergeKey` and `patchStrategy` for fields that support a strategic merge patch. For native resources, we can easily figure out these tags since we know the fields.

Because custom resources are decoded as Unstructured and because we're missing the metadata about how to handle each field in a strategic merge patch, we can't find the go struct tags. Hence, we can't easily  do a strategic merge for custom resources.

So we should fail fast and return an error.

**Release note**:

```release-note
NONE
```

/cc @sttts @deads2k @ncdc

Kubernetes-commit: 7aed66305127904a874289a1c78f5b5d5ad6b80c
2017-12-07 04:30:16 +00:00
Godeps Merge pull request #53558 from nikhita/cr-strategic-merge-patch 2017-12-07 04:30:16 +00:00
hack handle resetting godep.json for resync 2017-02-23 11:14:39 -05:00
pkg admission: unify plugin constructors 2017-10-30 14:20:40 +01:00
plugin/pkg update BUILD files 2017-10-12 13:52:10 -07:00
vendor Merge pull request #52717 from FengyunPan/remove-LbassV1 2017-10-26 12:22:00 +00:00
.import-restrictions move pkg/auth/user to staging 2017-01-13 13:38:43 -05:00
LICENSE Remove README and LICENSE 2017-10-23 17:17:26 +05:30
OWNERS Add enj as reviewer to OWNERS 2017-08-29 13:16:16 +00:00
README.md Remove README and LICENSE 2017-10-23 17:17:26 +05:30

README.md

apiserver

Generic library for building a Kubernetes aggregated API server.

Purpose

This library contains code to create Kubernetes aggregation server complete with delegated authentication and authorization, kubectl compatible discovery information, optional admission chain, and versioned types. It's first consumers are k8s.io/kubernetes, k8s.io/kube-aggregator, and github.com/kubernetes-incubator/service-catalog.

Compatibility

There are NO compatibility guarantees for this repository, yet. It is in direct support of Kubernetes, so branches will track Kubernetes and be compatible with that repo. As we more cleanly separate the layers, we will review the compatibility guarantee. We have a goal to make this easier to use in 2017.

Where does it come from?

apiserver is synced from https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apiserver. Code changes are made in that location, merged into k8s.io/kubernetes and later synced here.

Things you should NOT do

  1. Directly modify any files under pkg in this repo. Those are driven from k8s.io/kuberenetes/staging/src/k8s.io/apiserver.
  2. Expect compatibility. This repo is changing quickly in direct support of Kubernetes and the API isn't yet stable enough for API guarantees.