Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync test CRD defaults #150

Merged
merged 1 commit into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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