Skip to content

Commit

Permalink
feat(base-cluster): overhaul resources (#835)
Browse files Browse the repository at this point in the history
  • Loading branch information
cwrau authored Apr 15, 2024
1 parent 26cf112 commit f39dba8
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 78 deletions.
60 changes: 49 additions & 11 deletions charts/base-cluster/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,10 @@
"$ref": "#/$defs/email"
}
},
"resourcesPreset": {
"$ref": "#/$defs/resourcesPreset"
},
"resources": {
"type": "object",
"$ref": "#/$defs/resourceRequirements"
}
},
Expand Down Expand Up @@ -437,6 +439,9 @@
"type": "integer",
"minimum": 1
},
"resourcesPreset": {
"$ref": "#/$defs/resourcesPreset"
},
"resources": {
"$ref": "#/$defs/resourceRequirements"
},
Expand All @@ -463,6 +468,9 @@
"operator": {
"type": "object",
"properties": {
"resourcesPreset": {
"$ref": "#/$defs/resourcesPreset"
},
"resources": {
"$ref": "#/$defs/resourceRequirements"
}
Expand All @@ -472,6 +480,9 @@
"kubeStateMetrics": {
"type": "object",
"properties": {
"resourcesPreset": {
"$ref": "#/$defs/resourcesPreset"
},
"resources": {
"$ref": "#/$defs/resourceRequirements"
},
Expand All @@ -492,6 +503,9 @@
"nodeExporter": {
"type": "object",
"properties": {
"resourcesPreset": {
"$ref": "#/$defs/resourcesPreset"
},
"resources": {
"$ref": "#/$defs/resourceRequirements"
}
Expand Down Expand Up @@ -633,12 +647,18 @@
"type": "string"
}
},
"resourcesPreset": {
"$ref": "#/$defs/resourcesPreset"
},
"resources": {
"$ref": "#/$defs/resourceRequirements"
},
"sidecar": {
"type": "object",
"properties": {
"resourcesPreset": {
"$ref": "#/$defs/resourcesPreset"
},
"resources": {
"$ref": "#/$defs/resourceRequirements"
}
Expand Down Expand Up @@ -670,12 +690,18 @@
"type": "integer",
"minimum": 1
},
"resourcesPreset": {
"$ref": "#/$defs/resourcesPreset"
},
"resources": {
"$ref": "#/$defs/resourceRequirements"
},
"promtail": {
"type": "object",
"properties": {
"resourcesPreset": {
"$ref": "#/$defs/resourcesPreset"
},
"resources": {
"$ref": "#/$defs/resourceRequirements"
}
Expand Down Expand Up @@ -827,6 +853,9 @@
"certManager": {
"type": "object",
"properties": {
"resourcesPreset": {
"$ref": "#/$defs/resourcesPreset"
},
"resources": {
"$ref": "#/$defs/resourceRequirements"
},
Expand All @@ -838,6 +867,9 @@
"webhook": {
"type": "object",
"properties": {
"resourcesPreset": {
"$ref": "#/$defs/resourcesPreset"
},
"resources": {
"$ref": "#/$defs/resourceRequirements"
}
Expand All @@ -847,6 +879,9 @@
"caInjector": {
"type": "object",
"properties": {
"resourcesPreset": {
"$ref": "#/$defs/resourcesPreset"
},
"resources": {
"$ref": "#/$defs/resourceRequirements"
}
Expand All @@ -870,6 +905,9 @@
"externalDNS": {
"type": "object",
"properties": {
"resourcesPreset": {
"$ref": "#/$defs/resourcesPreset"
},
"resources": {
"$ref": "#/$defs/resourceRequirements"
}
Expand Down Expand Up @@ -1054,6 +1092,9 @@
"type": "integer",
"minimum": 1
},
"resourcesPreset": {
"$ref": "#/$defs/resourcesPreset"
},
"resources": {
"$ref": "#/$defs/resourceRequirements"
},
Expand Down Expand Up @@ -1175,6 +1216,9 @@
"backup": {
"type": "object",
"properties": {
"resourcesPreset": {
"$ref": "#/$defs/resourcesPreset"
},
"resources": {
"$ref": "#/$defs/resourceRequirements"
},
Expand Down Expand Up @@ -1292,6 +1336,9 @@
"nodeAgent": {
"type": "object",
"properties": {
"resourcesPreset": {
"$ref": "#/$defs/resourcesPreset"
},
"resources": {
"$ref": "#/$defs/resourceRequirements"
}
Expand Down Expand Up @@ -1331,16 +1378,7 @@
"$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/master-standalone-strict/_definitions.json#/definitions/io.k8s.api.core.v1.ResourceRequirements"
},
"resourcesPreset": {
"type": "string",
"enum": [
"nano",
"micro",
"small",
"medium",
"large",
"xlarge",
"2xlarge"
]
"$ref": "https://raw.githubusercontent.com/teutonet/teutonet-helm-charts/main/charts/common/values.schema.json#/$defs/resourcesPreset"
},
"quantity": {
"$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/master-standalone-strict/_definitions.json#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity"
Expand Down
96 changes: 29 additions & 67 deletions charts/base-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ global:
roleAttributePath: '"''Viewer''"'
oauthProxy:
emailDomains: []
resourcesPreset: nano
resources:
limits:
cpu: 100m
Expand Down Expand Up @@ -211,21 +212,11 @@ monitoring:
additionalDashboards: {}
additionalPlugins: []
notifiers: []
resources:
requests:
cpu: 50m
memory: 256Mi
limits:
cpu: 500m
memory: 256Mi
resourcesPreset: nano
resources: {}
sidecar:
resources:
requests:
cpu: 10m
memory: 128Mi
limits:
cpu: 500m
memory: 128Mi
resourcesPreset: nano
resources: {}
storageCostAnalysis:
currency: currencyEUR
period: Day
Expand All @@ -244,29 +235,14 @@ monitoring:
persistence:
storageClass: ""
size: 100Gi
resources:
requests:
cpu: "250m"
memory: 2Gi
limits:
cpu: "500m"
memory: 2Gi
resourcesPreset: large
resources: {}
operator:
resources:
requests:
cpu: 50m
memory: 256Mi
limits:
cpu: 500m
memory: 512Mi
resourcesPreset: nano
resources: {}
kubeStateMetrics:
resources:
requests:
cpu: 50m
memory: 128Mi
limits:
cpu: 100m
memory: 512Mi
resourcesPreset: nano
resources: {}
metricLabelsAllowList:
pods:
- app.kubernetes.io/name
Expand All @@ -282,13 +258,14 @@ monitoring:
- app.kubernetes.io/component
- app.kubernetes.io/instance
nodeExporter:
resourcesPreset: nano
resources:
requests:
cpu: 50m
memory: 64Mi
cpu: 10m
memory: 32Mi
limits:
cpu: "2"
memory: 128Mi
cpu: 2
memory: 64Mi
ingress:
host: prometheus
customDomain: ""
Expand All @@ -312,6 +289,7 @@ monitoring:
storageClass: ""
size: 10Gi
replicas: 1
resourcesPreset: nano
resources:
requests:
cpu: 100m
Expand All @@ -320,6 +298,7 @@ monitoring:
cpu: 1
memory: 1Gi
promtail:
resourcesPreset: nano
resources:
requests:
cpu: 50m
Expand Down Expand Up @@ -378,40 +357,26 @@ dns:
provider: null

certManager:
resources:
limits:
cpu: 250m
memory: 512Mi
requests:
cpu: 100m
memory: 512Mi
resourcesPreset: nano
resources: {}
caInjector:
resources:
limits:
cpu: 250m
memory: 512Mi
requests:
cpu: 50m
memory: 512Mi
resourcesPreset: nano
resources: {}
webhook:
resources:
limits:
cpu: 1
memory: 512Mi
requests:
cpu: 100m
memory: 512Mi
resourcesPreset: nano
resources: {}
dnsChallengeNameservers:
1.1.1.1: 53

externalDNS:
resourcesPreset: nano
resources:
limits:
cpu: 50m
memory: 128Mi
requests:
cpu: 10m
memory: 64Mi
limits:
cpu: 50m
memory: 128Mi

flux:
gitRepositories: {}
Expand All @@ -420,13 +385,10 @@ ingress:
enabled: true
allowNginxConfigurationSnippets: false
replicas: 2
resourcesPreset: nano
resources:
requests:
cpu: 100m
memory: 90Mi
limits:
cpu: 1
memory: 256Mi

storage:
readWriteMany:
Expand Down

0 comments on commit f39dba8

Please sign in to comment.