diff options
author | Ritu Sood <ritu.sood@intel.com> | 2019-08-06 21:42:15 -0700 |
---|---|---|
committer | Trinath Somanchi <trinaths.dev@gmail.com> | 2019-08-16 09:29:53 +0000 |
commit | 8fe5ed0f2cc522d22d0ca556f48f2e5922c67d3e (patch) | |
tree | ef050fa6236460d8d1f8063f087bad84315eecb4 /deploy | |
parent | 8295a28f6d6e14f5adb62138271de393015061e9 (diff) |
Add types and generated code for CRDs
Adding Network CRD and Provider
Network CRD generated code as per the
spec.
https://wiki.onap.org/display/DW/K8s+Plugin+Network+Related+CRD%27s+for+R5
Change-Id: If75885205830cf2cef197754ea8f00b61095a4a1
Signed-off-by: Ritu Sood <ritu.sood@intel.com>
Diffstat (limited to 'deploy')
-rw-r--r-- | deploy/crds/k8s_v1alpha1_network_cr.yaml | 13 | ||||
-rw-r--r-- | deploy/crds/k8s_v1alpha1_network_crd.yaml | 117 | ||||
-rw-r--r-- | deploy/crds/k8s_v1alpha1_providernetwork_crd.yaml | 136 |
3 files changed, 266 insertions, 0 deletions
diff --git a/deploy/crds/k8s_v1alpha1_network_cr.yaml b/deploy/crds/k8s_v1alpha1_network_cr.yaml new file mode 100644 index 0000000..5f3cd9b --- /dev/null +++ b/deploy/crds/k8s_v1alpha1_network_cr.yaml @@ -0,0 +1,13 @@ +apiVersion: k8s.plugin.opnfv.org/v1alpha1 +kind: Network +metadata: + name: example-network +spec: + # Add fields here + cniType: ovn4nfv + ipv4Subnets: + - subnet: 172.16.33.0/24 + name: subnet1 + gateway: 172.16.33.1/24 + excludeIps: 172.16.33.2 172.16.33.5..172.16.33.10 + diff --git a/deploy/crds/k8s_v1alpha1_network_crd.yaml b/deploy/crds/k8s_v1alpha1_network_crd.yaml new file mode 100644 index 0000000..793261e --- /dev/null +++ b/deploy/crds/k8s_v1alpha1_network_crd.yaml @@ -0,0 +1,117 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: networks.k8s.plugin.opnfv.org +spec: + group: k8s.plugin.opnfv.org + names: + kind: Network + listKind: NetworkList + plural: networks + singular: network + scope: Namespaced + subresources: + status: {} + validation: + openAPIV3Schema: + 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/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/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + properties: + cniType: + description: 'INSERT ADDITIONAL SPEC FIELDS - desired state of cluster + Important: Run "operator-sdk generate k8s" to regenerate code after + modifying this file Add custom validation using kubebuilder tags: + https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html' + type: string + dns: + properties: + domain: + type: string + nameservers: + items: + type: string + type: array + options: + items: + type: string + type: array + search: + items: + type: string + type: array + type: object + ipv4Subnets: + items: + properties: + excludeIps: + type: string + gateway: + type: string + name: + type: string + subnet: + type: string + required: + - name + - subnet + type: object + type: array + ipv6Subnets: + items: + properties: + excludeIps: + type: string + gateway: + type: string + name: + type: string + subnet: + type: string + required: + - name + - subnet + type: object + type: array + routes: + items: + properties: + dst: + type: string + gw: + type: string + required: + - dst + type: object + type: array + required: + - cniType + - ipv4Subnets + type: object + status: + properties: + state: + description: 'INSERT ADDITIONAL STATUS FIELD - define observed state + of cluster Important: Run "operator-sdk generate k8s" to regenerate + code after modifying this file Add custom validation using kubebuilder + tags: https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html' + type: string + required: + - state + type: object + version: v1alpha1 + versions: + - name: v1alpha1 + served: true + storage: true diff --git a/deploy/crds/k8s_v1alpha1_providernetwork_crd.yaml b/deploy/crds/k8s_v1alpha1_providernetwork_crd.yaml new file mode 100644 index 0000000..eabf3f2 --- /dev/null +++ b/deploy/crds/k8s_v1alpha1_providernetwork_crd.yaml @@ -0,0 +1,136 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: providernetworks.k8s.plugin.opnfv.org +spec: + group: k8s.plugin.opnfv.org + names: + kind: ProviderNetwork + listKind: ProviderNetworkList + plural: providernetworks + singular: providernetwork + scope: Namespaced + subresources: + status: {} + validation: + openAPIV3Schema: + 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/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/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + properties: + cniType: + description: 'INSERT ADDITIONAL SPEC FIELDS - desired state of cluster + Important: Run "operator-sdk generate k8s" to regenerate code after + modifying this file Add custom validation using kubebuilder tags: + https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html' + type: string + dns: + properties: + domain: + type: string + nameservers: + items: + type: string + type: array + options: + items: + type: string + type: array + search: + items: + type: string + type: array + type: object + ipv4Subnets: + items: + properties: + excludeIps: + type: string + gateway: + type: string + name: + type: string + subnet: + type: string + required: + - name + - subnet + type: object + type: array + ipv6Subnets: + items: + properties: + excludeIps: + type: string + gateway: + type: string + name: + type: string + subnet: + type: string + required: + - name + - subnet + type: object + type: array + providerNetType: + type: string + routes: + items: + properties: + dst: + type: string + gw: + type: string + required: + - dst + type: object + type: array + vlan: + properties: + logicalInterfaceName: + type: string + node: + type: string + providerInterfaceName: + type: string + vlanId: + type: string + required: + - vlanId + - node + - providerInterfaceName + type: object + required: + - cniType + - ipv4Subnets + - providerNetType + - vlan + type: object + status: + properties: + state: + description: 'INSERT ADDITIONAL STATUS FIELD - define observed state + of cluster Important: Run "operator-sdk generate k8s" to regenerate + code after modifying this file Add custom validation using kubebuilder + tags: https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html' + type: string + required: + - state + type: object + version: v1alpha1 + versions: + - name: v1alpha1 + served: true + storage: true |