pub struct KanidmSpec {Show 27 fields
pub domain: String,
pub replica_groups: Vec<ReplicaGroup>,
pub external_replication_nodes: Vec<ExternalReplicationNode>,
pub image: String,
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 storage: Option<KanidmStorage>,
pub ldap_port_name: Option<String>,
pub tls_secret_name: Option<String>,
pub service: Option<KanidmService>,
pub ingress: Option<KanidmIngress>,
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>,
}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.
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.
log_level: KanidmLogLevelLog level for Kanidm.
port_name: StringPort name used for the pods and governing service. Default: “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: {}
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 defines the ingress configuration for the Kanidm server. Domain will be the host for the ingress. TLS is required.
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.
Trait Implementations§
Source§impl Clone for KanidmSpec
impl Clone for KanidmSpec
Source§fn clone(&self) -> KanidmSpec
fn clone(&self) -> KanidmSpec
1.0.0 · 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 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,
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 more