|
| 1 | +/* |
| 2 | +Copyright 2023. |
| 3 | +
|
| 4 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +you may not use this file except in compliance with the License. |
| 6 | +You may obtain a copy of the License at |
| 7 | +
|
| 8 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +
|
| 10 | +Unless required by applicable law or agreed to in writing, software |
| 11 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +See the License for the specific language governing permissions and |
| 14 | +limitations under the License. |
| 15 | +*/ |
| 16 | + |
| 17 | +package v1alpha1 |
| 18 | + |
| 19 | +import ( |
| 20 | + "github.com/trustyai-explainability/trustyai-service-operator/api/common" |
| 21 | + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" |
| 22 | +) |
| 23 | + |
| 24 | +// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! |
| 25 | +// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. |
| 26 | + |
| 27 | +// NemoGuardrailsSpec defines the desired state of NemoGuardrails |
| 28 | +type NemoGuardrailsSpec struct { |
| 29 | + // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster |
| 30 | + // Important: Run "make" to regenerate code after modifying this file |
| 31 | + |
| 32 | + // NemoConfig should be the name of the configmap containing the NeMO server configuration |
| 33 | + NemoConfig string `json:"nemoConfig,omitempty"` |
| 34 | +} |
| 35 | + |
| 36 | +// NemoGuardrailStatus defines the observed state of NemoGuardrails |
| 37 | +type NemoGuardrailStatus struct { |
| 38 | + Phase string `json:"phase,omitempty"` |
| 39 | + |
| 40 | + // Conditions describes the state of the NemoGuardrails resource. |
| 41 | + // +optional |
| 42 | + Conditions []common.Condition `json:"conditions,omitempty"` |
| 43 | + // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster |
| 44 | + // Important: Run "make" to regenerate code after modifying this file |
| 45 | +} |
| 46 | + |
| 47 | +//+kubebuilder:object:root=true |
| 48 | +//+kubebuilder:subresource:status |
| 49 | + |
| 50 | +// NemoGuardrails is the Schema for the nemoguardrails API |
| 51 | +type NemoGuardrails struct { |
| 52 | + metav1.TypeMeta `json:",inline"` |
| 53 | + metav1.ObjectMeta `json:"metadata,omitempty"` |
| 54 | + |
| 55 | + Spec NemoGuardrailsSpec `json:"spec,omitempty"` |
| 56 | + Status NemoGuardrailStatus `json:"status,omitempty"` |
| 57 | +} |
| 58 | + |
| 59 | +//+kubebuilder:object:root=true |
| 60 | + |
| 61 | +// NemoGuardrailsList contains a list of NemoGuardrails |
| 62 | +type NemoGuardrailsList struct { |
| 63 | + metav1.TypeMeta `json:",inline"` |
| 64 | + metav1.ListMeta `json:"metadata,omitempty"` |
| 65 | + Items []NemoGuardrails `json:"items"` |
| 66 | +} |
| 67 | + |
| 68 | +func init() { |
| 69 | + SchemeBuilder.Register(&NemoGuardrails{}, &NemoGuardrailsList{}) |
| 70 | +} |
0 commit comments