Signed-off-by: GitHub <[email protected]> Co-authored-by: marcofranssen <[email protected]>
115 KiB
spire-server
A Helm chart to install the SPIRE server.
Homepage: https://github.com/spiffe/helm-charts/tree/main/charts/spire
Note
: Minimum Spire version is
1.5.3. The recommended version is1.6.0to support arm64 nodes. If running with any prior version to1.6.0you have to use anodeSelectorto limit tokubernetes.io/arch: amd64.The recommended spire-controller-manager version is
0.2.2to support arm64 nodes. If running with any prior version to0.2.2you have to use anodeSelectorto limit tokubernetes.io/arch: amd64.
Maintainers
| Name | Url | |
|---|---|---|
| marcofranssen | [email protected] | https://marcofranssen.nl |
| kfox1111 | [email protected] | |
| faisal-memon | [email protected] | |
| edwbuck | [email protected] |
Source Code
Tornjak
Tornjak is the UI and Control Plane for SPIRE https://github.com/spiffe/tornjak and it is composed of two components:
- Backend (this chart) - Tornjak APIs that extend SPIRE APIs with Control Plane functionality
- Frontend - Tornjak UI
When Tornjak is enabled, it is exposed on both http and https (if TLS server certs are configured). Tornjak handles a permanent redirect from http to https to ensure users always use the https endpoint.
In addition, you can configure a client certificate authority, this will make Tornjak backend verify Client certificates signed by this authority to enable mTLS authentication.
Warning: For production, we recommend configuring TLS certificates and client CA to protect Tornjak from unauthorized access.
Tornjak with TLS Connection Type
TLS connection requires Tornjak to have access to TLS key and certificate.
Complete instruction on creating your own TLS certificate can be found here.
TLS Certificate and the private key must be provided to Tornjak via TLS Secret. Prior to deploying this Helm chart, create TLS Secret in the deployment namespace (e.g. spire-server)
kubectl -n spire-server create secret tls tornjak-tls-secret --cert=client.crt --key=client.key
Once the charts are deployed, you can test the TLS connection with the following command (assuming localhost):
curl --cacert CA/rootCA.crt https://localhost:10443
Tornjak with mTLS Connection Type
mTLS connection allows Tornjak server validation by client and Tornjak client validation by Tornjak server. The server validation is identical to above TLS. Follow the steps to create TLS secret with key and the certificate.
Additionally, you must provide the user CA to Tornjak server via Secret or ConfigMap.
Follow the steps to create user CA for mTLS, then create a Secret (or ConfigMap) prior to deploying this Helm chart.
Here is an example using a Secret in spire-server namespace:
kubectl -n spire-server create secret generic tornjak-client-ca --from-file=ca.crt="CA/rootCA.crt"
Once the charts are deployed, you can test the mTLS connection with the following command (assuming localhost):
curl --cacert CA/rootCA.crt --key client.key --cert client.crt https://localhost:10443
Tornjak with HTTP Connection Type
In order to run Tornjak with simple HTTP Connection only, make sure you don't create any Secrets or ConfigMaps listed above.
Parameters
Chart parameters
| Name | Description | Value |
|---|---|---|
replicaCount |
SPIRE server currently runs with a sqlite database. Scaling to multiple instances will not work until we use an external database. | 1 |
image.registry |
The OCI registry to pull the image from | ghcr.io |
image.repository |
The repository within the registry | spiffe/spire-server |
image.pullPolicy |
The image pull policy | IfNotPresent |
image.version |
This value is deprecated in favor of tag. (Will be removed in a future release) | "" |
image.tag |
Overrides the image tag whose default is the chart appVersion | "" |
imagePullSecrets |
Pull secrets for images | [] |
nameOverride |
Name override | "" |
namespaceOverride |
Namespace override | "" |
fullnameOverride |
Fullname override | "" |
serviceAccount.create |
Specifies whether a service account should be created | true |
serviceAccount.annotations |
Annotations to add to the service account | {} |
serviceAccount.name |
The name of the service account to use. If not set and create is true, a name is generated. | "" |
podAnnotations |
Annotations to add to pods | {} |
podSecurityContext |
Pod security context | {} |
securityContext |
Security context | {} |
priorityClassName |
Priority class assigned to statefulset pods | "" |
service.type |
Type of the Spire server service created | ClusterIP |
service.port |
Port for the created service | 8081 |
service.annotations |
Annotations to add to the service object | {} |
configMap.annotations |
Annotations to add to the SPIRE Server ConfigMap | {} |
resources |
Resource requests and limits | {} |
autoscaling.enabled |
Flag to enable autoscaling | false |
autoscaling.minReplicas |
Minimum replicas for autoscaling | 1 |
autoscaling.maxReplicas |
Maximum replicas for autoscaling | 100 |
autoscaling.targetCPUUtilizationPercentage |
Target CPU utlization that triggers autoscaling | 80 |
nodeSelector |
Select specific nodes to run on (currently only amd64 is supported by Tornjak) | {} |
tolerations |
List of tolerations | [] |
affinity |
List of node affinities | {} |
topologySpreadConstraints |
Topology spread constraints for resilience | [] |
livenessProbe.failureThreshold |
Failure threshold count for livenessProbe | 2 |
livenessProbe.initialDelaySeconds |
Initial delay seconds for livenessProbe | 15 |
livenessProbe.periodSeconds |
Period seconds for livenessProbe | 60 |
livenessProbe.timeoutSeconds |
Timeout in seconds for livenessProbe | 3 |
readinessProbe.initialDelaySeconds |
Initial delay seconds for readinessProbe | 5 |
readinessProbe.periodSeconds |
Period seconds for readinessProbe | 5 |
persistence.type |
What type of volume to use for persistence. Valid options pvc (recommended), hostPath, emptyDir (testing only) | pvc |
persistence.size |
What type of volume to use for persistence. Valid options pvc (recommended), hostPath, emptyDir (testing only) | 1Gi |
persistence.accessMode |
What type of volume to use for persistence. Valid options pvc (recommended), hostPath, emptyDir (testing only) | ReadWriteOnce |
persistence.storageClass |
What type of volume to use for persistence. Valid options pvc (recommended), hostPath, emptyDir (testing only) | nil |
persistence.hostPath |
Which path to use on the host when type = hostPath | "" |
dataStore.sql.databaseType |
Other supported databases are "postgres" and "mysql" | sqlite3 |
dataStore.sql.databaseName |
Only used by "postgres" or "mysql" | spire |
dataStore.sql.host |
Only used by "postgres" or "mysql" | "" |
dataStore.sql.port |
If 0 (default), it will auto set to 5432 for postgres and 3306 for mysql. Only used by those databases. | 0 |
dataStore.sql.username |
Only used by "postgres" or "mysql" | spire |
dataStore.sql.password |
Only used by "postgres" or "mysql" | "" |
dataStore.sql.options |
Only used by "postgres" or "mysql" | [] |
dataStore.sql.plugin_data |
Settings from https://github.com/spiffe/spire/blob/main/doc/plugin_server_datastore_sql.md go in this section | {} |
dataStore.sql.externalSecret.enabled |
Enable external secret for datastore creds | false |
dataStore.sql.externalSecret.name |
The name of the secret object | "" |
dataStore.sql.externalSecret.key |
The key of the secret object whose value is the dataStore.sql password | "" |
logLevel |
The log level, valid values are "debug", "info", "warn", and "error" | info |
jwtIssuer |
The JWT issuer domain | https://oidc-discovery.example.org |
clusterName |
Set the name of the Kubernetes cluster. (kubeadm init --service-dns-domain) |
example-cluster |
trustDomain |
Set the trust domain to be used for the SPIFFE identifiers | example.org |
bundleConfigMap |
Set the trust domain to be used for the SPIFFE identifiers | spire-bundle |
clusterDomain |
This is the value of your clusters kubeadm init --service-dns-domain flag |
cluster.local |
federation.enabled |
Flag to enable federation | false |
federation.bundleEndpoint.port |
Port value for trust bundle federation | 8443 |
federation.bundleEndpoint.address |
Address for trust bundle federation | 0.0.0.0 |
federation.ingress.enabled |
Flag to enable ingress for federation | false |
federation.ingress.className |
Ingress class name for federation | "" |
federation.ingress.controllerType |
Specify what type of ingress controller you're using to add the necessary annotations accordingly. If blank, other is assumed. If other, no annotations will be added. Must be one of [ingress-nginx, other, ""]. | "" |
federation.ingress.annotations |
Annotations for the ingress object | {} |
federation.ingress.hosts |
Host paths for ingress object | [] |
federation.ingress.tls |
Secrets containining TLS certs to enable https on ingress | [] |
ca_subject.country |
Country for Spire server CA | ARPA |
ca_subject.organization |
Organization for Spire server CA | Example |
ca_subject.common_name |
Common Name for Spire server CA | example.org |
keyManager.disk.enabled |
Flag to enable keyManager on disk | true |
keyManager.memory.enabled |
Flag to enable keyManager in memory | false |
keyManager.awsKMS.enabled |
Flag to enable keyManager in memory | false |
keyManager.awsKMS.region |
Specify the region for AWS KMS | "" |
keyManager.awsKMS.keyPolicy |
Policy to use when creating keys. If no policy is specified, a default policy will be used. | |
keyManager.awsKMS.keyPolicy.policy |
Key policy in JSON format. | "" |
keyManager.awsKMS.keyPolicy.existingConfigMap |
Name of a ConfigMap that has a policy.json file with the key policy in JSON format. |
"" |
keyManager.awsKMS.accessKeyID |
Access key ID for the AWS account. It's recommended to use an IAM role instead. See here to learn how to annotate your SPIRE Server Service Account to assume an IAM role. | "" |
keyManager.awsKMS.secretAccessKey |
Secret access key for the AWS account. | "" |
upstreamAuthority.disk.enabled |
Flag to enable upstream authority plugin on disk | false |
upstreamAuthority.disk.secret.create |
If disabled requires you to create a secret with the given keys (certificate, key and optional bundle) yourself. | true |
upstreamAuthority.disk.secret.name |
If secret creation is disabled, the secret with this name will be used. | spiffe-upstream-ca |
upstreamAuthority.disk.secret.data |
If secret creation is enabled, will create a secret with following certificate info | |
upstreamAuthority.disk.secret.data.certificate |
Certificate to store within disk upstreamAuthority. | "" |
upstreamAuthority.disk.secret.data.key |
Key corresponding to the upstreamAuthority. | "" |
upstreamAuthority.disk.secret.data.bundle |
Trust bundle for upstreamAuthority. | "" |
upstreamAuthority.awsPCA.enabled |
Flag to enable upstream authority plugin with AWS PCA | false |
upstreamAuthority.awsPCA.region |
AWS Region to use | "" |
upstreamAuthority.awsPCA.certificateAuthorityARN |
ARN of the "upstream" CA certificate | "" |
upstreamAuthority.awsPCA.assumeRoleARN |
(Optional) ARN of an IAM role to assume | "" |
upstreamAuthority.awsPCA.caSigningTemplateARN |
(Optional) ARN of the signing template to use for the server's CA. Defaults to a signing template for end-entity certificates only. See Using Templates (https://docs.aws.amazon.com/acm-pca/latest/userguide/UsingTemplates.html) for possible values. | "" |
upstreamAuthority.awsPCA.signingAlgorithm |
(Optional) Signing algorithm to use for the server's CA. Defaults to the CA's default. See Issue Certificate (https://docs.aws.amazon.com/cli/latest/reference/acm-pca/issue-certificate.html) for possible values. | "" |
upstreamAuthority.awsPCA.endpoint |
(Optional) Endpoint as hostname or fully-qualified URI that overrides the default endpoint. See AWS SDK Config docs (https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config) for more information. | "" |
upstreamAuthority.awsPCA.supplementalBundlePath |
(Optional) Path to a file containing PEM-encoded CA certificates that should be additionally included in the bundle. | "" |
upstreamAuthority.certManager.enabled |
Flag to enable upstream authority plugin with cert manager | false |
upstreamAuthority.certManager.rbac.create |
Flag to create RBAC roles | true |
upstreamAuthority.certManager.issuer_name |
Defaults to the release name, override if CA is provided outside of the chart | "" |
upstreamAuthority.certManager.issuer_kind |
Defaults to "Issuer", override if CA is provided outside of the chart | Issuer |
upstreamAuthority.certManager.issuer_group |
Defaults to "cert-manager.io", override if CA is provided outside of the chart | cert-manager.io |
upstreamAuthority.certManager.namespace |
Specify to use a namespace other then the one the chart is installed into | "" |
upstreamAuthority.certManager.kube_config_file |
Path to kube_config_file on node to setup cert manager | "" |
upstreamAuthority.certManager.ca.create |
Creates a Cert-Manager CA | false |
upstreamAuthority.certManager.ca.duration |
Duration of the CA. Defaults to 10 years | 87600h |
upstreamAuthority.certManager.ca.privateKey.algorithm |
Algorithm to generate private key for CA | ECDSA |
upstreamAuthority.certManager.ca.privateKey.size |
Size of generated private key for CA | 256 |
upstreamAuthority.certManager.ca.privateKey.rotationPolicy |
Rotation policy for generated private key | "" |
upstreamAuthority.certManager.ca.renewBefore |
How long to wait before renewing the CA | "" |
upstreamAuthority.spire.enabled |
Flag to use another Spire install as upstream CA | false |
upstreamAuthority.spire.upstreamDriver |
Driver for Spire as upstream CA | "" |
upstreamAuthority.spire.server |
Server details for the Spire instance use as upstream CA | |
upstreamAuthority.spire.server.address |
Address for upstream Spire server | "" |
upstreamAuthority.spire.server.port |
Port for upstream Spire server | 8081 |
upstreamAuthority.vault.enabled |
Enable Hashicorp Vault as upstream CA | false |
upstreamAuthority.vault.vaultAddr |
The URL of the Vault server. (e.g., https://vault.example.com:8443/) | "" |
upstreamAuthority.vault.namespace |
Name of the Vault namespace. This is only available in the Vault Enterprise. | "" |
upstreamAuthority.vault.pkiMountPoint |
Name of the mount point where PKI secret engine is mounted | pki |
upstreamAuthority.vault.insecureSkipVerify |
If true, caCert options are ignored and Spire accepts any server certificates claiming to be Vault | false |
upstreamAuthority.vault.caCert.type |
Type of resource representing the Vault server certificate, options are 'Secret' or 'Configmap', the item must be named ca.crt |
Secret |
upstreamAuthority.vault.caCert.name |
Name of the Kubernetes resource containing the Vault server certificate | vault-ca |
upstreamAuthority.vault.k8sAuth.enabled |
Enable k8s authentication to Hashicorp Vault | false |
upstreamAuthority.vault.k8sAuth.k8sAuthMountPoint |
Name of the mount point where the Kubernetes auth method is mounted | kubernetes |
upstreamAuthority.vault.k8sAuth.k8sAuthRoleName |
Required - Name of the Vault role. The plugin authenticates against the named role | "" |
upstreamAuthority.vault.k8sAuth.token.audience |
Intended audience of the PSAT, it must match one of the audiences supported by the Kubernetes API server. If no audience is specified, it defaults to the identifier of API Server. See 'Service Account Documentation' for more info. | vault |
upstreamAuthority.vault.k8sAuth.token.expiry |
Expiry time in seconds for the token | 7200 |
notifier.k8sbundle.namespace |
Namespace to push the bundle into, if blank will default to SPIRE Server namespace | "" |
controllerManager.enabled |
Flag to enable controller manager | false |
controllerManager.installAndUpgradeHook.enabled |
Enable Helm hook to autofix common install/upgrade issues (should be disabled when using helm template) |
true |
controllerManager.deleteHook.enabled |
Enable Helm hook to autofix common delete issues (should be disabled when using helm template) |
true |
controllerManager.image.registry |
The OCI registry to pull the image from | ghcr.io |
controllerManager.image.repository |
The repository within the registry | spiffe/spire-controller-manager |
controllerManager.image.pullPolicy |
The image pull policy | IfNotPresent |
controllerManager.image.version |
This value is deprecated in favor of tag. (Will be removed in a future release) | "" |
controllerManager.image.tag |
Overrides the image tag whose default is the chart appVersion | 0.3.0 |
controllerManager.resources |
Resource requests and limits for controller manager | {} |
controllerManager.securityContext |
Security context | {} |
controllerManager.service.type |
Service type for controller manager | ClusterIP |
controllerManager.service.port |
Service port for controller manager | 443 |
controllerManager.service.annotations |
Annotations for service resource | {} |
controllerManager.configMap.annotations |
Annotations to add to the Controller Manager ConfigMap | {} |
controllerManager.ignoreNamespaces |
These namespaces are ignored by controller manager | [] |
controllerManager.identities.enabled |
Flag to enable default identities for controller manager | true |
controllerManager.identities.spiffeIDTemplate |
Spiffe ID template for identities | spiffe://{{ .TrustDomain }}/ns/{{ .PodMeta.Namespace }}/sa/{{ .PodSpec.ServiceAccountName }} |
controllerManager.identities.podSelector |
Selector for pods to issue identity | {} |
controllerManager.identities.namespaceSelector |
Selector for namespacs to issue identity | {} |
controllerManager.identities.dnsNameTemplates |
DNS name template for issued identities | [] |
controllerManager.identities.federatesWith |
Other Spire server URLs for identity federation | [] |
controllerManager.validatingWebhookConfiguration.failurePolicy |
Action when identity is not issued | Fail |
tools.kubectl.image.registry |
The OCI registry to pull the image from | docker.io |
tools.kubectl.image.repository |
The repository within the registry | rancher/kubectl |
tools.kubectl.image.pullPolicy |
The image pull policy | IfNotPresent |
tools.kubectl.image.version |
This value is deprecated in favor of tag. (Will be removed in a future release) | "" |
tools.kubectl.image.tag |
Overrides the image tag whose default is the chart appVersion | "" |
telemetry.prometheus.enabled |
Flag to enable prometheus monitoring | false |
telemetry.prometheus.podMonitor.enabled |
Enable podMonitor for prometheus | false |
telemetry.prometheus.podMonitor.namespace |
Override where to install the podMonitor, if not set will use the same namespace as the spire-agent | "" |
telemetry.prometheus.podMonitor.labels |
Pod labels to filter for prometheus monitoring | {} |
ingress.enabled |
Flag to enable ingress | false |
ingress.className |
Ingress class name | "" |
ingress.controllerType |
Specify what type of ingress controller you're using to add the necessary annotations accordingly. If blank, other is assumed. If other, no annotations will be added. Must be one of [ingress-nginx, other, ""]. | "" |
ingress.annotations |
Annotations for the ingress object | {} |
ingress.hosts |
Host paths for ingress object | [] |
ingress.tls |
Secrets containining TLS certs to enable https on ingress | [] |
extraVolumes |
Extra volumes to be mounted | [] |
extraVolumeMounts |
Extra volume mounts | [] |
extraContainers |
Additional containers to create | [] |
initContainers |
Additional init containers to create | [] |
caKeyType |
The CA key type to use, possible values are rsa-2048, rsa-4096, ec-p256, ec-p384 (AWS requires the use of RSA. EC cryptography is not supported) | rsa-2048 |
caTTL |
TTL for CA | 24h |
defaultX509SvidTTL |
TTL for X509 Svids | 4h |
defaultJwtSvidTTL |
TTL for JWT Svids | 1h |
nodeAttestor.k8sPsat.enabled |
Enable Psat k8s nodeattestor | true |
nodeAttestor.k8sPsat.serviceAccountAllowList |
Allowed service accounts for Psat nodeattestor | [] |
tornjak.enabled |
Deploys Tornjak API (backend) (Not for production) | false |
tornjak.image.registry |
The OCI registry to pull the image from | ghcr.io |
tornjak.image.repository |
The repository within the registry | spiffe/tornjak-backend |
tornjak.image.pullPolicy |
The image pull policy | IfNotPresent |
tornjak.image.version |
This value is deprecated in favor of tag. (Will be removed in a future release) | "" |
tornjak.image.tag |
Overrides the image tag whose default is the chart appVersion | v1.4.0 |
tornjak.service.type |
Type of service resource | ClusterIP |
tornjak.service.ports.http |
Insecure port for tornjak service | 10000 |
tornjak.service.ports.https |
Secure port for tornjak service | 10443 |
tornjak.service.annotations |
Annotations for the service | {} |
tornjak.ingress.enabled |
Flag to enable ingress for Tornjak backend service | false |
tornjak.ingress.className |
Ingress class name for Tornjak backend service | "" |
tornjak.ingress.controllerType |
Specify what type of ingress controller you're using to add the necessary annotations accordingly. If blank, other is assumed. If other, no annotations will be added. Must be one of [ingress-nginx, other, ""]. | "" |
tornjak.ingress.annotations |
Annotations for Tornjak backend service | {} |
tornjak.ingress.hosts |
Host paths for ingress Tornjak backend service | [] |
tornjak.ingress.tls |
Secrets containing TLS certs to enable https on ingress | [] |
tornjak.startupProbe.failureThreshold |
Failure threshold count | 3 |
tornjak.startupProbe.initialDelaySeconds |
Initial delay seconds | 5 |
tornjak.startupProbe.periodSeconds |
Period seconds | 10 |
tornjak.startupProbe.successThreshold |
Success threshold count | 1 |
tornjak.startupProbe.timeoutSeconds |
Timeout in seconds | 5 |
tornjak.config.dataStore |
Persistent DB for storing Tornjak specific information | |
tornjak.config.dataStore.driver |
Database driver name | sqlite3 |
tornjak.config.dataStore.file |
File path for sqlite3 file | /run/spire/data/tornjak.sqlite3 |
tornjak.config.tlsSecret |
Name of the secret containing server side key and certificate for TLS verification (required for tls or mtls connectionType) |
tornjak-tls-secret |
tornjak.config.clientCA.type |
Type of delivery for the user CA for TLS client verification. Options are Secret or ConfigMap (required for mtls connectionType) |
Secret |
tornjak.config.clientCA.name |
Name of the resource secret or configMap with user CA for TLS | tornjak-client-ca |
tornjak.resources |
Resource requests and limits | {} |
customPlugins.keyManager |
Custom plugins of type KeyManager are configured here | {} |
customPlugins.nodeAttestor |
Custom plugins of type NodeAttestor are configured here | {} |
customPlugins.upstreamAuthority |
Custom plugins of type upstreamAuthority are configured here | {} |
customPlugins.notifier |
Custom plugins of type notifier are configured here | {} |
experimental.enabled |
Allow configuration of experimental features | false |
experimental.cacheReloadInterval |
The amount of time between two reloads of the in-memory entry cache. | 5s |
experimental.featureFlags |
List of developer feature flags | [] |
tests.hostAliases |
List of host aliases for testing | [] |
tests.tls.enabled |
Flag for enabling tls for tests | false |
tests.tls.customCA |
Custom CA value for tests | "" |
tests.bash.image.registry |
The OCI registry to pull the image from | cgr.dev |
tests.bash.image.repository |
The repository within the registry | chainguard/bash |
tests.bash.image.pullPolicy |
The image pull policy | IfNotPresent |
tests.bash.image.version |
This value is deprecated in favor of tag. (Will be removed in a future release) | "" |
tests.bash.image.tag |
Overrides the image tag whose default is the chart appVersion | latest@sha256:28d175c9578c85d09fc9242f211324e9c3cc4d073db5bff349e986df76ab0d4c |