-
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.
- Loading branch information
Showing
9 changed files
with
1,186 additions
and
3 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
examples/applyconfig/api/v1/ac/zz_generated.applyconfigurations.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
51 changes: 51 additions & 0 deletions
51
examples/applyconfig/api/v1/applytest.kubebuilder.io_foos.yaml
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,51 @@ | ||
|
||
--- | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.3.0 | ||
creationTimestamp: null | ||
name: foos.applytest.kubebuilder.io | ||
spec: | ||
group: applytest.kubebuilder.io | ||
names: | ||
kind: Foo | ||
listKind: FooList | ||
plural: foos | ||
singular: foo | ||
scope: Namespaced | ||
validation: | ||
openAPIV3Schema: | ||
properties: | ||
apiVersion: | ||
description: 'APIVersion defines the versioned schema of this representation | ||
of an object. Servers should convert recognized schemas to the latest | ||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' | ||
type: string | ||
kind: | ||
description: 'Kind is a string value representing the REST resource this | ||
object represents. Servers may infer this from the endpoint the client | ||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
metadata: | ||
type: object | ||
nonNullableField: | ||
type: string | ||
nullableField: | ||
type: string | ||
required: | ||
- metadata | ||
- nonNullableField | ||
type: object | ||
version: v1 | ||
versions: | ||
- name: v1 | ||
served: true | ||
storage: true | ||
status: | ||
acceptedNames: | ||
kind: "" | ||
plural: "" | ||
conditions: [] | ||
storedVersions: [] |
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 @@ | ||
//go:generate controller-gen object crd paths="." output:dir="." | ||
// +groupName=applytest.kubebuilder.io | ||
// +versionName=v1 | ||
//go:generate $GOPATH/src/sigs.k8s.io/controller-tools/controller-gen apply paths="./..." | ||
//go:generate $GOPATH/src/sigs.k8s.io/controller-tools/controller-gen object paths="./..." | ||
package v1 | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// +kubebuilder:object:generate=true | ||
// +kubebuilder:object:root=true | ||
// +kubebuilder:ac:root=true | ||
type Foo struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata"` | ||
NonNullableField string `json:"nonNullableField"` | ||
NullableField string `json:"nullableField,omitempty"` | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module sigs.k8s.io/controller-runtime/examples/applyconfig | ||
|
||
go 1.15 | ||
|
||
require ( | ||
k8s.io/apimachinery v0.21.0 | ||
k8s.io/client-go v0.21.0 | ||
sigs.k8s.io/controller-runtime v0.8.1 | ||
) | ||
|
||
replace sigs.k8s.io/controller-runtime => ../.. |
Oops, something went wrong.