add ippool resource api

add ippool webhook and fix some bugs

Signed-off-by: Duan Jiong <djduanjiong@gmail.com>
This commit is contained in:
Duan Jiong
2020-12-02 18:34:13 +08:00
parent 8a6ce2d7ac
commit 24e3ac865f
30 changed files with 3057 additions and 390 deletions

View File

@@ -3,14 +3,20 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: (devel)
creationTimestamp: null
name: ippools.network.kubesphere.io
spec:
group: network.kubesphere.io
names:
kind: IPPool
listKind: IPPoolList
plural: ippools
singular: ippool
scope: Cluster
subresources:
status: {}
validation:
openAPIV3Schema:
properties:
@@ -36,8 +42,8 @@ spec:
description: The pool CIDR.
type: string
disabled:
description: When disabled is true, IPAM will not assign addresses
from this pool.
description: When disabled is true, IPAM will not assign addresses from
this pool.
type: boolean
dns:
description: DNS contains values interesting for DNS resolvers
@@ -59,11 +65,11 @@ spec:
type: object
gateway:
type: string
namespace:
type: string
rangeEnd:
description: The last ip, inclusive
type: string
rangeStart:
description: The first ip, inclusive
type: string
routes:
items:
@@ -87,8 +93,6 @@ spec:
- master
- vlanId
type: object
workspace:
type: string
required:
- cidr
- type
@@ -96,7 +100,6 @@ spec:
status:
properties:
allocations:
description: Allocations should equal to (Total - Reserved - Unallocated)
type: integer
capacity:
type: integer
@@ -106,6 +109,19 @@ spec:
type: boolean
unallocated:
type: integer
workspaces:
additionalProperties:
properties:
allocations:
type: integer
required:
- allocations
type: object
type: object
required:
- allocations
- capacity
- unallocated
type: object
type: object
version: v1alpha1