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

Add node selector and tolerations options into Korifi helm chart schema #3308

Merged
merged 2 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 2 additions & 0 deletions README.helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ Here are all the values that can be set for the chart:
- `logLevel` (_String_): Sets level of logging for api and controllers components. Can be 'info' or 'debug'.
- `networking`: Networking configuration
- `gatewayClass` (_String_): The name of the GatewayClass Korifi Gateway references
- `nodeSelector`: Node labels for korifi-api and korifi-controllers pod assignment.
- `reconcilers`:
- `app` (_String_): ID of the workload runner to set on all `AppWorkload` objects. Defaults to `statefulset-runner`.
- `build` (_String_): ID of the image builder to set on all `BuildWorkload` objects. Defaults to `kpack-image-builder`.
Expand All @@ -124,3 +125,4 @@ Here are all the values that can be set for the chart:
- `memory` (_String_): Memory request.
- `temporarySetPodSeccompProfile` (_Boolean_): Sets the pod .spec.securityContext.seccompProfile to RuntimeDefault. Setting this flag to true will cause a restart of all previously running pods.
- `systemImagePullSecrets` (_Array_): List of `Secret` names to be used when pulling Korifi system images from private registries
- `tolerations` (_Array_): Pod tolerations for taints.
8 changes: 8 additions & 0 deletions helm/korifi/api/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ spec:
{{- end }}
{{- include "korifi.podSecurityContext" . | indent 6 }}
serviceAccountName: korifi-api-system-serviceaccount
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{- toYaml .Values.tolerations | nindent 8 }}
{{- end }}
volumes:
- configMap:
name: korifi-api-config
Expand Down
8 changes: 8 additions & 0 deletions helm/korifi/controllers/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ spec:
readOnly: true
{{- include "korifi.podSecurityContext" . | indent 6 }}
serviceAccountName: korifi-controllers-controller-manager
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{- toYaml .Values.tolerations | nindent 8 }}
{{- end }}
terminationGracePeriodSeconds: 10
volumes:
- name: cert
Expand Down
19 changes: 19 additions & 0 deletions helm/korifi/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,25 @@
},
"required": ["memoryMB", "diskMB", "buildCacheMB"]
},
"nodeSelector": {
"description": "Node labels for korifi-api and korifi-controllers pod assignment.",
"type": "object",
"properties": {}
},
"tolerations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": { "type": "string" },
"operator": { "type": "string" },
"value": { "type": "string" },
"effect": { "type": "string" }
},
"required": ["key", "operator", "effect"]
},
"description": "Pod tolerations for taints."
},
"api": {
"properties": {
"include": {
Expand Down
2 changes: 2 additions & 0 deletions helm/korifi/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ containerRegistrySecrets:
eksContainerRegistryRoleARN: ""
containerRegistryCACertSecret:
systemImagePullSecrets: []
tolerations: []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new values configure the cluster itself, I wonder whether it would make sense fo group them under a k8s section. I.e. instead of using --set nodeSelector.role=something, use --set k8s.nodeSelector.role=something

Korifi itself does not have the concept of tolerations and node selectors, so having those in the values "root" seems a bit odd to me.

nodeSelector: {}

reconcilers:
build: kpack-image-builder
Expand Down