Skip to content

Commit

Permalink
[Multitenancy]: Add PodNetwork field to MTPNC spec (#2151)
Browse files Browse the repository at this point in the history
* Add PN to MTPNC spec

* add annotation

* remove omitempty tag
  • Loading branch information
aggarwal0009 committed Aug 17, 2023
1 parent 4aecfd6 commit 50422dc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
// +kubebuilder:metadata:labels=managed=
// +kubebuilder:metadata:labels=owner=
// +kubebuilder:printcolumn:name="PodNetworkInstance",type=string,JSONPath=`.spec.podNetworkInstance`
// +kubebuilder:printcolumn:name="PodNetwork",type=string,JSONPath=`.spec.podNetwork`
// +kubebuilder:printcolumn:name="PodName",type=string,JSONPath=`.spec.podName`
// +kubebuilder:printcolumn:name="NCID",type=string,JSONPath=`.status.ncID`
// +kubebuilder:printcolumn:name="PrimaryIP",type=string,JSONPath=`.status.primaryIP`
Expand All @@ -43,9 +44,12 @@ type MultitenantPodNetworkConfigList struct {
// MultitenantPodNetworkConfigSpec defines the desired state of PodNetworkConfig
type MultitenantPodNetworkConfigSpec struct {
// name of PNI object from requesting cx pod
// +kubebuilder:validation:Optional
PodNetworkInstance string `json:"podNetworkInstance,omitempty"`
// name of PN object from requesting cx pod
PodNetwork string `json:"podNetwork"`
// name of the requesting cx pod
PodName string `json:"podName,omitempty"`
PodName string `json:"podName"`
}

// MultitenantPodNetworkConfigStatus defines the observed state of PodNetworkConfig
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ spec:
- jsonPath: .spec.podNetworkInstance
name: PodNetworkInstance
type: string
- jsonPath: .spec.podNetwork
name: PodNetwork
type: string
- jsonPath: .spec.podName
name: PodName
type: string
Expand Down Expand Up @@ -63,9 +66,15 @@ spec:
podName:
description: name of the requesting cx pod
type: string
podNetwork:
description: name of PN object from requesting cx pod
type: string
podNetworkInstance:
description: name of PNI object from requesting cx pod
type: string
required:
- podName
- podNetwork
type: object
status:
description: MultitenantPodNetworkConfigStatus defines the observed state
Expand Down

0 comments on commit 50422dc

Please sign in to comment.