getting started with kubebuilder
This commit is contained in:
@ -0,0 +1,54 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.17.2
|
||||
name: bitwardensecrets.lerentis.uploadfilter24.eu.lerentis.uploadfilter24.eu
|
||||
spec:
|
||||
group: lerentis.uploadfilter24.eu.lerentis.uploadfilter24.eu
|
||||
names:
|
||||
kind: BitwardenSecret
|
||||
listKind: BitwardenSecretList
|
||||
plural: bitwardensecrets
|
||||
singular: bitwardensecret
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: BitwardenSecret is the Schema for the bitwardensecrets API.
|
||||
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
|
||||
spec:
|
||||
description: BitwardenSecretSpec defines the desired state of BitwardenSecret.
|
||||
properties:
|
||||
foo:
|
||||
description: Foo is an example field of BitwardenSecret. Edit bitwardensecret_types.go
|
||||
to remove/update
|
||||
type: string
|
||||
type: object
|
||||
status:
|
||||
description: BitwardenSecretStatus defines the observed state of BitwardenSecret.
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
@ -0,0 +1,54 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.17.2
|
||||
name: bitwardentemplates.lerentis.uploadfilter24.eu.lerentis.uploadfilter24.eu
|
||||
spec:
|
||||
group: lerentis.uploadfilter24.eu.lerentis.uploadfilter24.eu
|
||||
names:
|
||||
kind: BitwardenTemplate
|
||||
listKind: BitwardenTemplateList
|
||||
plural: bitwardentemplates
|
||||
singular: bitwardentemplate
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: BitwardenTemplate is the Schema for the bitwardentemplates API.
|
||||
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
|
||||
spec:
|
||||
description: BitwardenTemplateSpec defines the desired state of BitwardenTemplate.
|
||||
properties:
|
||||
foo:
|
||||
description: Foo is an example field of BitwardenTemplate. Edit bitwardentemplate_types.go
|
||||
to remove/update
|
||||
type: string
|
||||
type: object
|
||||
status:
|
||||
description: BitwardenTemplateStatus defines the observed state of BitwardenTemplate.
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
@ -0,0 +1,55 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.17.2
|
||||
name: registrycredentials.lerentis.uploadfilter24.eu.lerentis.uploadfilter24.eu
|
||||
spec:
|
||||
group: lerentis.uploadfilter24.eu.lerentis.uploadfilter24.eu
|
||||
names:
|
||||
kind: RegistryCredential
|
||||
listKind: RegistryCredentialList
|
||||
plural: registrycredentials
|
||||
singular: registrycredential
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: RegistryCredential is the Schema for the registrycredentials
|
||||
API.
|
||||
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
|
||||
spec:
|
||||
description: RegistryCredentialSpec defines the desired state of RegistryCredential.
|
||||
properties:
|
||||
foo:
|
||||
description: Foo is an example field of RegistryCredential. Edit registrycredential_types.go
|
||||
to remove/update
|
||||
type: string
|
||||
type: object
|
||||
status:
|
||||
description: RegistryCredentialStatus defines the observed state of RegistryCredential.
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
18
config/crd/kustomization.yaml
Normal file
18
config/crd/kustomization.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
# This kustomization.yaml is not intended to be run by itself,
|
||||
# since it depends on service name and namespace that are out of this kustomize package.
|
||||
# It should be run by config/default
|
||||
resources:
|
||||
- bases/lerentis.uploadfilter24.eu.lerentis.uploadfilter24.eu_bitwardensecrets.yaml
|
||||
- bases/lerentis.uploadfilter24.eu.lerentis.uploadfilter24.eu_bitwardentemplates.yaml
|
||||
- bases/lerentis.uploadfilter24.eu.lerentis.uploadfilter24.eu_registrycredentials.yaml
|
||||
# +kubebuilder:scaffold:crdkustomizeresource
|
||||
|
||||
patches:
|
||||
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
|
||||
# patches here are for enabling the conversion webhook for each CRD
|
||||
# +kubebuilder:scaffold:crdkustomizewebhookpatch
|
||||
|
||||
# [WEBHOOK] To enable webhook, uncomment the following section
|
||||
# the following config is for teaching kustomize how to do kustomization for CRDs.
|
||||
#configurations:
|
||||
#- kustomizeconfig.yaml
|
19
config/crd/kustomizeconfig.yaml
Normal file
19
config/crd/kustomizeconfig.yaml
Normal file
@ -0,0 +1,19 @@
|
||||
# This file is for teaching kustomize how to substitute name and namespace reference in CRD
|
||||
nameReference:
|
||||
- kind: Service
|
||||
version: v1
|
||||
fieldSpecs:
|
||||
- kind: CustomResourceDefinition
|
||||
version: v1
|
||||
group: apiextensions.k8s.io
|
||||
path: spec/conversion/webhook/clientConfig/service/name
|
||||
|
||||
namespace:
|
||||
- kind: CustomResourceDefinition
|
||||
version: v1
|
||||
group: apiextensions.k8s.io
|
||||
path: spec/conversion/webhook/clientConfig/service/namespace
|
||||
create: false
|
||||
|
||||
varReference:
|
||||
- path: metadata/annotations
|
Reference in New Issue
Block a user