Skip to content

Commit 0d907f6

Browse files
added default value for autosleep
1 parent 79781ab commit 0d907f6

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

clientset/v1alpha1/uffizzicluster.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ func (c *UffizziClusterClient) Get(name string, opts metav1.GetOptions) (*v1alph
6767
}
6868

6969
func (c *UffizziClusterClient) Create(clusterProps UffizziClusterProps) (*v1alpha1.UffizziCluster, error) {
70+
autoSleep := clusterProps.AutoSleep
71+
if len(clusterProps.AutoSleep) == 0 {
72+
autoSleep = "true"
73+
}
7074
uffizziCluster := v1alpha1.UffizziCluster{
7175
TypeMeta: metav1.TypeMeta{
7276
Kind: "UffizziCluster",
@@ -75,7 +79,7 @@ func (c *UffizziClusterClient) Create(clusterProps UffizziClusterProps) (*v1alph
7579
ObjectMeta: metav1.ObjectMeta{
7680
Name: clusterProps.Name,
7781
Annotations: map[string]string{
78-
"enterprise.uffizzi.com/http-cluster-sleep": clusterProps.AutoSleep,
82+
"enterprise.uffizzi.com/http-cluster-sleep": autoSleep,
7983
},
8084
},
8185
Spec: clusterProps.Spec,

config/crd/bases/uffizzi.com_uffizziclusters.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ spec:
6767
image:
6868
type: string
6969
type: object
70-
disableSleep:
71-
type: boolean
7270
distro:
7371
default: k3s
7472
enum:

0 commit comments

Comments
 (0)