forked from kubernetes/sample-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change apiversion of CRD from v1beta1 to v1
- Update CRDs (crd.yaml, crd-status-subresource.yaml) to match requirements of current release - Add `versions` field and structures `schema` as made mandatory in apiextensions/v1 - Add annotation for api-approved.kubernetes.io since CRD is under *k8s.io domain - Delete crd-validation.yaml since structured schema is mandatory in v1 - Update README Signed-off-by: Madhav Jivrajani <[email protected]> Kubernetes-commit: fd0ac9c8d169169c8072639970565cda9fb9499a
- Loading branch information
1 parent
53528ac
commit cba5d7c
Showing
4 changed files
with
72 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,41 @@ | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: foos.samplecontroller.k8s.io | ||
# for more information on the below annotation, please see | ||
# https://github.com/kubernetes/enhancements/blob/master/keps/sig-api-machinery/2337-k8s.io-group-protection/README.md | ||
annotations: | ||
"api-approved.kubernetes.io": "unapproved, experimental-only; please get an approval from Kubernetes API reviewers if you're trying to develop a CRD in the *.k8s.io or *.kubernetes.io groups" | ||
spec: | ||
group: samplecontroller.k8s.io | ||
version: v1alpha1 | ||
versions: | ||
- name: v1alpha1 | ||
served: true | ||
storage: true | ||
schema: | ||
# schema used for validation | ||
openAPIV3Schema: | ||
type: object | ||
properties: | ||
spec: | ||
type: object | ||
properties: | ||
deploymentName: | ||
type: string | ||
replicas: | ||
type: integer | ||
minimum: 1 | ||
maximum: 10 | ||
status: | ||
type: object | ||
properties: | ||
availableReplicas: | ||
type: integer | ||
# subresources for the custom resource | ||
subresources: | ||
# enables the status subresource | ||
status: {} | ||
names: | ||
kind: Foo | ||
plural: foos | ||
scope: Namespaced | ||
subresources: | ||
status: {} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters