Skip to content

Commit b7304d4

Browse files
author
Maksym Trofimenko
committed
adds new CRDs
add common chart labels to pods
1 parent d483c89 commit b7304d4

12 files changed

+395
-55
lines changed

PROJECT

+16
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,20 @@ resources:
6060
kind: TinyProject
6161
path: github.com/tiny-systems/module/api/v1alpha1
6262
version: v1alpha1
63+
- api:
64+
crdVersion: v1
65+
namespaced: true
66+
domain: tinysystems.io
67+
group: operator
68+
kind: TinyPage
69+
path: github.com/tiny-systems/module/api/v1alpha1
70+
version: v1alpha1
71+
- api:
72+
crdVersion: v1
73+
namespaced: true
74+
domain: tinysystems.io
75+
group: operator
76+
kind: TinyWidget
77+
path: github.com/tiny-systems/module/api/v1alpha1
78+
version: v1alpha1
6379
version: "3"

api/v1alpha1/tinynode_types.go

+9-2
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,19 @@ const (
3636

3737
// visual annotations used by platform
3838

39+
ProjectNameAnnotation = "tinysystems.io/project-name"
40+
ServerIDAnnotation = "tinysystems.io/server-id"
41+
42+
FlowNameAnnotation = "tinysystems.io/flow-name"
43+
44+
PageNameAnnotation = "tinysystems.io/page-name"
45+
3946
ComponentPosXAnnotation = "tinysystems.io/component-pos-x"
4047
ComponentPosYAnnotation = "tinysystems.io/component-pos-y"
4148
ComponentPosSpinAnnotation = "tinysystems.io/component-pos-spin"
42-
NodeLabelAnnotation = "tinysystems.io/node-label"
43-
NodeCommentAnnotation = "tinysystems.io/node-comment"
4449

50+
NodeLabelAnnotation = "tinysystems.io/node-label"
51+
NodeCommentAnnotation = "tinysystems.io/node-comment"
4552
SuggestedHttpPortAnnotation = "tinysystems.io/suggested-http-port"
4653

4754
IngressHostNameSuffixAnnotation = "tinysystems.io/ingress-hostname-suffix"

api/v1alpha1/tinypage_types.go

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
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+
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
21+
)
22+
23+
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
24+
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
25+
26+
// TinyPageSpec defines the desired state of TinyPage
27+
type TinyPageSpec struct {
28+
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
29+
// Important: Run "make" to regenerate code after modifying this file
30+
31+
// Foo is an example field of TinyPage. Edit tinypage_types.go to remove/update
32+
Foo string `json:"foo,omitempty"`
33+
}
34+
35+
// TinyPageStatus defines the observed state of TinyPage
36+
type TinyPageStatus struct {
37+
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
38+
// Important: Run "make" to regenerate code after modifying this file
39+
}
40+
41+
// +kubebuilder:object:root=true
42+
// +kubebuilder:subresource:status
43+
44+
// TinyPage is the Schema for the tinypages API
45+
type TinyPage struct {
46+
metav1.TypeMeta `json:",inline"`
47+
metav1.ObjectMeta `json:"metadata,omitempty"`
48+
49+
Spec TinyPageSpec `json:"spec,omitempty"`
50+
Status TinyPageStatus `json:"status,omitempty"`
51+
}
52+
53+
// +kubebuilder:object:root=true
54+
55+
// TinyPageList contains a list of TinyPage
56+
type TinyPageList struct {
57+
metav1.TypeMeta `json:",inline"`
58+
metav1.ListMeta `json:"metadata,omitempty"`
59+
Items []TinyPage `json:"items"`
60+
}
61+
62+
func init() {
63+
SchemeBuilder.Register(&TinyPage{}, &TinyPageList{})
64+
}

api/v1alpha1/tinywidget_types.go

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
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+
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
21+
)
22+
23+
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
24+
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
25+
26+
// TinyWidgetSpec defines the desired state of TinyWidget
27+
type TinyWidgetSpec struct {
28+
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
29+
// Important: Run "make" to regenerate code after modifying this file
30+
31+
// Foo is an example field of TinyWidget. Edit tinywidget_types.go to remove/update
32+
Foo string `json:"foo,omitempty"`
33+
}
34+
35+
// TinyWidgetStatus defines the observed state of TinyWidget
36+
type TinyWidgetStatus struct {
37+
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
38+
// Important: Run "make" to regenerate code after modifying this file
39+
}
40+
41+
// +kubebuilder:object:root=true
42+
// +kubebuilder:subresource:status
43+
44+
// TinyWidget is the Schema for the tinywidgets API
45+
type TinyWidget struct {
46+
metav1.TypeMeta `json:",inline"`
47+
metav1.ObjectMeta `json:"metadata,omitempty"`
48+
49+
Spec TinyWidgetSpec `json:"spec,omitempty"`
50+
Status TinyWidgetStatus `json:"status,omitempty"`
51+
}
52+
53+
// +kubebuilder:object:root=true
54+
55+
// TinyWidgetList contains a list of TinyWidget
56+
type TinyWidgetList struct {
57+
metav1.TypeMeta `json:",inline"`
58+
metav1.ListMeta `json:"metadata,omitempty"`
59+
Items []TinyWidget `json:"items"`
60+
}
61+
62+
func init() {
63+
SchemeBuilder.Register(&TinyWidget{}, &TinyWidgetList{})
64+
}

api/v1alpha1/zz_generated.deepcopy.go

+178
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/tinysystems-operator/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type: application
1313
# This is the chart version. This version number should be incremented each time you make changes
1414
# to the chart and its templates, including the app version.
1515
# Versions are expected to follow Semantic Versioning (https://semver.org/)
16-
version: 0.1.57
16+
version: 0.1.58
1717
# This is the version number of the application being deployed. This version number should be
1818
# incremented each time you make changes to the application. Versions are not expected to
1919
# follow Semantic Versioning. They should reflect the version the application is using.

0 commit comments

Comments
 (0)