Skip to main content
Version 3.0

Protected S3 keys
and defined permissions for the jobs.

Two scenarios: delivering the S3 storage keys to the jobs and the permissions each run uses. Each one covers: the chart default, what changes in the cluster, and the values file commented line by line.

ChartVersion3.0.3TypeapplicationAppVersion4.0.1
CompatibilityKubernetes1.32+OpenShift4.19+Rancher2.10.x+
Feature SupportS3supported

Jobs from the chart tdp-deltalake read and write S3 storage using the access key and secret key from a Secret in the release namespace, and run with a dedicated ServiceAccount with no Kubernetes API permissions. For installation and jobs, see Delta Lake configuration.

Your environment

If you fill in your environment details here, the examples and commands on the page use what you entered. The namespace, release name and values file are your choices, not the chart's.

Scenarios​

The default Secret, or the Secret Ozone creates with security enabled.

Maintenance jobs need an access key and secret key to read and write table files in S3. The chart does not store them in the values file: it reads both from a Secret in the release namespace and provides them to each run's pod. By default, this is an s3-credentials Secret you create. With Ozone security enabled, the S3 Gateway only accepts keys issued by Ozone itself, and jobs read the ozone-s3-credentials Secret.

Chart default

Secret s3-credentials, with the keys access-key and secret-key, which you create before deployment in the release namespace.

Ozone security enabled

Secret ozone-s3-credentials, with the keys aws_access_key_id and aws_secret_access_key. Ozone creates it only in its own namespace. With Delta Lake in another namespace, you copy it.

Where the jobs' S3 keys come from

Where the keys come from

Your choice changes the commands and passages below.

namespace <NAMESPACE>S3AJob podAWS_ACCESS_KEY_ID · AWS_SECRET_ACCESS_KEYSecrets3-credentialsS3 Gateway (Ozone)accepts any pair
  1. Pod for each run. Receives the access key and secret key from the Secret as environment variables, read when the pod starts. Spark uses them to access S3 through S3A. Chart default: Secret s3-credentials. (maintenance.spark.s3Credentials)
  2. S3 key Secret. Created by you before deployment in the release namespace, with the access-key and secret-key keys. With Ozone security disabled, any non-empty pair works. Chart default: s3-credentials, with access-key and secret-key. (maintenance.spark.s3Credentials.secretName)
  3. Ozone S3 Gateway. With Ozone security disabled, its default, accepts any key pair. Chart default: Ozone security disabled.

Where the keys come from: s3-credentials Secret (default)

namespace <NAMESPACE>S3AJob podAWS_ACCESS_KEY_ID · AWS_SECRET_ACCESS_KEYSecrets3-credentialsS3 Gateway (Ozone)accepts any pair
  1. Pod for each run. Receives the access key and secret key from the Secret as environment variables, read when the pod starts. Spark uses them to access S3 through S3A. Chart default: Secret s3-credentials. (maintenance.spark.s3Credentials)
  2. S3 key Secret. Created by you before deployment in the release namespace, with the access-key and secret-key keys. With Ozone security disabled, any non-empty pair works. Chart default: s3-credentials, with access-key and secret-key. (maintenance.spark.s3Credentials.secretName)
  3. Ozone S3 Gateway. With Ozone security disabled, its default, accepts any key pair. Chart default: Ozone security disabled.

Where the keys come from: Ozone Secret (security enabled)

namespace <NAMESPACE>copyS3AJob podAWS_ACCESS_KEY_ID · AWS_SECRET_ACCESS_KEYSecretozone-s3-credentialsozone-s3-credentialsOzone namespaceS3 Gateway (Ozone)validates the keys
  1. Pod for each run. Receives the access key and secret key from the Secret as environment variables, read when the pod starts. Spark uses them to access S3 through S3A. Chart default: Secret s3-credentials. (maintenance.spark.s3Credentials)
  2. Ozone Secret. The keys Ozone issues with security enabled, stored under aws_access_key_id and aws_secret_access_key. Must be in the release namespace: when Ozone is in another namespace, this is a copy. Chart default: s3-credentials, with access-key and secret-key. (maintenance.spark.s3Credentials.secretName)
  3. Original Secret. Created by Ozone with security enabled, only in its namespace. For a release in another namespace, copy it, and copy it again after key rotation.
  4. Ozone S3 Gateway. With Ozone security enabled, only accepts keys issued by Ozone. Chart default: Ozone security disabled.
Switch above: with Ozone security enabled, the job Secret is a copy of the one created by Ozone, and the S3 Gateway validates the keys.

Secret s3-credentials. With Ozone security disabled, its default, the S3 Gateway accepts any key pair, and any non-empty pair works here. Secret s3-credentials: Best suited when Ozone runs with security disabled.

The Secret name and key names are the chart defaults, so nothing needs to be added to the values file.

Terminal input
kubectl -n <NAMESPACE> create secret generic s3-credentials \
--from-literal=access-key='<ACCESS_KEY>' \
--from-literal=secret-key='<SECRET_KEY>'

This is how the chart starts. Add it to your file only if you change the Secret name or key names.

1maintenance:
2spark:
3 s3Credentials:
4 secretName: s3-credentials
5 accessKeyKey: access-key
6 secretKeyKey: secret-key

The Secret read by jobs in the release namespace.

  1. secretName (linha 4). The Secret read by jobs in the release namespace.
  2. accessKeyKey (linha 5). The Secret key containing the access key.
  3. secretKeyKey (linha 6). The Secret key containing the secret key.
Chart default: the s3-credentials Secret

Ozone Secret. With security enabled, Ozone creates the Secret ozone-s3-credentials with a key it issued itself, and the S3 Gateway validates it. Jobs reference that Secret and its key names. Ozone Secret: Best suited when Ozone runs with security enabled, because the S3 Gateway rejects a pair it did not issue.

The Secret must be in the release namespace. With Ozone in another namespace, copy it, and copy it again after key rotation.

Click the markers to understand each line.

1maintenance:
2spark:
3 s3Credentials:
4 secretName: ozone-s3-credentials
5 accessKeyKey: aws_access_key_id
6 secretKeyKey: aws_secret_access_key

Created by Ozone with security enabled. Must exist in the release namespace.

  1. Ozone Secret (linha 4). Created by Ozone with security enabled. Must exist in the release namespace.
  2. access key (linha 5). The key name containing the access key in the Ozone Secret.
  3. secret key (linha 6). The key name containing the secret key in the Ozone Secret.
Jobs using the Ozone Secret

With Ozone in another namespace, copy the SecretOpcional

The Ozone Secret now also exists in the release namespace.

This step does not apply if you created the s3-credentials Secret above.

Terminal input
kubectl -n <NAMESPACE> create secret generic ozone-s3-credentials \
--from-literal=aws_access_key_id="$(kubectl -n <SHARED_NAMESPACE> get secret ozone-s3-credentials -o jsonpath='{.data.aws_access_key_id}' | base64 -d)" \
--from-literal=aws_secret_access_key="$(kubectl -n <SHARED_NAMESPACE> get secret ozone-s3-credentials -o jsonpath='{.data.aws_secret_access_key}' | base64 -d)"

Here, <SHARED_NAMESPACE> is the Ozone namespace. For enabling Ozone security, see Security - Apache Ozone.

Apply to the release

Jobs now read keys from the specified Secret.

Terminal input
helm upgrade --install <RELEASE_NAME> oci://registry.tecnisys.com.br/tdp/charts/tdp-deltalake \
--version 3.0.3 \
-n <NAMESPACE> \
-f <VALUES_FILE>

With the default Secret and no other changes, you can omit -f <VALUES_FILE>.

Success criteria

The release notes show the Secret and keys read by jobs. To verify without waiting for the schedule, run a job now, as described in Delta Lake configuration, and follow the log.

Terminal input
helm get notes <RELEASE_NAME> -n <NAMESPACE>
If the job pod does not start or S3 rejects the keys

CreateContainerConfigError means the Secret is missing or a key has a different name. S3 access denied with Ozone security enabled means the pair was not issued by Ozone. See When something goes wrong.

Key rotation. Each run's pod reads the keys when it starts: after changing the Secret, the next run of each job uses the new keys.

When something goes wrong​

Troubleshooting

Paste the error message or choose a symptom. The response includes the cause, action and command.

  1. Job pod in CreateContainerConfigError. Cause: The Secret specified in maintenance.spark.s3Credentials.secretName does not exist in the release namespace, or lacks the keys specified by accessKeyKey and secretKeyKey. What to do: Create the Secret, or adjust the key names in the values file (scenario 1).
  2. ozone-s3-credentials does not exist in the Delta Lake namespace. Cause: Ozone creates the Secret only in its own namespace. What to do: Copy the Secret to the release namespace (scenario 1, Ozone Secret).
  3. S3 access denied with Ozone security enabled. Cause: With Ozone security enabled, the S3 Gateway only accepts keys issued by Ozone. Arbitrary pairs are rejected. What to do: Use the ozone-s3-credentials Secret (scenario 1, Ozone Secret). After rotation, copy the Secret again.
  4. Another problem. Cause: Start with the namespace events. What to do: Events in chronological order show what prevents the pod from starting.

All parameters​

Keys are at the root of the values file.

13 of 13 parameters

ParâmetroDescriptionChart default
maintenance.spark.s3Credentials.secretNameS3 keysSecret containing S3 keys in the release namespaces3-credentials
maintenance.spark.s3Credentials.accessKeyKeyS3 keysSecret key containing the access keyaccess-key
maintenance.spark.s3Credentials.secretKeyKeyS3 keysSecret key containing the secret keysecret-key
serviceAccount.createIdentityCreates the ServiceAccount for jobstrue
serviceAccount.nameIdentityServiceAccount namedeltalake-maintenance
serviceAccount.annotationsIdentityServiceAccount annotations{}
rbac.createIdentityCreates the Role and RoleBindingtrue
rbac.rulesIdentityRole rules. Jobs do not call the Kubernetes API[]
podSecurityContext.runAsNonRootSecurity contextPod running as a non-root usertrue
podSecurityContext.seccompProfile.typeSecurity contextPod seccomp profileRuntimeDefault
securityContext.allowPrivilegeEscalationSecurity contextContainer privilege escalationfalse
securityContext.readOnlyRootFilesystemSecurity contextRead-only root filesystemfalse
securityContext.capabilities.dropSecurity contextRemoved Linux capabilities[ALL]

Next steps​