Skip to content

Commit

Permalink
crd: generate the PersistentIP CRD
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Duarte Barroso <[email protected]>
  • Loading branch information
maiqueb committed Aug 28, 2023
1 parent bee7f28 commit fc09fdf
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 1 deletion.
58 changes: 58 additions & 0 deletions artifacts/cni.cncf.io_persistentips.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
name: persistentips.cni.cncf.io
spec:
group: cni.cncf.io
names:
kind: PersistentIP
listKind: PersistentIPList
plural: persistentips
shortNames:
- pip
singular: persistentip
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: PersistentIP is the Schema for the PersistentIP 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:
properties:
interface:
type: string
network:
type: string
required:
- network
type: object
status:
properties:
ips:
items:
type: string
type: array
required:
- ips
type: object
type: object
served: true
storage: true
subresources:
status: {}
2 changes: 1 addition & 1 deletion pkg/crd/persistentip/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

//go:generate go run sigs.k8s.io/controller-tools/cmd/[email protected] paths=./... object output:dir=./
//go:generate go run sigs.k8s.io/controller-tools/cmd/[email protected] paths=./... object crd output:artifacts:code=./,config=../../../../artifacts

//go:generate go run k8s.io/code-generator/cmd/[email protected] client-gen --go-header-file ../../../../hack/custom-boilerplate.go.txt --clientset-name versioned --input-base "" --input github.com/maiqueb/persistentips/pkg/crd/persistentip/v1alpha1 --output-package github.com/maiqueb/persistentips/pkg/crd/persistentip/v1alpha1/apis/clientset ..

Expand Down

0 comments on commit fc09fdf

Please sign in to comment.