Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds support for Kerberos authentication over HDFS.
A few new fields were added to the CRD to support Kerberos:
spec.kerberosSecret: This will mount Kerberos files in the Vertica container. It takes the name of a secret. The secret must have the following keys:
These files will be mounted in /etc.
We use the same keytab file on each host, so it must contain all of the Vertica principals.
This property does not live under spec.communal because it can be used for general setup of Kerberos authentication.
spec.communal.kerberosServiceName: The service name portion of the Vertica Kerberos principal. This is set in the database config parameter KerberosServiceName during bootstrapping.
spec.communal.kerberosRealm: Name of the Kerberos realm. This is set in the database config parameter KerberosRealm during bootstrapping.
Putting this all together, here is a sample CR that creates a database using HDFS for communal with Kerberos:
The vertica engine has a requirement that the keytab file be readable and writable by dbadmin, and is not accessible by any other group or user. And in k8s it isn't possible to mount a Secret for a specific user. In order to satisfy the engine's requirements, we use an initContainer to copy the keytab so we can get the correct permissions of the file. This has the downside that the pod would need to be restarted if the keytab ever changes.
When setting up the krb5.conf file, it is important to add to the 'domain_realm' section a mapping of the Kubernetes cluster domain to the realm. For instance, by default Kubernetes cluster have a domain of '.cluster.local'. If the Kerberos realm that you have setup is EXAMPLE.COM, the domain_realm section should have something like this: