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 (
// CodecoAppResource defines the resource consumption of CodecoApp
type CodecoAppResource struct {
//+kubebuilder:validation:Minimum=0
//+kubebuilder:validation:default=100
CpuUsagePct uint64 `json:"cpu-usage-pct,omitempty"`
CpuUsagePct string `json:"cpu,omitempty"`
//+kubebuilder:validation:Minimum=0
//+kubebuilder:validation:default=8
MemUsageGB uint64 `json:"mem-usage-GB,omitempty"`
MemUsageGB string `json:"mem,omitempty"`
//+kubebuilder:validation:Minimum=0
//+kubebuilder:validation:default=25
NWBandwidthMbs uint64 `json:"nwbandwidth-Mbs,omitempty"`
NWBandwidthMbs string `json:"nwbandwidth,omitempty"`
//+kubebuilder:validation:Minimum=0
//+kubebuilder:validation:default=10
NWLatencyMs uint64 `json:"nwlatency-ms,omitempty"`
NWLatencyMs string `json:"nwlatency,omitempty"`
}
// CodecoAppMSSpec defines the desired state of CodecoApp micro service
......
......@@ -55,22 +55,14 @@ spec:
micro service required resources. Edit codecoapp_types.go
to remove/update
properties:
cpu-usage-pct:
format: int64
minimum: 0
type: integer
mem-usage-GB:
format: int64
minimum: 0
type: integer
nwbandwidth-Mbs:
format: int64
minimum: 0
type: integer
nwlatency-ms:
format: int64
minimum: 0
type: integer
cpu:
type: string
mem:
type: string
nwbandwidth:
type: string
nwlatency:
type: string
type: object
required:
- name
......
......@@ -5,4 +5,4 @@ kind: Kustomization
images:
- name: controller
newName: quay.io/jsalomon/codecoapp-test
newTag: v0.0.4
newTag: v0.0.5
......@@ -16,18 +16,18 @@ spec:
name: "CODECO micro service 1",
podspecname: "MicroService1",
required-resources: {
cpu-usage-pct: 200,
mem-usage-GB: 120,
nwbandwidth-Mbs: 10
cpu: "2",
mem: 120G,
nwbandwidth: 10M
}
},
{
name: "CODECO micro service 2",
podspecname: "MicroService2",
required-resources: {
cpu-usage-pct: 150,
mem-usage-GB: 80,
nwbandwidth-Mbs: 20
cpu: 1500m,
mem: 80G,
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