Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Commit

Permalink
Add nodeSelector for tornjak
Browse files Browse the repository at this point in the history
Tornjak only supports amd64 builds at the moment

To prevent deployment failures on clusters with arm64 nodes I have added a nodeSelector for tornjak frontend, and documentation for spire-server

Signed-off-by: Marco Franssen <marco.franssen@gmail.com>
  • Loading branch information
marcofranssen committed May 16, 2023
1 parent fc13cbd commit ee43c5e
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 3 deletions.
3 changes: 2 additions & 1 deletion charts/spire/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ Kubernetes: `>=1.21.0-0`
| spire-server.namespaceOverride | string | `""` | |
| spire-server.nodeAttestor.k8sPsat.enabled | bool | `true` | |
| spire-server.nodeAttestor.k8sPsat.serviceAccountAllowList | list | `[]` | |
| spire-server.nodeSelector | object | `{}` | |
| spire-server.nodeSelector | object | `{}` | Select specific nodes to run on (currently only amd64 is supported by Tornjak) |
| spire-server.notifier.k8sbundle.namespace | string | `""` | Namespace to push the bundle into, if blank will default to SPIRE Server namespace |
| spire-server.persistence.accessMode | string | `"ReadWriteOnce"` | |
| spire-server.persistence.size | string | `"1Gi"` | |
Expand Down Expand Up @@ -375,6 +375,7 @@ Kubernetes: `>=1.21.0-0`
| tornjak-frontend.labels | object | `{}` | |
| tornjak-frontend.nameOverride | string | `""` | |
| tornjak-frontend.namespaceOverride | string | `""` | |
| tornjak-frontend.nodeSelector | object | `{"kubernetes.io/arch":"amd64"}` | Select specific nodes to run on (currently only amd64 is supported by Tornjak) |
| tornjak-frontend.podSecurityContext | object | `{}` | |
| tornjak-frontend.securityContext | object | `{}` | |
| tornjak-frontend.service.annotations | object | `{}` | |
Expand Down
2 changes: 1 addition & 1 deletion charts/spire/charts/spire-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ A Helm chart to install the SPIRE server.
| namespaceOverride | string | `""` | |
| nodeAttestor.k8sPsat.enabled | bool | `true` | |
| nodeAttestor.k8sPsat.serviceAccountAllowList | list | `[]` | |
| nodeSelector | object | `{}` | |
| nodeSelector | object | `{}` | Select specific nodes to run on (currently only amd64 is supported by Tornjak) |
| notifier.k8sbundle.namespace | string | `""` | Namespace to push the bundle into, if blank will default to SPIRE Server namespace |
| persistence.accessMode | string | `"ReadWriteOnce"` | |
| persistence.size | string | `"1Gi"` | |
Expand Down
1 change: 1 addition & 0 deletions charts/spire/charts/spire-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ autoscaling:
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80

# -- Select specific nodes to run on (currently only amd64 is supported by Tornjak)
nodeSelector: {}

tolerations: []
Expand Down
1 change: 1 addition & 0 deletions charts/spire/charts/tornjak-frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ port forwarding. See the chart NOTES output for more details.
| labels | object | `{}` | |
| nameOverride | string | `""` | |
| namespaceOverride | string | `""` | |
| nodeSelector | object | `{"kubernetes.io/arch":"amd64"}` | Select specific nodes to run on (currently only amd64 is supported by Tornjak) |
| podSecurityContext | object | `{}` | |
| securityContext | object | `{}` | |
| service.annotations | object | `{}` | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ spec:
volumeMounts:
- name: cache
mountPath: /usr/src/app/node_modules/.cache
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: cache
emptyDir: {}
5 changes: 4 additions & 1 deletion charts/spire/charts/tornjak-frontend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ service:
port: 3000
annotations: {}

# -- Select specific nodes to run on (currently only amd64 is supported by Tornjak)
nodeSelector:
kubernetes.io/arch: amd64

# -- Provide minimal resources to prevent accidental crashes due to resource exhaustion
# resources:
# requests:
Expand All @@ -59,4 +63,3 @@ apiServerURL: "http://localhost:10000/" # 👈 Use it for minikube or kind
spireHealthCheck:
# -- Enables the SPIRE Healthchecker indicator
enabled: true

0 comments on commit ee43c5e

Please sign in to comment.