Use apiextension v1
- upgrade from apiextension v1beta1 to v1 - generate yaml manifest for crd intead of applying it at runtime - users will have to apply the manifest with kubectl - kg and kgctl log an error if the crd is not present - now validation should actually work Signed-off-by: leonnicolas <leonloechner@gmx.de>
This commit is contained in:
92
manifests/crds.yaml
Normal file
92
manifests/crds.yaml
Normal file
@@ -0,0 +1,92 @@
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.6.0
|
||||
creationTimestamp: null
|
||||
name: peers.kilo.squat.ai
|
||||
spec:
|
||||
group: kilo.squat.ai
|
||||
names:
|
||||
kind: Peer
|
||||
listKind: PeerList
|
||||
plural: peers
|
||||
singular: peer
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: Peer is a WireGuard peer that should have access to the VPN.
|
||||
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: 'Specification of the desired behavior of the Kilo Peer.
|
||||
More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status'
|
||||
properties:
|
||||
allowedIPs:
|
||||
description: AllowedIPs is the list of IP addresses that are allowed
|
||||
for the given peer's tunnel.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
endpoint:
|
||||
description: Endpoint is the initial endpoint for connections to the
|
||||
peer.
|
||||
properties:
|
||||
dnsOrIP:
|
||||
description: DNSOrIP is a DNS name or an IP address.
|
||||
properties:
|
||||
dns:
|
||||
description: DNS must be a valid RFC 1123 subdomain.
|
||||
type: string
|
||||
ip:
|
||||
description: IP must be a valid IP address.
|
||||
type: string
|
||||
type: object
|
||||
port:
|
||||
description: Port must be a valid port number.
|
||||
format: int32
|
||||
type: integer
|
||||
required:
|
||||
- dnsOrIP
|
||||
- port
|
||||
type: object
|
||||
persistentKeepalive:
|
||||
description: PersistentKeepalive is the interval in seconds of the
|
||||
emission of keepalive packets by the peer. This defaults to 0, which
|
||||
disables the feature.
|
||||
type: integer
|
||||
presharedKey:
|
||||
description: PresharedKey is the optional symmetric encryption key
|
||||
for the peer.
|
||||
type: string
|
||||
publicKey:
|
||||
description: PublicKey is the WireGuard public key for the peer.
|
||||
type: string
|
||||
required:
|
||||
- allowedIPs
|
||||
- publicKey
|
||||
type: object
|
||||
required:
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
@@ -30,7 +30,7 @@ rules:
|
||||
resources:
|
||||
- customresourcedefinitions
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
|
@@ -64,7 +64,7 @@ rules:
|
||||
resources:
|
||||
- customresourcedefinitions
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
|
@@ -30,7 +30,7 @@ rules:
|
||||
resources:
|
||||
- customresourcedefinitions
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
|
@@ -65,7 +65,7 @@ rules:
|
||||
resources:
|
||||
- customresourcedefinitions
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
|
@@ -64,7 +64,7 @@ rules:
|
||||
resources:
|
||||
- customresourcedefinitions
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
|
@@ -64,7 +64,7 @@ rules:
|
||||
resources:
|
||||
- customresourcedefinitions
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
|
@@ -30,7 +30,7 @@ rules:
|
||||
resources:
|
||||
- customresourcedefinitions
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
|
@@ -64,7 +64,7 @@ rules:
|
||||
resources:
|
||||
- customresourcedefinitions
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
|
@@ -30,7 +30,7 @@ rules:
|
||||
resources:
|
||||
- customresourcedefinitions
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
|
@@ -64,7 +64,7 @@ rules:
|
||||
resources:
|
||||
- customresourcedefinitions
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
|
Reference in New Issue
Block a user