pub struct KanidmSpec {Show 39 fields
pub domain: String,
pub origin: Option<String>,
pub replica_groups: Vec<ReplicaGroup>,
pub external_replication_nodes: Vec<ExternalReplicationNode>,
pub image: String,
pub disable_upgrade_checks: bool,
pub log_level: KanidmLogLevel,
pub port_name: String,
pub image_pull_policy: Option<String>,
pub env: Option<Vec<EnvVar>>,
pub oauth2_client_namespace_selector: Option<LabelSelector>,
pub group_namespace_selector: Option<LabelSelector>,
pub person_namespace_selector: Option<LabelSelector>,
pub service_account_namespace_selector: Option<LabelSelector>,
pub storage: Option<KanidmStorage>,
pub ldap_port_name: Option<String>,
pub tls_secret_name: Option<String>,
pub service: Option<KanidmService>,
pub ingress: Option<KanidmIngress>,
pub region_ingress: Option<KanidmRegionIngress>,
pub gateway: Option<KanidmGateway>,
pub volumes: Option<Vec<Volume>>,
pub volume_mounts: Option<Vec<VolumeMount>>,
pub persistent_volume_claim_retention_policy: Option<StatefulSetPersistentVolumeClaimRetentionPolicy>,
pub security_context: Option<PodSecurityContext>,
pub dns_policy: Option<String>,
pub dns_config: Option<PodDNSConfig>,
pub containers: Option<Vec<Container>>,
pub init_containers: Option<Vec<Container>>,
pub min_ready_seconds: Option<i32>,
pub host_aliases: Option<Vec<HostAlias>>,
pub host_network: Option<bool>,
pub ip_family: IpFamily,
pub runtime_class_name: Option<String>,
pub automount_service_account_token: Option<bool>,
pub enable_service_links: bool,
pub host_users: Option<bool>,
pub domain_appearance: Option<DomainAppearanceSpec>,
pub mail_sender: Option<MailSenderSpec>,
}Expand description
Specification of the desired behavior of the Kanidm cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Fields§
§domain: StringThe DNS domain name of the server. This is used in a number of security-critical
contexts such as webauthn, so it must match your DNS hostname. It is used to
create security principal names such as william@idm.example.com so that in a
(future) trust configuration it is possible to have unique Security Principal
Names (spns) throughout the topology.
This cannot be changed after creation.
origin: Option<String>The origin for webauthn. This is the url to the server, with the port included if it is non-standard (any port except 443). This must match or be a descendent of the domain name you configure above. If these two items are not consistent, the server WILL refuse to start! origin = “https://idm.example.com”
§OR
origin = “https://idm.example.com:8443”
Defaults to https://<domain> if not specified.
replica_groups: Vec<ReplicaGroup>Different group of replicas with specific configuration as role, resources, affinity rules, and more. Each group will be deployed as a separate StatefulSet.
external_replication_nodes: Vec<ExternalReplicationNode>List of external replication nodes. This is used to configure replication between different Kanidm clusters.
WARNING: admin and idm_admin passwords are going to be reset.
image: StringContainer image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like StatefulSets.
disable_upgrade_checks: boolBefore starting an upgrade, perform pre-upgrade checks to ensure that data can be safely migrated to the new version. If pre-checks fail, image change is disallowed. If set to true, upgrade pre-checks are skipped. Defaults to false.
log_level: KanidmLogLevelLog level for Kanidm.
port_name: StringPort name used for the pods and governing service. Defaults to https.
image_pull_policy: Option<String>Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
env: Option<Vec<EnvVar>>List of environment variables to set in the kanidm container.
This can be used to set Kanidm configuration options.
More info: https://kanidm.github.io/kanidm/master/server_configuration.html
oauth2_client_namespace_selector: Option<LabelSelector>Namespaces to match for KanidmOAuth2Clients discovery.
- Not defined (default): matches only the current namespace where this Kanidm resource is deployed
- Empty selector
{}: matches all namespaces in the cluster - Selector with labels: matches namespaces with matching labels
Example for all namespaces: oauth2ClientNamespaceSelector: {}
group_namespace_selector: Option<LabelSelector>Namespaces to match for KanidmGroups discovery.
- Not defined (default): matches only the current namespace where this Kanidm resource is deployed
- Empty selector
{}: matches all namespaces in the cluster - Selector with labels: matches namespaces with matching labels
Example for all namespaces: groupNamespaceSelector: {}
person_namespace_selector: Option<LabelSelector>Namespaces to match for KanidmPersonAccounts discovery.
- Not defined (default): matches only the current namespace where this Kanidm resource is deployed
- Empty selector
{}: matches all namespaces in the cluster - Selector with labels: matches namespaces with matching labels
Example for all namespaces: personNamespaceSelector: {}
service_account_namespace_selector: Option<LabelSelector>Namespaces to match for KanidmServiceAccounts discovery.
- Not defined (default): matches only the current namespace where this Kanidm resource is deployed
- Empty selector
{}: matches all namespaces in the cluster - Selector with labels: matches namespaces with matching labels
Example for all namespaces: serviceAccountNamespaceSelector: {}
storage: Option<KanidmStorage>StorageSpec defines the configured storage for a group Kanidm servers. If no storage option is specified, then by default an EmptyDir will be used.
If multiple storage options are specified, priority will be given as follows:
- emptyDir
- ephemeral
- volumeClaimTemplate
Note: Kaniop does not resize PVCs until Kubernetes fix KEP-4650. Although, StatefulSet will be recreated if the PVC is resized.
ldap_port_name: Option<String>Defines the port name used for the LDAP service. If not defined, LDAP service will not be
configured. Service port will be 3636.
StartTLS is not supported due to security risks such as credential leakage and MITM attacks that are fundamental in how StartTLS works. StartTLS can not be repaired to prevent this. LDAPS is the only secure method of communicating to any LDAP server. Kanidm will use its certificates for both HTTPS and LDAPS.
tls_secret_name: Option<String>Specifies the name of the secret holding the TLS private key and certificate for the server. If not provided, the ingress secret will be used. The server will not start if the secret is missing.
service: Option<KanidmService>Service defines the service configuration for the Kanidm server.
ingress: Option<KanidmIngress>Ingress configuration for the Kanidm cluster.
The domain specified in the Kanidm spec will be used as the ingress host. TLS is required and must be configured at the ingress controller level (termination or passthrough). When running multiple replicas, configure session affinity on your ingress controller to ensure proper session handling.
region_ingress: Option<KanidmRegionIngress>Region-specific ingress configuration for multi-region deployments.
Allows defining ingress settings for a specific region, using a subdomain of the main Kanidm domain. TLS is required and must be configured at the ingress controller level (termination or passthrough). For multi-region deployments, configure session affinity on your ingress controller to ensure proper session handling.
gateway: Option<KanidmGateway>Gateway API configuration for the Kanidm cluster.
Allows configuring an HTTPRoute for Gateway API-based ingress routing. The HTTPRoute will route traffic to the Kanidm service using the specified parentRefs to attach to Gateway(s). Both ingress and gateway can be configured simultaneously for migration scenarios.
volumes: Option<Vec<Volume>>Volumes allows the configuration of additional volumes on the output StatefulSet definition. Volumes specified will be appended to other volumes that are generated as a result of StorageSpec objects.
volume_mounts: Option<Vec<VolumeMount>>VolumeMounts allows the configuration of additional VolumeMounts.
VolumeMounts will be appended to other VolumeMounts in the kanidm’ container, that are generated as a result of StorageSpec objects.
persistent_volume_claim_retention_policy: Option<StatefulSetPersistentVolumeClaimRetentionPolicy>The field controls if and how PVCs are deleted during the lifecycle of a StatefulSet. The default behavior is all PVCs are retained. This is a beta field from 1.27. It requires enabling the StatefulSetAutoDeletePVC feature gate.
security_context: Option<PodSecurityContext>SecurityContext holds pod-level security attributes and common container settings. This defaults to the default PodSecurityContext.
dns_policy: Option<String>Defines the DNS policy for the pods.
dns_config: Option<PodDNSConfig>Defines the DNS configuration for the pods.
containers: Option<Vec<Container>>Containers allows injecting additional containers or modifying operator generated containers. This can be used to allow adding an authentication proxy to the Pods or to change the behavior of an operator generated container. Containers described here modify an operator generated container if they share the same name and modifications are done via a strategic merge patch.
The name of container managed by the operator is: kanidm
Overriding containers is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.
init_containers: Option<Vec<Container>>InitContainers allows injecting initContainers to the Pod definition. Those can be used to e.g. fetch secrets for injection into the Kanidm configuration from external sources. Any errors during the execution of an initContainer will lead to a restart of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ InitContainers described here modify an operator generated init containers if they share the same name and modifications are done via a strategic merge patch.
The names of init container name managed by the operator are: * init-config-reloader.
Overriding init containers is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.
min_ready_seconds: Option<i32>Minimum number of seconds for which a newly created Pod should be ready without any of its container crashing for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)
host_aliases: Option<Vec<HostAlias>>Optional list of hosts and IPs that will be injected into the Pod’s hosts file if specified.
host_network: Option<bool>Use the host’s network namespace if true.
Make sure to understand the security implications if you want to enable it (https://kubernetes.io/docs/concepts/configuration/overview/).
When hostNetwork is enabled, this will set the DNS policy to ClusterFirstWithHostNet automatically.
ip_family: IpFamilyIP family for bind addresses. Defaults to IPv4.
ipv4: Uses 0.0.0.0 for bind addresses (default)ipv6: Uses [::] for bind addresses
runtime_class_name: Option<String>RuntimeClassName refers to a RuntimeClass object in the node.k8s.io API group, which should be used to run the pods in this Kanidm cluster. If no RuntimeClass resource matches the named class, the pod will not be run. If unset or empty, the “legacy” RuntimeClass will be used, which is an implicit class with an empty definition that uses the default runtime handler. More info: https://kubernetes.io/docs/concepts/containers/runtime-class/
automount_service_account_token: Option<bool>AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. If not specified, defaults to true (the token is mounted). Setting this to false is recommended for security-sensitive applications. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
enable_service_links: boolEnableServiceLinks indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links. Defaults to false for security reasons (prevents service environment variable injection). Set to true only if you need Kubernetes to inject service information as environment variables. More info: https://kubernetes.io/docs/concepts/services-networking/service/#environment-variables
host_users: Option<bool>HostUsers controls how the user namespace is configured for the pod. If set to true, the pod will use the host’s user namespace. If set to false or not specified, the pod will use a user namespace configured by the runtime. This feature requires support in the container runtime and Kubernetes 1.27+. More info: https://kubernetes.io/docs/concepts/workloads/pods/user-namespaces/
domain_appearance: Option<DomainAppearanceSpec>Domain appearance customization settings. Allows customizing the display name and site image (logo) shown on the Kanidm signin page.
mail_sender: Option<MailSenderSpec>Mail sender configuration for sending emails (password reset links, notifications).
When enabled, the operator automatically creates a service account in Kanidm’s
idm_message_senders group, generates an API token, and deploys the kanidm-mail-sender
component.
Trait Implementations§
Source§impl Clone for KanidmSpec
impl Clone for KanidmSpec
Source§fn clone(&self) -> KanidmSpec
fn clone(&self) -> KanidmSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for KanidmSpec
impl Debug for KanidmSpec
Source§impl Default for KanidmSpec
impl Default for KanidmSpec
Source§fn default() -> KanidmSpec
fn default() -> KanidmSpec
Source§impl<'de> Deserialize<'de> for KanidmSpec
impl<'de> Deserialize<'de> for KanidmSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for KanidmSpec
impl JsonSchema for KanidmSpec
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for KanidmSpec
impl RefUnwindSafe for KanidmSpec
impl Send for KanidmSpec
impl Sync for KanidmSpec
impl Unpin for KanidmSpec
impl UnsafeUnpin for KanidmSpec
impl UnwindSafe for KanidmSpec
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request