Skip to content

Commit

Permalink
feat: Add DOCA Telemetry Service
Browse files Browse the repository at this point in the history
Signed-off-by: killianmuldoon <[email protected]>
  • Loading branch information
killianmuldoon committed Feb 21, 2024
1 parent bbdf99c commit 234ba6e
Show file tree
Hide file tree
Showing 15 changed files with 739 additions and 42 deletions.
36 changes: 27 additions & 9 deletions api/v1alpha1/nicclusterpolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,20 +246,38 @@ type NICFeatureDiscoverySpec struct {
ImageSpec `json:""`
}

// DOCATelemetryServiceConfig contains configuration for the DOCATelemetryService.
type DOCATelemetryServiceConfig struct {
// FromConfigMap sets the configMap the DOCATelemetryService gets its configuration from. The ConfigMap must be in
// the same namespace as the NICClusterPolicy.
// +optional
FromConfigMap string `json:"fromConfigMap"`
}

// DOCATelemetryServiceSpec is the configuration for DOCA Telemetry Service.
type DOCATelemetryServiceSpec struct {
ImageSpec `json:""`
// +optional
// Config contains custom config for the DOCATelemetryService.
// If set no default config will be deployed.
Config *DOCATelemetryServiceConfig `json:"config"`
}

// NicClusterPolicySpec defines the desired state of NicClusterPolicy
type NicClusterPolicySpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file

NodeAffinity *v1.NodeAffinity `json:"nodeAffinity,omitempty"`
Tolerations []v1.Toleration `json:"tolerations,omitempty"`
OFEDDriver *OFEDDriverSpec `json:"ofedDriver,omitempty"`
RdmaSharedDevicePlugin *DevicePluginSpec `json:"rdmaSharedDevicePlugin,omitempty"`
SriovDevicePlugin *DevicePluginSpec `json:"sriovDevicePlugin,omitempty"`
IBKubernetes *IBKubernetesSpec `json:"ibKubernetes,omitempty"`
SecondaryNetwork *SecondaryNetworkSpec `json:"secondaryNetwork,omitempty"`
NvIpam *NVIPAMSpec `json:"nvIpam,omitempty"`
NicFeatureDiscovery *NICFeatureDiscoverySpec `json:"nicFeatureDiscovery,omitempty"`
NodeAffinity *v1.NodeAffinity `json:"nodeAffinity,omitempty"`
Tolerations []v1.Toleration `json:"tolerations,omitempty"`
OFEDDriver *OFEDDriverSpec `json:"ofedDriver,omitempty"`
RdmaSharedDevicePlugin *DevicePluginSpec `json:"rdmaSharedDevicePlugin,omitempty"`
SriovDevicePlugin *DevicePluginSpec `json:"sriovDevicePlugin,omitempty"`
IBKubernetes *IBKubernetesSpec `json:"ibKubernetes,omitempty"`
SecondaryNetwork *SecondaryNetworkSpec `json:"secondaryNetwork,omitempty"`
NvIpam *NVIPAMSpec `json:"nvIpam,omitempty"`
NicFeatureDiscovery *NICFeatureDiscoverySpec `json:"nicFeatureDiscovery,omitempty"`
DOCATelemetryService *DOCATelemetryServiceSpec `json:"docaTelemetryService,omitempty"`
}

// AppliedState defines a finer-grained view of the observed state of NicClusterPolicy
Expand Down
41 changes: 41 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

71 changes: 71 additions & 0 deletions config/crd/bases/mellanox.com_nicclusterpolicies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,77 @@ spec:
spec:
description: NicClusterPolicySpec defines the desired state of NicClusterPolicy
properties:
docaTelemetryService:
description: DOCATelemetryServiceSpec is the configuration for DOCA
Telemetry Service.
properties:
config:
description: |-
Config contains custom config for the DOCATelemetryService.
If set no default config will be deployed.
properties:
fromConfigMap:
description: |-
FromConfigMap sets the configMap the DOCATelemetryService gets its configuration from. The ConfigMap must be in
the same namespace as the NICClusterPolicy.
type: string
type: object
containerResources:
items:
description: ResourceRequirements describes the compute resource
requirements.
properties:
limits:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: |-
Limits describes the maximum amount of compute resources allowed.
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
type: object
name:
description: Name of the container the requirements are
set for
type: string
requests:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: |-
Requests describes the minimum amount of compute resources required.
If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
otherwise to an implementation-defined value. Requests cannot exceed Limits.
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
type: object
required:
- name
type: object
type: array
image:
pattern: '[a-zA-Z0-9\-]+'
type: string
imagePullSecrets:
default: []
items:
type: string
type: array
repository:
pattern: '[a-zA-Z0-9\.\-\/]+'
type: string
version:
pattern: '[a-zA-Z0-9\.-]+'
type: string
required:
- image
- repository
- version
type: object
ibKubernetes:
description: IBKubernetesSpec describes configuration options for
ib-kubernetes
Expand Down
Loading

0 comments on commit 234ba6e

Please sign in to comment.