Skip to content

Commit

Permalink
Fix argo-cd and argo-workflows IngressClassName and cpu-memory quotas (
Browse files Browse the repository at this point in the history
…#77)

* Fix argo-cd and argo-workflows IngressClassName and cpu-memory quotas
Co-authored-by: slyobard <[email protected]>
  • Loading branch information
slim0 authored Dec 12, 2024
1 parent a736d19 commit 4d7d9af
Show file tree
Hide file tree
Showing 9 changed files with 356 additions and 27 deletions.
2 changes: 1 addition & 1 deletion charts/argo-cd/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.0
version: 1.0.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
2 changes: 2 additions & 0 deletions charts/argo-cd/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ metadata:
annotations:
{{- include "library-chart.ingress.annotations" . | nindent 4 }}
spec:
{{- if .Values.ingress.ingressClassName }}
ingressClassName: {{ .Values.ingress.ingressClassName | quote }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
- hosts:
Expand Down
152 changes: 150 additions & 2 deletions charts/argo-cd/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,82 @@
},
"server": {
"type": "object",
"title": "controller",
"title": "Server",
"properties": {
"resources": {
"description": "Your service will have at least the requested resources and never more than its limits. No limit for a resource and you can consume everything left on the host machine.",
"type": "object",
"properties": {
"requests": {
"description": "Guaranteed resources",
"type": "object",
"properties": {
"cpu": {
"description": "The amount of cpu guaranteed",
"title": "CPU",
"type": "string",
"default": "100m",
"render": "slider",
"sliderMin": 50,
"sliderMax": 16000,
"sliderStep": 50,
"sliderUnit": "m",
"sliderExtremity": "down",
"sliderExtremitySemantic": "guaranteed",
"sliderRangeId": "cpu"
},
"memory": {
"description": "The amount of memory guaranteed",
"title": "memory",
"type": "string",
"default": "200Mi",
"render": "slider",
"sliderMin": 100,
"sliderMax": 8000,
"sliderStep": 100,
"sliderUnit": "Mi",
"sliderExtremity": "down",
"sliderExtremitySemantic": "guaranteed",
"sliderRangeId": "memory"
}
}
},
"limits": {
"description": "max resources",
"type": "object",
"properties": {
"cpu": {
"description": "The maximum amount of cpu",
"title": "CPU",
"type": "string",
"default": "2000m",
"render": "slider",
"sliderMin": 50,
"sliderMax": 16000,
"sliderStep": 50,
"sliderUnit": "m",
"sliderExtremity": "up",
"sliderExtremitySemantic": "Maximum",
"sliderRangeId": "cpu"
},
"memory": {
"description": "The maximum amount of memory",
"title": "Memory",
"type": "string",
"default": "2000Mi",
"render": "slider",
"sliderMin": 100,
"sliderMax": 8000,
"sliderStep": 100,
"sliderUnit": "Mi",
"sliderExtremity": "up",
"sliderExtremitySemantic": "Maximum",
"sliderRangeId": "memory"
}
}
}
}
},
"tolerations": {
"type": "array",
"description": "Array of tolerations",
Expand All @@ -170,6 +244,80 @@
"type": "object",
"title": "controller",
"properties": {
"resources": {
"description": "Your service will have at least the requested resources and never more than its limits. No limit for a resource and you can consume everything left on the host machine.",
"type": "object",
"properties": {
"requests": {
"description": "Guaranteed resources",
"type": "object",
"properties": {
"cpu": {
"description": "The amount of cpu guaranteed",
"title": "CPU",
"type": "string",
"default": "100m",
"render": "slider",
"sliderMin": 50,
"sliderMax": 16000,
"sliderStep": 50,
"sliderUnit": "m",
"sliderExtremity": "down",
"sliderExtremitySemantic": "guaranteed",
"sliderRangeId": "cpu"
},
"memory": {
"description": "The amount of memory guaranteed",
"title": "memory",
"type": "string",
"default": "200Mi",
"render": "slider",
"sliderMin": 100,
"sliderMax": 8000,
"sliderStep": 100,
"sliderUnit": "Mi",
"sliderExtremity": "down",
"sliderExtremitySemantic": "guaranteed",
"sliderRangeId": "memory"
}
}
},
"limits": {
"description": "max resources",
"type": "object",
"properties": {
"cpu": {
"description": "The maximum amount of cpu",
"title": "CPU",
"type": "string",
"default": "2000m",
"render": "slider",
"sliderMin": 50,
"sliderMax": 16000,
"sliderStep": 50,
"sliderUnit": "m",
"sliderExtremity": "up",
"sliderExtremitySemantic": "Maximum",
"sliderRangeId": "cpu"
},
"memory": {
"description": "The maximum amount of memory",
"title": "Memory",
"type": "string",
"default": "2000Mi",
"render": "slider",
"sliderMin": 100,
"sliderMax": 8000,
"sliderStep": 100,
"sliderUnit": "Mi",
"sliderExtremity": "up",
"sliderExtremitySemantic": "Maximum",
"sliderRangeId": "memory"
}
}
}
}
},
"tolerations": {
"type": "array",
"description": "Array of tolerations",
Expand Down Expand Up @@ -221,4 +369,4 @@
}
}
}
}
}
15 changes: 14 additions & 1 deletion charts/argo-cd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ argo-cd:
tag: # defaults to global.image.tag
imagePullPolicy: # IfNotPresent
replicas: 1
resources:
requests:
cpu: 100m
memory: 200Mi
limits:
cpu: 2000m
memory: 2000Mi
enableStatefulSet: true
args:
statusProcessors: "20"
Expand All @@ -81,7 +88,6 @@ argo-cd:
service:
port: 443
portName: https-controller
resources: {}
serviceAccount:
create: true
name: argocd-application-controller
Expand All @@ -101,6 +107,13 @@ argo-cd:
server:
name: server
replicas: 1
resources:
requests:
cpu: 100m
memory: 200Mi
limits:
cpu: 2000m
memory: 2000Mi
extraArgs:
- --namespace
- $(KUBERNETES_NAMESPACE)
Expand Down
2 changes: 1 addition & 1 deletion charts/argo-workflows/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.0
version: 1.0.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
4 changes: 3 additions & 1 deletion charts/argo-workflows/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ metadata:
annotations:
{{- include "library-chart.ingress.annotations" . | nindent 4 }}
spec:
ingressClassName: {{ .Values.ingress.ingressClassName | quote }}
{{- if .Values.ingress.ingressClassName }}
ingressClassName: {{ .Values.ingress.ingressClassName | quote }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
- hosts:
Expand Down
6 changes: 4 additions & 2 deletions charts/argo-workflows/templates/networkpolicy-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ spec:
matchLabels:
app.kubernetes.io/instance: {{ .Release.Name }}
ingress:
- from:
{{- toYaml .Values.security.networkPolicy.from | nindent 4 }}
{{- with .Values.security.networkPolicy.from }}
- from:
{{- toYaml . | nindent 4 }}
{{- end }}
policyTypes:
- Ingress
{{- end }}
Expand Down
Loading

0 comments on commit 4d7d9af

Please sign in to comment.