|
| 1 | +/* |
| 2 | +
|
| 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 v1 |
| 18 | + |
| 19 | +import ( |
| 20 | + v1 "k8s.io/api/core/v1" |
| 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 | +// PrometheusConnectorSpec defines the desired state of PrometheusConnector |
| 28 | +type PrometheusConnectorSpec struct { |
| 29 | + Namespace string `json:"namespace,omitempty"` |
| 30 | + |
| 31 | + Deployment PrometheusConnectorDeploymentSpec `json:"deployment"` |
| 32 | +} |
| 33 | + |
| 34 | +type PrometheusConnectorDeploymentSpec struct { |
| 35 | + // List of environment variables to set in the container. |
| 36 | + // Cannot be updated. |
| 37 | + // +optional |
| 38 | + // +patchMergeKey=name |
| 39 | + // +patchStrategy=merge |
| 40 | + Env []v1.EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,7,rep,name=env"` |
| 41 | +} |
| 42 | + |
| 43 | +// PrometheusConnectorStatus defines the observed state of PrometheusConnector |
| 44 | +type PrometheusConnectorStatus struct { |
| 45 | + // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster |
| 46 | + // Important: Run "make" to regenerate code after modifying this file |
| 47 | +} |
| 48 | + |
| 49 | +// +kubebuilder:object:root=true |
| 50 | + |
| 51 | +// PrometheusConnector is the Schema for the prometheusconnectors API |
| 52 | +type PrometheusConnector struct { |
| 53 | + metav1.TypeMeta `json:",inline"` |
| 54 | + metav1.ObjectMeta `json:"metadata,omitempty"` |
| 55 | + |
| 56 | + Spec PrometheusConnectorSpec `json:"spec,omitempty"` |
| 57 | + Status PrometheusConnectorStatus `json:"status,omitempty"` |
| 58 | +} |
| 59 | + |
| 60 | +// +kubebuilder:object:root=true |
| 61 | + |
| 62 | +// PrometheusConnectorList contains a list of PrometheusConnector |
| 63 | +type PrometheusConnectorList struct { |
| 64 | + metav1.TypeMeta `json:",inline"` |
| 65 | + metav1.ListMeta `json:"metadata,omitempty"` |
| 66 | + Items []PrometheusConnector `json:"items"` |
| 67 | +} |
| 68 | + |
| 69 | +func init() { |
| 70 | + SchemeBuilder.Register(&PrometheusConnector{}, &PrometheusConnectorList{}) |
| 71 | +} |
0 commit comments