Skip to content

Commit 17df817

Browse files
author
Per Goncalves da Silva
committed
Update test-operator v1.0.0
Signed-off-by: Per Goncalves da Silva <pegoncal@redhat.com>
1 parent eb4b979 commit 17df817

11 files changed

+960
-173
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
Copyright 2025.
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 contains API Schema definitions for the testolm v1 API group.
18+
// +kubebuilder:object:generate=false
19+
// +groupName=testolm.operatorframework.io
20+
package v1
21+
22+
import (
23+
"k8s.io/apimachinery/pkg/runtime/schema"
24+
"sigs.k8s.io/controller-runtime/pkg/scheme"
25+
)
26+
27+
var (
28+
// GroupVersion is group version used to register these objects.
29+
GroupVersion = schema.GroupVersion{Group: "testolm.operatorframework.io", Version: "v1"}
30+
31+
// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
32+
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
33+
34+
// AddToScheme adds the types in this group-version to the given scheme.
35+
AddToScheme = SchemeBuilder.AddToScheme
36+
)
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/*
2+
Copyright 2025.
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+
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
21+
)
22+
23+
// TestOperatorSpec defines the desired state of TestOperator.
24+
type TestOperatorSpec struct {
25+
// +optional
26+
Message string `json:"message,omitempty"`
27+
}
28+
29+
// TestOperatorStatus defines the observed state of TestOperator.
30+
type TestOperatorStatus struct {
31+
Echo string `json:"echo,omitempty"`
32+
}
33+
34+
// +kubebuilder:object:root=true
35+
// +kubebuilder:subresource:status
36+
37+
// TestOperator is the Schema for the testoperators API.
38+
type TestOperator struct {
39+
metav1.TypeMeta `json:",inline"`
40+
metav1.ObjectMeta `json:"metadata,omitempty"`
41+
42+
Spec TestOperatorSpec `json:"spec,omitempty"`
43+
Status TestOperatorStatus `json:"status,omitempty"`
44+
}
45+
46+
// +kubebuilder:object:root=true
47+
48+
// TestOperatorList contains a list of TestOperator.
49+
type TestOperatorList struct {
50+
metav1.TypeMeta `json:",inline"`
51+
metav1.ListMeta `json:"metadata,omitempty"`
52+
Items []TestOperator `json:"items"`
53+
}
54+
55+
func init() {
56+
SchemeBuilder.Register(&TestOperator{}, &TestOperatorList{})
57+
}

testdata/images/bundles/test-operator/v1.0.0/api/v1/zz_generated.deepcopy.go

Lines changed: 114 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)