-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sample-controller: add status subresource support
- Add an example to show how to use status subresources with custom resources. - Update the comment in the controller to mention that `UpdateStatus` can now be used. - Generate `UpdateStatus` for Foo. - Update the README to remove feature gate information for CRD validation since the current example requires a v1.9 cluster and it is enabled by default. - Update the README to add feature gate information for CustomResourceSubResources. Kubernetes-commit: 7c06d6fb17ee46f587c1facff93b9bb185522855
- Loading branch information
1 parent
aadb6d0
commit ad67096
Showing
6 changed files
with
69 additions
and
19 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: foos.samplecontroller.k8s.io | ||
spec: | ||
group: samplecontroller.k8s.io | ||
version: v1alpha1 | ||
names: | ||
kind: Foo | ||
plural: foos | ||
scope: Namespaced | ||
subresources: | ||
status: {} |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: foos.samplecontroller.k8s.io | ||
spec: | ||
group: samplecontroller.k8s.io | ||
version: v1alpha1 | ||
names: | ||
kind: Foo | ||
plural: foos | ||
scope: Namespaced | ||
validation: | ||
openAPIV3Schema: | ||
properties: | ||
spec: | ||
properties: | ||
replicas: | ||
type: integer | ||
minimum: 1 | ||
maximum: 10 |
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
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