Skip to content

Commit

Permalink
Sync test CRD defaults (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcobebway authored Sep 26, 2023
1 parent 4efe1e1 commit 1b696ce
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
32 changes: 16 additions & 16 deletions config/crd/bases/operator.kyma-project.io_nats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,18 @@ spec:
size: 1Gi
storageClassName: default
memStorage:
enabled: false
size: 20Mi
enabled: true
size: 1Gi
logging:
debug: false
trace: false
resources:
limits:
cpu: 20m
memory: 64Mi
cpu: 500m
memory: 1Gi
requests:
cpu: 5m
memory: 16Mi
cpu: 40m
memory: 64Mi
description: NATSSpec defines the desired state of NATS.
properties:
annotations:
Expand Down Expand Up @@ -90,8 +90,8 @@ spec:
size: 1Gi
storageClassName: default
memStorage:
enabled: false
size: 20Mi
enabled: true
size: 1Gi
description: JetStream defines configurations that are specific to
NATS JetStream.
properties:
Expand Down Expand Up @@ -127,20 +127,20 @@ spec:
rule: self == oldSelf
memStorage:
default:
enabled: false
size: 20Mi
enabled: true
size: 1Gi
description: MemStorage defines configurations to memory storage
in NATS JetStream.
properties:
enabled:
default: false
default: true
description: Enabled allows the enablement of memory storage.
type: boolean
size:
anyOf:
- type: integer
- type: string
default: 20Mi
default: 1Gi
description: Size defines the mem.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
Expand Down Expand Up @@ -176,11 +176,11 @@ spec:
resources:
default:
limits:
cpu: 20m
memory: 64Mi
cpu: 500m
memory: 1Gi
requests:
cpu: 5m
memory: 16Mi
cpu: 40m
memory: 64Mi
description: Resources defines resources for NATS.
properties:
claims:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -456,20 +456,20 @@ func Test_NATS_Defaulting(t *testing.T) {
func defaultResources() corev1.ResourceRequirements {
return corev1.ResourceRequirements{
Limits: corev1.ResourceList{
"cpu": resource.MustParse("20m"),
"memory": resource.MustParse("64Mi"),
"cpu": resource.MustParse("500m"),
"memory": resource.MustParse("1Gi"),
},
Requests: corev1.ResourceList{
"cpu": resource.MustParse("5m"),
"memory": resource.MustParse("16Mi"),
"cpu": resource.MustParse("40m"),
"memory": resource.MustParse("64Mi"),
},
}
}

func defaultMemStorage() v1alpha1.MemStorage {
return v1alpha1.MemStorage{
Enabled: false,
Size: resource.MustParse("20Mi"),
Enabled: true,
Size: resource.MustParse("1Gi"),
}
}

Expand Down

0 comments on commit 1b696ce

Please sign in to comment.