1 // Copyright 2020 Datawire. All rights reserved 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package v1 16 17 import ( 18 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 19 20 ambv2 "github.com/datawire/ambassador/v2/pkg/api/getambassador.io/v2" 21 ) 22 23 // LogService is the Schema for the logservices API 24 // 25 // +kubebuilder:object:root=true 26 type LogService struct { 27 metav1.TypeMeta `json:""` 28 metav1.ObjectMeta `json:"metadata,omitempty"` 29 30 Spec ambv2.LogServiceSpec `json:"spec,omitempty"` 31 32 // dumbWorkaround is a dumb workaround for a bug in conversion-gen that it doesn't pay 33 // attention to +k8s:conversion-fn=drop or +k8s:conversion-gen=false when checking if it can 34 // do the direct-assignment or direct-conversion optimizations, and therefore might disobey 35 // the +k8s:conversion-fn=drop on metav1.TypeMeta. 36 // 37 // +k8s:conversion-gen=false 38 dumbWorkaround byte `json:"-"` //nolint:unused // dumb workaround 39 } 40 41 // LogServiceList contains a list of LogServices. 42 // 43 // +kubebuilder:object:root=true 44 type LogServiceList struct { 45 metav1.TypeMeta `json:""` 46 metav1.ListMeta `json:"metadata,omitempty"` 47 Items []LogService `json:"items"` 48 } 49 50 func init() { 51 SchemeBuilder.Register(&LogService{}, &LogServiceList{}) 52 } 53