Skip to content

Commit 9a62acf

Browse files
committed
Allow to configure resources per object
Signed-off-by: Marco Franssen <marco.franssen@philips.com>
1 parent 8523c0a commit 9a62acf

6 files changed

Lines changed: 83 additions & 17 deletions

File tree

charts/spire/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ description: |
2727
- --service-account-signing-key-file=/run/config/pki/sa.key
2828
```
2929
type: application
30-
version: 0.5.1
30+
version: 0.5.2
3131
appVersion: "1.4.4"
3232
keywords: ["spiffe", "spire", "spire-server", "spire-agent"]
3333
home: https://github.com/philips-labs/helm-charts/charts/spire

charts/spire/README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<!-- This README.md is generated. -->
44

5-
![Version: 0.5.1](https://img.shields.io/badge/Version-0.5.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.4.4](https://img.shields.io/badge/AppVersion-1.4.4-informational?style=flat-square)
5+
![Version: 0.5.2](https://img.shields.io/badge/Version-0.5.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.4.4](https://img.shields.io/badge/AppVersion-1.4.4-informational?style=flat-square)
66

77
A Helm chart for deploying spire-server and spire-agent.
88

@@ -55,10 +55,15 @@ Kubernetes: `>=1.21.0-0`
5555
| agent.image.repository | string | `"gcr.io/spiffe-io/spire-agent"` | |
5656
| agent.image.tag | string | `""` | |
5757
| agent.nodeSelector."kubernetes.io/arch" | string | `"amd64"` | |
58+
| agent.resources | object | `{}` | |
5859
| autoscaling.enabled | bool | `false` | |
5960
| autoscaling.maxReplicas | int | `100` | |
6061
| autoscaling.minReplicas | int | `1` | |
6162
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
63+
| csiDriver.image.pullPolicy | string | `"IfNotPresent"` | |
64+
| csiDriver.image.repository | string | `"ghcr.io/spiffe/spiffe-csi-driver"` | |
65+
| csiDriver.image.tag | string | `"0.2.0"` | |
66+
| csiDriver.resources | object | `{}` | |
6267
| fullnameOverride | string | `""` | |
6368
| imagePullSecrets | list | `[]` | |
6469
| nameOverride | string | `""` | |
@@ -81,13 +86,13 @@ Kubernetes: `>=1.21.0-0`
8186
| oidc.jwtIssuer | string | `"oidc-discovery.example.org"` | |
8287
| oidc.logLevel | string | `"INFO"` | |
8388
| oidc.nodeSelector."kubernetes.io/arch" | string | `"amd64"` | |
89+
| oidc.resources | object | `{}` | |
8490
| oidc.service.annotations | object | `{}` | |
8591
| oidc.service.port | int | `80` | |
8692
| oidc.service.type | string | `"NodePort"` | |
8793
| podAnnotations | object | `{}` | |
8894
| podSecurityContext | object | `{}` | |
8995
| replicaCount | int | `1` | |
90-
| resources | object | `{}` | |
9196
| securityContext | object | `{}` | |
9297
| server.dataStorage.accessMode | string | `"ReadWriteOnce"` | |
9398
| server.dataStorage.enabled | bool | `true` | |
@@ -97,6 +102,7 @@ Kubernetes: `>=1.21.0-0`
97102
| server.image.repository | string | `"gcr.io/spiffe-io/spire-server"` | |
98103
| server.image.tag | string | `""` | |
99104
| server.nodeSelector."kubernetes.io/arch" | string | `"amd64"` | |
105+
| server.resources | object | `{}` | |
100106
| server.service.port | int | `8081` | |
101107
| server.service.type | string | `"ClusterIP"` | |
102108
| serviceAccount.annotations | object | `{}` | |
@@ -110,3 +116,4 @@ Kubernetes: `>=1.21.0-0`
110116
| workloadRegistrar.image.pullPolicy | string | `"IfNotPresent"` | |
111117
| workloadRegistrar.image.repository | string | `"gcr.io/spiffe-io/k8s-workload-registrar"` | |
112118
| workloadRegistrar.image.tag | string | `""` | |
119+
| workloadRegistrar.resources | object | `{}` | |

charts/spire/templates/agent-daemonset.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ spec:
5959
port: 8080
6060
initialDelaySeconds: 15
6161
periodSeconds: 60
62+
resources:
63+
{{- toYaml .Values.agent.resources | nindent 12 }}
6264
# This is the container which runs the SPIFFE CSI driver.
6365
- name: spiffe-csi-driver
6466
image: ghcr.io/spiffe/spiffe-csi-driver:nightly
@@ -90,6 +92,8 @@ spec:
9092
name: mountpoint-dir
9193
securityContext:
9294
privileged: true
95+
resources:
96+
{{- toYaml .Values.csiDriver.resources | nindent 12 }}
9397
# This container runs the CSI Node Driver Registrar which takes care
9498
# of all the little details required to register a CSI driver with
9599
# the kubelet.
@@ -108,6 +112,8 @@ spec:
108112
# directory
109113
- name: kubelet-plugin-registration-dir
110114
mountPath: /registration
115+
resources:
116+
{{- toYaml .Values.csiDriver.resources | nindent 12 }}
111117
volumes:
112118
- name: spire-config
113119
configMap:

charts/spire/templates/oidc-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ spec:
6666
initialDelaySeconds: 5
6767
periodSeconds: 5
6868
resources:
69-
{{- toYaml .Values.resources | nindent 12 }}
69+
{{- toYaml .Values.oidc.resources | nindent 12 }}
7070
{{- if .Values.oidc.insecureScheme.enabled }}
7171
- name: nginx
7272
securityContext:

charts/spire/templates/server-statefulset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ spec:
7676
initialDelaySeconds: 5
7777
periodSeconds: 5
7878
resources:
79-
{{- toYaml .Values.resources | nindent 12 }}
79+
{{- toYaml .Values.server.resources | nindent 12 }}
8080
- name: {{ .Chart.Name }}-workload-registrar
8181
securityContext:
8282
{{- toYaml .Values.securityContext | nindent 12 }}

charts/spire/values.yaml

Lines changed: 65 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,18 @@ workloadRegistrar:
1111
# Overrides the image tag whose default is the chart appVersion.
1212
tag: ""
1313

14+
resources: {}
15+
# We usually recommend not to specify default resources and to leave this as a conscious
16+
# choice for the user. This also increases chances charts run on environments with little
17+
# resources, such as Minikube. If you do want to specify resources, uncomment the following
18+
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
19+
# requests:
20+
# cpu: 50m
21+
# memory: 32Mi
22+
# limits:
23+
# cpu: 100m
24+
# memory: 64Mi
25+
1426
server:
1527
image:
1628
repository: gcr.io/spiffe-io/spire-server
@@ -21,6 +33,18 @@ server:
2133
nodeSelector:
2234
kubernetes.io/arch: amd64
2335

36+
resources: {}
37+
# We usually recommend not to specify default resources and to leave this as a conscious
38+
# choice for the user. This also increases chances charts run on environments with little
39+
# resources, such as Minikube. If you do want to specify resources, uncomment the following
40+
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
41+
# requests:
42+
# cpu: 200m
43+
# memory: 256Mi
44+
# limits:
45+
# cpu: 200m
46+
# memory: 256Mi
47+
2448
dataStorage:
2549
enabled: true
2650
size: 1Gi
@@ -31,6 +55,23 @@ server:
3155
type: ClusterIP
3256
port: 8081
3357

58+
csiDriver:
59+
image:
60+
repository: ghcr.io/spiffe/spiffe-csi-driver
61+
pullPolicy: IfNotPresent
62+
tag: 0.2.0
63+
resources: {}
64+
# We usually recommend not to specify default resources and to leave this as a conscious
65+
# choice for the user. This also increases chances charts run on environments with little
66+
# resources, such as Minikube. If you do want to specify resources, uncomment the following
67+
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
68+
# requests:
69+
# cpu: 50m
70+
# memory: 32Mi
71+
# limits:
72+
# cpu: 100m
73+
# memory: 64Mi
74+
3475
oidc:
3576
enabled: false
3677

@@ -42,6 +83,18 @@ oidc:
4283
nodeSelector:
4384
kubernetes.io/arch: amd64
4485

86+
resources: {}
87+
# We usually recommend not to specify default resources and to leave this as a conscious
88+
# choice for the user. This also increases chances charts run on environments with little
89+
# resources, such as Minikube. If you do want to specify resources, uncomment the following
90+
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
91+
# requests:
92+
# cpu: 50m
93+
# memory: 32Mi
94+
# limits:
95+
# cpu: 100m
96+
# memory: 64Mi
97+
4598
logLevel: INFO
4699

47100
service:
@@ -82,6 +135,18 @@ agent:
82135
nodeSelector:
83136
kubernetes.io/arch: amd64
84137

138+
resources: {}
139+
# We usually recommend not to specify default resources and to leave this as a conscious
140+
# choice for the user. This also increases chances charts run on environments with little
141+
# resources, such as Minikube. If you do want to specify resources, uncomment the following
142+
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
143+
# requests:
144+
# cpu: 50m
145+
# memory: 64Mi
146+
# limits:
147+
# cpu: 100m
148+
# memory: 128Mi
149+
85150
imagePullSecrets: []
86151
# - name: my-docker-registry
87152
# username: my-docker-user
@@ -113,18 +178,6 @@ securityContext: {}
113178
# runAsNonRoot: true
114179
# runAsUser: 1000
115180

116-
resources: {}
117-
# We usually recommend not to specify default resources and to leave this as a conscious
118-
# choice for the user. This also increases chances charts run on environments with little
119-
# resources, such as Minikube. If you do want to specify resources, uncomment the following
120-
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
121-
# limits:
122-
# cpu: 100m
123-
# memory: 128Mi
124-
# requests:
125-
# cpu: 100m
126-
# memory: 128Mi
127-
128181
autoscaling:
129182
enabled: false
130183
minReplicas: 1

0 commit comments

Comments
 (0)