Skip to content
Snippets Groups Projects
Commit 33c6cb90 authored by Josh Salomon's avatar Josh Salomon
Browse files

Change resource parameters to string to fit k8s convention


Signed-off-by: default avatarJosh Salomon <jsalomon@redhat.com>
parent dd9e601a
No related branches found
No related tags found
No related merge requests found
...@@ -49,21 +49,17 @@ const ( ...@@ -49,21 +49,17 @@ const (
// CodecoAppResource defines the resource consumption of CodecoApp // CodecoAppResource defines the resource consumption of CodecoApp
type CodecoAppResource struct { type CodecoAppResource struct {
//+kubebuilder:validation:Minimum=0
//+kubebuilder:validation:default=100 //+kubebuilder:validation:default=100
CpuUsagePct uint64 `json:"cpu-usage-pct,omitempty"` CpuUsagePct string `json:"cpu,omitempty"`
//+kubebuilder:validation:Minimum=0
//+kubebuilder:validation:default=8 //+kubebuilder:validation:default=8
MemUsageGB uint64 `json:"mem-usage-GB,omitempty"` MemUsageGB string `json:"mem,omitempty"`
//+kubebuilder:validation:Minimum=0
//+kubebuilder:validation:default=25 //+kubebuilder:validation:default=25
NWBandwidthMbs uint64 `json:"nwbandwidth-Mbs,omitempty"` NWBandwidthMbs string `json:"nwbandwidth,omitempty"`
//+kubebuilder:validation:Minimum=0
//+kubebuilder:validation:default=10 //+kubebuilder:validation:default=10
NWLatencyMs uint64 `json:"nwlatency-ms,omitempty"` NWLatencyMs string `json:"nwlatency,omitempty"`
} }
// CodecoAppMSSpec defines the desired state of CodecoApp micro service // CodecoAppMSSpec defines the desired state of CodecoApp micro service
......
...@@ -55,22 +55,14 @@ spec: ...@@ -55,22 +55,14 @@ spec:
micro service required resources. Edit codecoapp_types.go micro service required resources. Edit codecoapp_types.go
to remove/update to remove/update
properties: properties:
cpu-usage-pct: cpu:
format: int64 type: string
minimum: 0 mem:
type: integer type: string
mem-usage-GB: nwbandwidth:
format: int64 type: string
minimum: 0 nwlatency:
type: integer type: string
nwbandwidth-Mbs:
format: int64
minimum: 0
type: integer
nwlatency-ms:
format: int64
minimum: 0
type: integer
type: object type: object
required: required:
- name - name
......
...@@ -5,4 +5,4 @@ kind: Kustomization ...@@ -5,4 +5,4 @@ kind: Kustomization
images: images:
- name: controller - name: controller
newName: quay.io/jsalomon/codecoapp-test newName: quay.io/jsalomon/codecoapp-test
newTag: v0.0.4 newTag: v0.0.5
...@@ -16,18 +16,18 @@ spec: ...@@ -16,18 +16,18 @@ spec:
name: "CODECO micro service 1", name: "CODECO micro service 1",
podspecname: "MicroService1", podspecname: "MicroService1",
required-resources: { required-resources: {
cpu-usage-pct: 200, cpu: "2",
mem-usage-GB: 120, mem: 120G,
nwbandwidth-Mbs: 10 nwbandwidth: 10M
} }
}, },
{ {
name: "CODECO micro service 2", name: "CODECO micro service 2",
podspecname: "MicroService2", podspecname: "MicroService2",
required-resources: { required-resources: {
cpu-usage-pct: 150, cpu: 1500m,
mem-usage-GB: 80, mem: 80G,
nwbandwidth-Mbs: 20 nwbandwidth: 20M
} }
}, },
] ]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment