Skip to content

Commit

Permalink
PublicKey API: plural fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cheina97 committed Oct 5, 2023
1 parent d9ed414 commit 1ce910d
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 2 deletions.
7 changes: 5 additions & 2 deletions apis/networking/v1alpha1/publickey_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// PublicKeyResource the name of the publickey resources.
var PublicKeyResource = "publickeys"
var PublicKeyResource = "publickeies"

// PublicKeyKind is the kind name used to register the PublicKey CRD.
var PublicKeyKind = "PublicKey"
Expand All @@ -40,8 +40,11 @@ type PublicKeySpec struct {
PublicKey []byte `json:"publicKey,omitempty"`
}

// publickeies is used for resource name pluralization because k8s api do not manage false friends.
// Waiting for this fix https://github.com/kubernetes-sigs/kubebuilder/pull/3408

// +kubebuilder:object:root=true
// +kubebuilder:resource:categories=liqo
// +kubebuilder:resource:categories=liqo,path=publickeies

// PublicKey contains a public key data required by some interconnection technologies.
type PublicKey struct {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
name: publickeies.networking.liqo.io
spec:
group: networking.liqo.io
names:
categories:
- liqo
kind: PublicKey
listKind: PublicKeyList
plural: publickeies
singular: publickey
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: PublicKey contains a public key data required by some interconnection
technologies.
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: PublicKeySpec defines the desired state of PublicKey.
properties:
publicKey:
description: PublicKey contains the public key.
format: byte
type: string
type: object
type: object
served: true
storage: true

0 comments on commit 1ce910d

Please sign in to comment.